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 corey baswell <co...@yahoo.com> on 2004/07/01 21:04:21 UTC

schema choice element

Hello,
 
I'm having trouble with my client code generated from the WSDL2Java compiler. The WSDL used to generated the java code references a schema that defines a choice element (see below):
 
<xsd:complexType name="JobBodyType">
<xsd:choice>
<xsd:element name="XmlJobBody" type="XmlJobBodyType"/>
<xsd:element name="TextJobBody" type="xsd:string"/>
</xsd:choice>
</xsd:complexType>
 
In this particular scenario, I'm always filling the XmlJobBody element out and not the TextJobBody. The problem is that when the request is sent both elements (XmlJobBody and TextJobBody) are put in the request but TextJobBody is empty and has its "nil" attribute set to true.  What I really need in the request is to not send anything for the TextJobBody element since the XmlJobBody element was chosen. Is there anyway I can do this?
 
Thanks in advance,
Corey



		
---------------------------------
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.