SOAP Message Formatter & Builder · Tutorial
How to read a SOAP fault and fix the request
5 min readbeginnerUpdated
A SOAP call fails and the log shows a long one-line XML response. You will format it, read the fault and decide what to change in your request.
What you need
- The SOAP Formatter
- The error response from your log
Steps
Paste the response
Load the fault example. The summary shows SOAP 1.1, a fault code of
soap:Clientand the reason “Unknown currency code 'EUX'”.Read the code
Client(orSenderin SOAP 1.2) means the request was wrong.Server(Receiver) means the service failed, so retrying or contacting the provider is the right move.Use the detail
The detail shows
RATE-404, To: a service error code and the field it concerns. TheToparameter had a typo.Build a corrected request
In Build a SOAP request, set the operation and namespace, and the parameters
From=EURandTo=USD. Copy the request and the HTTP headers.Content-Type: text/xml; charset=utf-8 SOAPAction: "urn:example:rates/GetExchangeRate"
Try it yourself
Opens the SOAP Message Formatter & Builder with this tutorial's sample loaded.
Common mistakes
- Retrying client faults
- A Client fault fails the same way every time. Fix the request instead of retrying.
- Wrong SOAPAction
- Many SOAP 1.1 services route by the SOAPAction header. Check the exact value in the WSDL.
Next steps
Go back to the SOAP Message Formatter & Builder, or keep going with one of these: