You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alex Huang <al...@openwave.com> on 2002/11/27 20:02:00 UTC

Bug in wsdl2java...

I ran into this very peculiar problem.  Can someone tell me if this is a
bug with wsdl2java or if it's something of my own doing.  My wsdl file
looks like the following.

<xsd:element name="UserGroupElement" type="xsd:int" minOccurs="0"
maxOccurs="unbounded"/>


   <message name="addRequest">
    <part name="username" type="xsd:string" />
    <part name="password" type="xsd:string" />
    <part name="email" type="xsd:string" />
    <part name="preferredLanguage" type="xsd:string" />
    <part name="partnerName" type="xsd:string" />
    <part name="groups" element="odm:UserGroupElement"/>
  </message>
  
  <message name="updateRequest">
    <part name="username" type="xsd:string" />
    <part name="password" type="xsd:string" />
    <part name="email" type="xsd:string" />
    <part name="preferredLanguage" type="xsd:string" />
    <part name="partnerName" type="xsd:string"/>
    <part name="groups" element="odm:UserGroupElement"/>
  </message>

The stubs created for these two calls look like the following.

 _call.setOperationName(new javax.xml.namespace.QName("OdmApi",
"UserGroupElement"));

This seems to be a problem with using "element" in the part name.  Am I
using it incorrectly? There's two problems to note here:
1. It changed the name of the operation to UserGroupElement instead of
"Add" or "Update".
2. Now, if the client makes a call to update, add gets called because
both "Add" and "Update" have the same Qname.

I've tried the following things.
1. Move the element line further up the parameter chain.  Same problem.
2. Added additional element line.  Same problem.
3. Remove the element line from update.  Same problem for Add.

Any ideas?

Thanks for any help that you can give.

--Alex