I had a similar issue, although I'm not sure if this solution would be 
applicable to your XSD.  I got rid of the bean classes prefixed with an 
"_" by moving the definition of fields (e.g. enumerations) out of my 
complex type definitions into the top level of the schema.

e.g. changed this:

  <xsd:complexType name="BlahData">
    <xsd:sequence>
      <xsd:element name="status">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="STATUS1"/>
          <xsd:enumeration value="STATUS2"/>
        </xsd:restriction>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>

..to this:

  <xsd:complexType name="BlahData">
    <xsd:sequence>
      <xsd:element name="status" type="BlahStatus"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:simpleType name="BlahStatus">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="STATUS1"/>
      <xsd:enumeration value="STATUS2"/>
    </xsd:restriction>
  </xsd:simpleType>

With the latter example, Axis (at least from the version in CVS about 2 
weeks ago...) generated beans named BlahData and BlahStatus instead of 
BlahData and  _BlahData_status.




"Marepalli, Somesh" <[EMAIL PROTECTED]> 
01/26/2004 11:10 AM

Please respond to
[EMAIL PROTECTED]


To
<[EMAIL PROTECTED]>
cc

Subject
FW: Problems with Axis generated Java beans from XSD






I am re-sending this mail in case someone has some info on thisâ
 
Hi:
    I am using a WSDL (which refers to an XSD) to generate the skeleton 
code for web servicesâ
    Axis is generating bean classes correctly for the most part. However, 
itâs generating some bean classes prefixed with an â_â and this creates 
problems when I try to deploy the web service. For classes starting with 
an â_â, the generated deploy.wsdd file has occurrences of â_â replaced 
with a â>â in the typeMapping entries and the service is not deployed 
correctly.
 
    What rules does Axis follow to decide what beans to generate? I would 
assume only the ones needed by operations (and their dependencies) would 
be generated. I canât understand the generation of certain bean classes 
and I donât know why some are named the way they are (starting with a 
â_â). 
 
    Is there a way to correct this?
 
Somesh Marepalli
[EMAIL PROTECTED]
 
ForwardSourceID:NT00067332 

Reply via email to