SOAP envelope
<env:Body>
The required SOAP container for an application payload or a single Fault response.
Body is the message part delivered to the ultimate receiver. Normal payload children come from an application vocabulary rather than the SOAP namespace.
When processing fails, Body contains Fault instead of a successful response payload. SOAP 1.2 permits only one Fault child.
- Format
- SOAP envelope
- Namespace
- SOAP 1.2 envelope
- Parent
- <env:Envelope>
- How many
- Exactly one, as the final child of Envelope.
What it contains
application payloadzero or moreNamespace-qualified application elements.env:Faultzero or one
What our validator does
The XML validator checks that both examples are well-formed. It does not enforce this vocabulary's semantic content model, so the broken example is intentionally reported as valid XML.
We do not catch this one
This document is well-formed XML but violates a SOAP or XML Schema vocabulary rule. XML syntax alone cannot detect that defect; use a SOAP-aware processor or an XSD validator when conformance matters.Broken and fixed
Both documents below are well-formed XML — that is the point of this corpus — and both are run through the validator on every test run. The verdicts here are what it returned, not what we expect it to.
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body><m:getPrice xmlns:m="urn:example:catalog"><m:sku>42</m:sku></m:getPrice></env:Body>
<env:Header><m:trace xmlns:m="urn:example:meta">abc-123</m:trace></env:Header>
</env:Envelope><?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header><m:trace xmlns:m="urn:example:meta">abc-123</m:trace></env:Header>
<env:Body><m:getPrice xmlns:m="urn:example:catalog"><m:sku>42</m:sku></m:getPrice></env:Body>
</env:Envelope>Where it reaches
- FormatsSOAP envelopeThe SOAP format page places this element in the complete document model.
- NamespacesSOAP 1.2 envelopeThe exact namespace URI that gives <env:Body> its vocabulary meaning.
- ToolsXML validatorCheck XML syntax before handing the message to a SOAP-aware processor.
Related elements
- <env:Envelope>The SOAP 1.2 document element: an optional Header followed by one required Body.
- <env:Header>The optional SOAP container for routing, security, tracing, transactions, and other processing metadata.
- <env:Fault>SOAP 1.2's structured error payload, with a machine-readable Code and human-readable Reason.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.