Quick answer
Inside the Envelope you must have exactly one Body (normal response) or one Fault (error).
SOAP Missing Body or Fault
Inside the Envelope you must have exactly one Body (normal response) or one Fault (error). If both are missing, or the structure is wrong, the response is invalid.
Common causes
- Envelope has no Body and no Fault as direct child.
- Body or Fault is nested inside another element instead of directly under Envelope.
- Multiple Body or multiple Fault elements.
How to fix
- Add exactly one <Body> or one <Fault> as a direct child of Envelope.
- SOAP 1.1: use soap:Body or soap:Fault; SOAP 1.2: same with the appropriate namespace.
- Put your response payload inside Body; put error details inside Fault.
Examples
Bad
<soap:Envelope xmlns:soap="..."><soap:Header/></soap:Envelope>
Good
<soap:Envelope xmlns:soap="..."><soap:Body><Result>OK</Result></soap:Body></soap:Envelope>
FAQ
- Can SOAP Envelope have both Body and Fault?
- No. It must have exactly one: either Body (success) or Fault (error).
- Where does my response XML go?
- Inside the Body element as direct child(ren) of Body.
Fix it now
Try in validator (prefill this example)