Understanding SOAP helps you better use SOAP implementations, and more importantly allows you to adopt SOAP as a general XML messaging medium. SOAP is a work in progress but is slated to become a W3C recommendation. As of this writing, the latest SOAP specification is the W3C Note available from http://www.w3c.org. W3C members from various companies, including DevelopMentor, IBM, UserLand, Lotus Development, and Microsoft, develop SOAP.
SOAP is an XML-based protocol, and defines three basic concepts:
An envelope that describes a message and how to process it.
Encoding requirements that describe message data types.
Remote Procedure Call conventions that allow for distributed method invocations.
In its most basic form, SOAP is used over HTTP to send a message to a SOAP server. In turn, the server implements some specific functionality and returns a SOAP response message back to the caller. This type of interaction uses HTTP’s inherent request/response design. The original SOAP message may be a method invocation and parameters; the response may be the return values.
A SOAP request may take the form of:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLocalTemperature xmlns:m="http://localhost/temperApp"> <zipcode>90872</zipcode> </m:GetLocalTemperature> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
This message is sent over HTTP, and can be ...