WSDL AXIS Arrays

Posted by SKS on Stack Overflow See other posts from Stack Overflow or by SKS
Published on 2010-06-01T21:17:54Z Indexed on 2010/06/01 21:23 UTC
Read the original article Hit count: 279

Filed under:
|
|
|

I am trying to create wsdl definition for the below soap response,

< reasonCode Required="TRUE">
< ValidCode>RR< /ValidCode>
< ValidCode>RB< /ValidCode>
< ValidCode>RT< /ValidCode>
< ValidCode>AR< /ValidCode>
< /reasonCode>

Below is the wsdl definition I have,


< xsd:complexType>
< xsd:sequence>
< xsd:element name="ValidCode" type="xsd:string" minOccurs="0" maxOccurs="20" />
< /xsd:sequence>
< xsd:attribute name="Required" type="xsd:string" />
< /xsd:complexType>
< /xsd:element>

I am using Axis 1 to generate the webservices client and for the above wsdl definition, the tool generates the reasonCode as a string array like below.

private java.lang.String[] reasonCode

It ignores the attribute required.

Does anyone know how to write wsdl defintion, such that axis creates reasonCode as an element with an attribute "required".

Any help on this would be greatly appreciated.

Thanks,
SK

© Stack Overflow or respective owner

Related posts about java

Related posts about web-services