axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julianne Hansen <julie.han...@mincom.com>
Subject Does Order of attributes in SOAP message have to match WSDL .
Date Mon, 05 Oct 2009 07:38:56 GMT

Hi All.

Just after some info on whether the order of attributes in a Webservice Request / Response
has to match the order of attributes defined in the WSDL.

I am using Apache Axis 2, but am currently having some issues with a Webservice that I am
connecting to.

The WSDL states that the definition of an attribute is as follows:

     <complexType name="ApplicationMessageImpl">
   -<http://msdwin50.dev.mincom.com:9083/eai-composite-ejb/services/WRComp/wsdl/WRComp.wsdl>
<sequence>
    <element name="code" nillable="true" type="xsd:string" />
    <element name="message" nillable="true" type="xsd:string" />
    <element name="fieldName" nillable="true" type="xsd:string" />
    <element name="fieldIndex" nillable="true" type="xsd:int" />
    <element name="dtoIndex" nillable="true" type="xsd:int" />
  </sequence>
  </complexType>

Yet the SOAP Response is returning the above attributes in the following order :

                        <ErrorMessageDTO>
                            <message>CUSTOMER DOES NOT EXIST IN THIS DISTRICT</message>
                            <code>1896</code>
                            <fieldName>CustomerNo</fieldName>
                            <fieldIndex>-1</fieldIndex>
                            <dtoIndex>0</dtoIndex>
                        </ErrorMessageDTO>


When trying to unpack the Webservice Response, Apache Axis is throwing the following error
:


org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement
message


Should Apache Axis be able to handle the attributes being in a different order, or is the
webservice incorrect because its not conforming to the WSDL.

If the later is true - is it stated in a wc3 spec anywhere that webservices should return
attributes in the correct order?

Thanks
Julie

________________________________
This transmission is for the intended addressee only and is confidential information. If you
have received this transmission in error, please notify the sender and delete the transmission.
The contents of this e-mail are the opinion of the writer only and are not endorsed by the
Mincom Group of companies unless expressly stated otherwise.


Mime
View raw message