SOAP Envelope Elements
Every SOAP message is an XML document with a single root Envelope element. The Envelope contains an optional Header and a required Body. Errors are carried in a Fault element inside the Body.
W3C
SOAP 1.1/1.2
<soap:Header> (optional) </soap:Header>
<soap:Body> (required)
<soap:Fault> on error </soap:Fault>
</soap:Body>
</soap:Envelope>
Envelope
RequiredThe Envelope is the mandatory root element of every SOAP message. It declares the SOAP namespace, which distinguishes SOAP 1.1 from SOAP 1.2. The Envelope wraps the Header (optional) and Body (required). No other elements may appear at the Envelope level per the spec.
Header
OptionalThe Header contains optional metadata blocks: authentication tokens, routing instructions (WS-Addressing), transaction IDs, and tracing context. Each header block can carry mustUnderstand='1' (SOAP 1.1) or mustUnderstand='true' (SOAP 1.2) to mandate that the receiver processes it or returns a MustUnderstand fault.
Body
RequiredThe Body is the mandatory element containing the actual SOAP message payload – the operation and parameters (request) or the return value (response). On error, the Body contains a Fault element. The Body always has exactly one direct child element: the operation wrapper.
Fault
OptionalThe Fault element appears inside the Body when an error occurs. SOAP Faults carry a fault code (classification), a human-readable string, and optional detail elements. SOAP 1.1 and 1.2 have different Fault structures. HTTP responses carrying a SOAP Fault use status 500, regardless of whether the fault is a client or server error.