Quick answer

A valid SOAP response must have a single root element named Envelope in the SOAP namespace (SOAP 1.1 or 1.2).

SOAP Invalid Envelope

A valid SOAP response must have a single root element named Envelope in the SOAP namespace (SOAP 1.1 or 1.2). If the root is missing, wrong, or has an incorrect namespace, validators report an invalid envelope error.

Common causes

How to fix

Examples

Bad

<Body><GetResult>ok</GetResult></Body>

Good

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>...</soap:Body></soap:Envelope>

FAQ

What is the SOAP envelope?
The root XML element that wraps the entire SOAP message; it must be named Envelope and use the SOAP namespace.
Can I use a custom root element for SOAP?
No. The root must be Envelope; your payload goes inside Body or Fault.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical