All parameters to a function or procedure, unless used during parameter substitution, are passed as part of the web service request. The format in which they are passed depends on the type of the web service request.
Parameters to requests of type HTTP:GET are encoded in the URL. For example, the following procedure declares two parameters:
CREATE PROCEDURE test ( a INTEGER, b CHAR(128) ) URL 'HTTP://localhost/myservice' TYPE 'HTTP:GET'; |
If this procedure is invoked with the two values 123 and 'xyz', then the URL used for the request is equivalent to that shown below:
HTTP://localhost/myservice?a=123&b=xyz |
If the type is HTTP:POST, the parameters and their values instead become part of the body of the request. In the case of the two parameter and values, the following text appears, after the headers, in the body of the HTTP request:
a=123&b=xyz |
Parameters passed to SOAP requests are bundled as part of the request body, as required by the SOAP specification:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://localhost"> <SOAP-ENV:Body> <m:test> <m:a>123</m:a> <m:b>abc</m:b> </m:test> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |