Guide
How to troubleshoot a SOAP fault
When a SOAP call fails, the answer is usually in the response, but you have to know where to look. This checklist takes you from the first clue to the likely cause.
What a SOAP fault is
When a service cannot process a request, it returns a Fault element inside the response body. SOAP 1.1 faults are normally sent with HTTP status 500. A fault is a polite error message in XML.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Invalid value for Region</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
SOAP 1.1 uses faultcode and faultstring. SOAP 1.2 uses Code and Reason. In both, a Client fault (called Sender in SOAP 1.2) means the request was wrong. A Server fault (called Receiver in SOAP 1.2) means the service had a problem of its own.
The checklist
- Read the whole response, not just the status. Is it a SOAP fault, or an HTML error page from a gateway or firewall? An HTML page means your request may never have reached the service.
- Check the address and the environment. Mixing up test and live addresses is one of the most common mistakes.
- Check the action. SOAP 1.1 sends a SOAPAction header. SOAP 1.2 puts an action parameter in the Content-Type header. A wrong value can be rejected before your request is even read.
- Check namespaces. A correct element name in the wrong namespace is treated as an unknown element.
- Check required fields and order. XML Schema often demands that elements appear in a fixed order.
- Check data formats. Dates, decimals, IDs with leading zeros and empty values versus missing values cause many faults.
- Check credentials and sessions. An expired token, a closed session or credentials from the wrong environment will stop a request.
- Check time and size. Slow back ends and very large messages can time out.
- Compare with a request that worked. Change one thing at a time until the fault appears or disappears.
- If nothing comes back at all, look at the network, firewall rules and security certificates.
Quick reference
| What you see | Likely cause |
|---|---|
| An HTML page instead of XML | A gateway, a firewall or a wrong address |
| A Client or Sender fault that names a field | Bad or missing data in the request |
| A fault about an unexpected element | A namespace or ordering problem |
| A fault about authentication or session | An expired or missing token |
| HTTP 401 or 403 | Wrong credentials or missing permission |
| No response, then a timeout | Network, firewall or a slow back end |
Share failures safely
Before you send a failed request to a colleague or a vendor, remove or mask credentials, tokens and customer data. Pasting a raw request into chat or email is how sensitive details leak.
Knotless lets you share a failed request in a controlled way, mask sensitive fields and replay it, so the person helping you sees what you saw without seeing what they should not.
Make the next fault easier
- Keep a known good request for each important operation.
- Write down which fields are required and what valid values look like.
- Agree one safe way to share failures across the team.
New to the file behind the service? Start with what a WSDL is.
Keep reading
- What is a WSDL?
- SoapUI alternative for non developers
- Knotless vs SoapUI vs Postman
- SOAP integrations in banks, SACCOs and telcos
See it on your own services
Knotless is a Windows workbench from Hisia Solutions. Trial licences are provisioned for evaluation. Bring one WSDL and we will walk through it with your team.
