My experience with the Simple Object Access Protocol or as it is more commonly known SOAP is very limited. Please discuss your experience with SOAP.© BrainMass Inc. brainmass.com December 15, 2020, 2:36 pm ad1c9bdddf
SOAP is Simple Object Access Protocol. It is used to transfer data through internet. It is platform independent. To make more understanding of SOAP, I'd like to use some examples to show how SOAP works.
A SOAP Example
Let's investigate how the stock quote example would likely be implemented in SOAP. Encoded as a SOAP document, the request document looks quite different, but the same information is present as demonstrated Example 1
Example 1. A SOAP document requesting the current stock price of Red Hat
In Example 1, namespaces allow the method request to be an arbitrary XML element. This goes way beyond passing just a method name and some argument values. SOAP permits much more complex XML messages than does XML-RPC.
The server's response is equally flexible. Example 2 demonstrates:
Example 2. A SOAP Response
These two examples are minimal SOAP documents. The root element of every SOAP document is Envelope which must be in the http://schemas.xmlsoap.org/soap/envelope/ namespace, at least in SOAP 1.1. (The URL will change in SOAP 1.2.) Normally a prefix is used, and as always you can pick any prefix as long as the URI stays the same. In this document, I always assume that the prefix SOAP-ENV is mapped to that namespace URI. (This is the prefix the SOAP 1.1 specification uses.)
Each SOAP-ENV:Envelope element contains exactly one SOAP-ENV:Body element. The content of this element is one or more XML elements specific to the service. These examples use Quote, getQuote, and Price elements in the http://namespaces.cafeconleche.org/xmljava/ch2/ namespace. Other services will use other elements from other namespaces. It's also permissible to use elements from no namespace at all, though using namespaces is highly recommended.
Posting SOAP documents
Currently, most SOAP messages are passed over HTTP using POST, just like XML-RPC messages. Other transport protocols such as SMTP, BEEP, and Jabber can be supported as well. However, there are a couple of crucial differences in the HTTP headers used for SOAP:
• The HTTP request header must contain a SOAPAction field.
• If the SOAP request fails, the server should ...
Word document attached gives the expert's own account of SOAP.