Enforcing WSDL compliance

You can force the response to list output values in the same order as defined in the WSDL.

When you create a scripted SOAP web service, the generated WSDL is based on the Input Parameters and Output Parameters related lists. The actual SOAP response sent by the scripted service is determined by the Script. This behavior can cause the script to return output values in a different order than defined in the WSDL.

To enforce the order of output parameters as defined in the related list, select the WSDL Compliance check box. When this check box is selected, the web service reorders the parameters returned by the script to match the order in the WSDL.
Note: If additional response parameters are returned by the script, but are not defined in the Response Parameters related list, those parameters are excluded from the response when WSDL Compliance is selected.
Table 1. Output Parameters related list
Parameter Order
Param 1 200
Param 2 300
Param 3 100

The following is the script that sets values for the defined output parameters. Note that in this example script the parameters are set in a different order than defined in the Output Parameters related list. Also note the additional parameter param4 that is not defined in the related list.

Response.param1 = 1;
Response.param4 = 4;
Response.param3 = 3;

When the WSDL Compliance check box is false, the SOAP response generated by the script is the following:

<response>
                <param1>1</param1>
                <param4>4</param1>
                <param3>3</param1>
</response>
When the WSDL Compliance check box is true, the SOAP response generated by the script is the following:
<response>
                <param3>3</param1>
                <param1>1</param1>
</response>