SOAP Envelope Element
- Previous Page SOAP Syntax
- Next Page SOAP Header
The mandatory SOAP Envelope element is the root element of a SOAP message.
SOAP Envelope Element
The mandatory SOAP Envelope element is the root element of a SOAP message. It defines an XML document as a SOAP message.
Please note the use of the xmlns:soap namespace. Its value should always be:
http://www.w3.org/2001/12/soap-envelope
And it can define the encapsulation as SOAP encapsulation:
<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... Message information goes here ... </soap:Envelope>
xmlns:soap namespace
SOAP messages must have an Envelope element associated with the namespace "http://www.w3.org/2001/12/soap-envelope".
If different namespaces are used, the application will generate an error and discard this message.
encodingStyle attribute
The encodingStyle attribute of SOAP is used to define the data type used in the document. This attribute can appear in any SOAP element and will be applied to the content of the element and all its child elements. SOAP messages do not have a default encoding method.
Syntax
soap:encodingStyle="URI"
Example
<?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... Message information goes here ... </soap:Envelope>
- Previous Page SOAP Syntax
- Next Page SOAP Header