Your schema specifies that the element order is mandatory
(<xs:sequence>). If you want to remove that constraint, specify
<xs:all> instead. But you may encounter interoperability issues if you
do.

Anne

On Feb 12, 2008 5:29 AM, Ram Thakkalapalli (rthakkal)
<[EMAIL PROTECTED]> wrote:
>
>
> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to