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 Se...@elementk.com on 2002/07/29 17:04:31 UTC
XSD Sequence
Sorry, the last one got fired off by accident...
AXIS appears to not follow the <xsd:sequence> order defined in the incoming
SOAP request during RESPONSE processing and build of the SOAP return.
Here is an example....
In the WSDL the Address complex is defined like this:
<complexType name="address">
<sequence>
<element name="addressLine1" type="tns:addressLine1"/>
<element name="addressLine2" nillable="true" type="
tns:addressLine2"/>
<element name="city" type="tns:city"/>
<choice>
<element name="state" type="tns:state"/>
<element name="other" type="tns:other"/>
</choice>
<element name="country" type="tns:country"/>
<element name="postalCode" type="tns:postalCode"/>
</sequence>
</complexType>
In the generated SOAP request the supplied input is:
<ns1:address xsi:type="ns1:address">
<ns1:addressLine1 xsi:type="ns1:addressLine1">1 NoLucky Lane</
ns1:addressLine1>
<ns1:addressLine2 xsi:type="ns1:addressLine2">Apartment 237</
ns1:addressLine2>
<ns1:city xsi:type="ns1:city">Rochester</ns1:city>
<ns1:state xsi:type="ns1:state">NY</ns1:state>
<ns1:other xsi:nil="true"/>
<ns1:country xsi:type="ns1:country">US</ns1:country>
<ns1:postalCode xsi:type="ns1:postalCode">14608</ns1:postalCode
>
</ns1:address>
When the processing takes place we need to echo the address back to the
user to confirm that it was accepted as supplied. The resulting SOAP
response changes the order of this Address complex to this:
<ns1:address>
<ns1:state>NY</ns1:state>
<ns1:city>Rochester</ns1:city>
<ns1:postalCode>14608</ns1:postalCode>
<ns1:other xsi:nil="true"/>
<ns1:country>US</ns1:country>
<ns1:addressLine1>1 NoLucky
Lane</ns1:addressLine1>
<ns1:addressLine2>Apartment
237</ns1:addressLine2>
</ns1:address>
Can anyone shed any light?
Why is the sequence not preserved?