<data>
<field id="field1"><field>
<field id="field2"><field>
...
</data>
The bean generated is like this:
public Class Response{
Field[] data;
....
}
I failed to get the value of each
I had 2 solutions:
1) Modify the generated java web-service client code. (Those serializer, deserializer etc)
2) Modify the WSDL to get the code generated as according to what i want.
I chose the second option.
I commented this segment of the WSDL:
<xsd:element maxOccurs="unbounded" name="field">
<xsd:complexType>
<xsd:sequence maxOccurs="1" minOccurs="1" />
<xsd:attribute name="id" type="xsd:string" />
</xsd:complexType>
</xsd:element>
I replace the above segment with:
<maxoccurs="unbounded" minoccurs="0" name="field" nillable="true" type="xsd:string"/>
Done!
No comments:
Post a Comment