- Contents
SOAP API Developer's Guide
Request Messages
Listing 4: Request to Invoke Add Method
1 <SOAP-ENV:Envelope
2 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
3 SOAP-4 ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
5 <SOAP-ENV:Body>
6 <m:Add xmlns:m="uri:my-calculator">
7 <Parameter1>2</Parameter1>
8 <Parameter2>3</Parameter2>
9 </m:Add>
10 </SOAP-ENV:Body>
11 </SOAP-ENV:Envelope>
The m:Add method name element in line 6 contains the name of the method (Add) we wish to call, and the namespace it is found in (uri:my-calculator). The URI (Universal Resource Indicator) specifies which computer offers an Add method web service.
Lines 7-8 define two arguments (Parameter1 and Parameter2) that the Add method requires. In this example, the numbers to be added are 2 and 3.
Line 9 closes the method name element.