Thanks for the tip..
Essentially, the XML schema element shown below constitutes the input
message for a doc/literal binded operation...
I have other types doing the same thing - capturing request / response
SOAP Body contents. None of them generate even a bean class...
only this type creates a bean and that too prefixed with a "_"

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 26, 2004 2:26 PM
To: [EMAIL PROTECTED]
Subject: RE: FW: Problems with Axis generated Java beans from XSD

Perhaps the problem (wrt Axis) is your complexType isn't named.  Don't 
give it the opportunity to do something stupid :).  Try pulling it out
of 
saveBuildTaskObject, name it (e.g. saveBuildTaskType) and set the 
saveBuildTaskObject element to that type.   Also, we do the message 
element->type mapping in the type section of the WSDL, not the imported 
schema, maybe that helps in this situation.




"Marepalli, Somesh" <[EMAIL PROTECTED]> 
01/26/2004 12:20 PM

Please respond to
[EMAIL PROTECTED]


To
<[EMAIL PROTECTED]>
cc

Subject
RE: FW: Problems with Axis generated Java beans from XSD






Thanks for your info....
The schema element in my case looks like shown below..This is used as
the singleton part in input message for one of my operations (I am using
doc/literal binding)
The BuildTask type is defined in the same schema document...
This is one of several similar types...However, this one is the only one
creating a bean (the others's don't). Also, the bean class is prefixed
with a "_"

<xsd:element name="saveBuildTaskObject">
                 <xsd:complexType>
                                 <xsd:sequence>
                                                 <xsd:element 
name="connID" type="xsd:int"/>
                                                 <xsd:element 
name="objName" type="xsd:string"/>
                                                 <xsd:element 
name="buildTask" type="BuildTask"/>
                                 </xsd:sequence>
                 </xsd:complexType>
</xsd:element>

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 26, 2004 11:29 AM
To: [EMAIL PROTECTED]
Subject: Re: FW: Problems with Axis generated Java beans from XSD

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 




ForwardSourceID:NT000673A6 




Reply via email to