views:

85

answers:

0

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