SOAP (Simple Object Access Protocol) is an XML-based message exchange protocol that relies on application layer protocols such as HTTP for message negotiation and transmission. The World Wide Web Consortium (W3C) maintains SOAP specification.
Note
The SOAP specifications document is available at https://www.w3.org/TR/soap/.
The SOAP message is an XML document comprised of Envelope
, Header
, Body
, and Fault
elements:
<?xml version="1.0" ?> <env:Envelope> <env:Header> <!-- ... --> </env:Header> <env:Body> <!-- ... --> <env:Fault> <!-- ... --> </env:Fault> </env:Body> </env:Envelope>
Envelope
is a required element of each SOAP request, as it envelops an entire SOAP message. Similarly, the Body
element is also required as it contains request and response information. Header
and Fault
, on the other hand, are optional elements. Using merely XML-based request-response messages, we can establish...