SOAP envelope
<env:Header>
The optional SOAP container for routing, security, tracing, transactions, and other processing metadata.
Header carries extensible blocks from application namespaces. SOAP attributes such as mustUnderstand and role tell nodes which blocks they must process.
Each immediate child is a header block with processing semantics, not an arbitrary metadata field, and Header must appear before Body.
- Format
- SOAP envelope
- Namespace
- SOAP 1.2 envelope
- Parent
- <env:Envelope>
- How many
- Zero or one, before Body.
What our validator does
The XML validator checks well-formedness and selected SOAP or XML Schema vocabulary rules. It reports this content-model defect with a concrete repair while staying silent on rules it cannot establish from one document.
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>SOAP Header must appear before Body.<?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:Header> its vocabulary meaning.
- ToolsXML validatorRun selected envelope, Header, Body, and Fault checks before service dispatch.
Related elements
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.