The Simple Object Access Protocol 262022 1 Sources
The Simple Object Access Protocol 2/6/2022 1
Sources of Information SOAP Tutorial, http: //www. w 3 schools. com/soap/default. asp Soap. RPC. com: Tutorials, (http: //www. soaprpc. com/tutorials/) A Busy Developer’s Guide To Soap 1. 1 Dave. Net : XML-RPC for Newbies, http: //davenet. userland. com/1998/07/14/xml Rpc. For. Newbies 2/6/2022 2
Introduction “SOAP is a Remote Procedure Calling protocol that works over HTTP. The body of the request is in XML. A procedure executes on the server and the value it returns is also formatted in XML. Procedure parameters and returned values can be scalars, numbers, strings, dates, etc. ; and can also be complex record and list structures. ” (- A Busy Developer’s Guide To Soap 1. 1) 2/6/2022 3
Remote Procedure Call using HTTP 2/6/2022 4
Example of a SOAP request POST /examples HTTP/1. 1 User-Agent: Radio User. Land/7. 0 (Win. NT) Host: localhost: 81 Content-Type: text/xml; charset=utf-8 Content-length: 474 SOAPAction: "/examples" <? xml version="1. 0"? > <SOAP-ENV: Envelope SOAP-ENV: encoding. Style= "http: //schemas. xmlsoap. org/soap/encoding/" xmlns: SOAP-ENC="http: //schemas. xmlsoap. org/soap/encoding/" xmlns: SOAP-ENV="http: //schemas. xmlsoap. org/soap/envelope/" xmlns: xsd="http: //www. w 3. org/1999/XMLSchema" xmlns: xsi="http: //www. w 3. org/1999/XMLSchema-instance"> <SOAP-ENV: Body> <m: get. State. Name xmlns: m="http: //www. soapware. org/"> <statenum xsi: type="xsd: int">41</statenum> </m: get. State. Name> </SOAP-ENV: Body> </SOAP-ENV: Envelope> 2/6/2022 5
An Example SOAP Request 2/6/2022 6
Response example HTTP/1. 1 200 OK Connection: close Content-Length: 499 Content-Type: text/xml; charset=utf-8 Date: Wed, 28 Mar 2001 05: 04 GMT Server: User. Land Frontier/7. 0 -Win. NT <? xml version="1. 0"? > <SOAP-ENV: Envelope SOAPENV: encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/" xmlns: SOAP-ENC="http: //schemas. xmlsoap. org/soap/encoding/" xmlns: SOAP-ENV="http: //schemas. xmlsoap. org/soap/envelope/" xmlns: xsd="http: //www. w 3. org/1999/XMLSchema" xmlns: xsi="http: //www. w 3. org/1999/XMLSchema-instance"> <SOAP-ENV: Body> <m: get. State. Name. Response xmlns: m="http: //www. soapware. org/"> <Result xsi: type="xsd: string">South Dakota</Result> </m: get. State. Name. Response> </SOAP-ENV: Body> </SOAP-ENV: Envelope> 2/6/2022 7
Response example 2/6/2022 8
Error Example HTTP/1. 1 500 Server Error Connection: close Content-Length: 511 Content-Type: text/xml; charset=utf-8 Date: Wed, 28 Mar 2001 05: 06: 32 GMT Server: User. Land Frontier/7. 0 -Win. NT <? xml version="1. 0"? > <SOAP-ENV: Envelope SOAPENV: encoding. Style="http: //schemas. xmlsoap. org/soap/encoding/" xmlns: SOAP-ENV="http: //schemas. xmlsoap. org/soap/envelope/" xmlns: xsd="http: //www. w 3. org/1999/XMLSchema" xmlns: xsi="http: //www. w 3. org/1999/XMLSchema-instance"> <SOAP-ENV: Body> <SOAP-ENV: Fault> <faultcode>SOAP-ENV: Client</faultcode> <faultstring>Can't call get. State. Name because there are too many parameters. </faultstring> </SOAP-ENV: Fault> </SOAP-ENV: Body> </SOAP-ENV: Envelope> 2/6/2022 9
Error Example 2/6/2022 10
- Slides: 10