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 Andy Kriger <ak...@greaterthanone.com> on 2004/08/09 19:43:55 UTC

HELP needed with sequences

I have a WSDL that has record types and array types (see the examples
below). When I run wsdl2java, it generates classes for each. I would expect
that the TransactionArrayType class would have methods for accessing the
records in the array - for example, getTransactionRecord(int i). However, it
only has a get/setTransactionRecord that returns a single record and a
private field that holds a TransactionRecordType. So, it appears the class
cannot handle a SOAP response with multiple records.

Is Axis 1.1 able to take sequences and generate Java code that properly
handles lists of objects? 1.2? Is this a known issue with Axis wsdl2java?
Has anyone found workarounds?

Any information would be greatly appreciated. Thank you.

SAMPLE WSDL...

<types>

<complexType name="TransactionRecordType">
<sequence>
<element name="ReferenceNumber" type="xsd:int"/>
<element name="TransactionTime" type="xsd:string"/>
<element name="TransactionDesc" type="xsd:string"/>
<element name="BenefitAmount" type="xsd:int"/>
<element name="TotalAmount" type="xsd:int"/>
<element name="TransactionBenefit" type="xsd:int"/>
</sequence>
</complexType>

<complexType name="TransactionArrayType">
<sequence>
<element name="TransactionRecord" type="typens:TransactionRecordType"
minoccurs="0" maxoccurs="65535"/>
</sequence>
</complexType>

</types>

Andy Kriger | Software Director | Greater Than One, Inc.
395 Hudson Street | 5th Floor | New York, NY 10014
P: 212.252.7197 | F: 212.252.7364 | E: akriger@greaterthanone.com