What is SOAP?
SOAP (which once stood for Simple Object Access Protocol but is now known simply by its rather catchy acronym) is an important web services standard that describes the message structures passed at runtime to call a web service.
A SOAP message is an XML document that describes the operation to be performed and the parameters to pass to the application. Optionally, a SOAP message can include other information that describes how a recipient should process the SOAP message.
A SOAP message, which is always an XML message, wraps the service call in a SOAP envelope, as shown in Figure 14-6. A SOAP envelope includes an optional header area for additional processing information such as quality of service or processing restrictions that have meaning only if the service application is coded to process those headers. A SOAP envelope also includes a mandatory body section that describes the functions to be called and the parameters that are passed to the service.

Figure 14-6. SOAP structure and features
A strength of SOAP as a code wrapper is that a SOAP message is a text file that is generally passed via HTTP or HTTPS and therefore can cross corporate firewalls. Other interoperability standards such as CORBA, DCOM, and RPC cannot cross firewalls and are therefore not suitable for web services.
Figure 14-7 shows a simplified representation of a SOAP request being exchanged via HTTP. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access