||The mandatory Envelope is the root element of the SOAP message.
||The xmlns:soap namespace should always have the value of: "http://www.w3.org/2003/05/soap-envelope/,
and defines the Envelope as a SOAP Envelope. If a different or no namespace is used, the application generates an error and discards the SOAP message.
Note: The choice of any namespace prefix "xmlns:soap" is arbitrary and not semantically significant.
||The Envelope element may have the following attribute and defines how a recipient should process the SOAP message.
- encodingStyle (See Header element for explanantion)
||The optional Header element is encoded as the first immediate child element of the Envelope element and contains application specific information (like authentication, payment, etc) about the SOAP message.
The Header element may have the following attributes:
The encodingStyle attribute defines the data types in the SOAP message which can be used to serialize or deserialize the SOAP message. A SOAP message has no default encoding.
Is used to indicate the SOAP node to which a particular SOAP header block is targeted
Is used to indicate whether the processing of a SOAP header block is mandatory or optional and has the value of "false" or "0", "true" or "1". If this attribute is omitted, mustUnderstand is considered "false".
Is used to indicate whether a SOAP header block targeted at a SOAP receiver must be relayed if not processed and has the value of "false" or "0", "true" or "1". If this attribute is omitted, relay is considered "false".
||All immediate child elements of the Header element must be namespace qualified, for example: xmlns:n="http://www.mobilefish.com/ws/ac"
||The mandatory Body element contains information intended for the ultimate recipient of the message.
Immediate child elements of the SOAP Body element should be namespace-qualified.
||The optional Fault element is used to carry error information within a SOAP message. If present, the SOAP Fault element MUST appear as a body entry and MUST NOT appear more than once within a Body element. The Fault element has two or more child elements in order as follows:
- Code (mandatory)
The Code element contains two elements:
- Value (mandatory)
SOAP defines a small set of SOAP fault codes covering high level SOAP faults:
Found an invalid namespace for the SOAP Envelope element.
An immediate child element of the Header element, with the mustUnderstand attribute set to "1", was not understood.
A SOAP header block or SOAP body child element information item targeted at the faulting SOAP node is scoped with a data encoding that the faulting node does not support.
The message was incorrectly formed or did not contain the appropriate information in order to succeed. For example, the message could lack the proper authentication or payment information. It is generally an indication that the message is not to be resent without change.
The message could not be processed for reasons attributable to the processing of the message rather than to the contents of the message itself. For example, processing could include communicating with an upstream SOAP node, which did not respond. The message could succeed if resent at a later point in time.
- Subcode (optional)
The Subcode element contains two elements:
- Value (mandatory)
The value of this element is an application defined subcategory of the value of the Value child element information item of the Subcode element information item's parent element information item.
- Subcode (optional)
- Reason (mandatory)
Is intended to provide a human-readable explanation of the fault.
- Node (optional)
The Node element information item is intended to provide information about which SOAP node on the SOAP message path caused the fault to happen.
- Role (optional)
The Role element information item identifies the role the node was operating in at the point the fault occurred. The value of the Role element information item MUST be one of the roles assumed by the node during processing of the message.
The Detail element information item is intended for carrying application specific error information.