SOAP Syntax
SOAP Building Blocks
A SOAP message is an ordinary XML document containing the following elements:
- The required Envelope element, which identifies this XML document as a SOAP message
- The optional Header element, which contains header information
- The required Body element, which contains all call and response information
- The optional Fault element, which provides information about errors that occurred while processing this message
All of the above elements are declared in the default namespace for the SOAP envelope:
http://www.w3.org/2001/12/soap-envelope
And the default namespace for SOAP encoding and data types:
http://www.w3.org/2001/12/soap-encoding
Syntax Rules
Here are some important syntax rules:
- A SOAP message must be encoded in XML
- A SOAP message must use the SOAP Envelope namespace
- A SOAP message must use the SOAP Encoding namespace
- A SOAP message must not contain DTD references
- A SOAP message must not contain XML processing instructions
The Basic Structure of a SOAP Message
xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... ... ...