axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram Thakkalapalli (rthakkal)" <rthak...@cisco.com>
Subject RE: Axis2 1.3 -- Is ordering of elements madatory in SOAP BODY
Date Wed, 13 Feb 2008 00:59:26 GMT
Should the client ensure the order of the elements inside the Soap
envelope?
 
Ram

________________________________

From: Ram Thakkalapalli (rthakkal) 
Sent: Tuesday, February 12, 2008 2:29 AM
To: axis-user@ws.apache.org
Subject: Axis2 1.3 -- Is ordering of elements madatory in SOAP BODY


Hello, 
 
Here is a Java API and generated  WSDL  snippet. Does the order of the
elements in WSDL is mandatory when constructing the SOAP envelope? 
In my test setup, I have encountered that the order of the elements
seems to be mandatory? If Yes, Can we make the order optional and read
the values from element name instead of element index?
 
Java Class Snippet:
 
public stats[]  retrieveCPUUtilization(String name, String timeframe )
{
return stats[];
}
 
WSDL snippet  : 
<xs:element name="retrieveCPUUtilization">
 <xs:complexType>
 <xs:sequence>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="timeframe" nillable="true"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
 
 
Scenario 1: 
For the a SOAP request ( generated from WSDL2Java Utillity )of the
format below with the order of the paramters matching the Java API
above, the values are parsed correctly on the server side ( the java api
sets name= xy-server  and timeframe=hour )
<soapenv:Body>
<retrieveCPUUtilization>
<xs:name>xy-server</xs:name>
<xs:timeframe>hour</xs:timeframe>
</retrieveCPUUtilization>
</soapenv:Body>
 
 
Scenario 2 : 
For the a SOAP request ( generated using SOAPpy )of the format below
with the order of the paramters are NOT matching the Java API above, the
values are parsed INCORRECTLY on the server side( the Java API sets
name=hour, timeframe =xy-server )
<soapenv:Body>
<retrieveCPUUtilization>
<xs:timeframe>hour</xs:timeframe>
<xs:name>xy-server</xs:name>
</retrieveCPUUtilization>
</soapenv:Body>
 
 
Please let me know nif I am missing anything here.
 
Thanks
Ram
 
 

Mime
View raw message