Entering your SOAP endpoint
- Open a new request tab in Postman and enter your SOAP endpoint URL in the address field.
- Select POST from the request method dropdown list.
As an example, use the following endpoint URL:
Adding body data
- In the Body tab, select raw and choose XML from the dropdown list.
- Enter your XML in the text entry area.
If you want to test the number conversion SOAP API used in the last section, enter the following XML in the text entry area:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/"> <ubiNum>500</ubiNum> </NumberToWords> </soap:Body> </soap:Envelope>
Setting your request headers
When you select an XML body type, Postman automatically adds a content type header of
application/xml. But depending on your service provider, you may need
text/xml for some SOAP requests. Check with your SOAP service to determine which header is appropriate. If you need the
text/xml header, you will need to override the default setting added by Postman.
If you are following along with the number conversion SOAP API example, you need to change the content type header to
- Open the request Headers. If the auto-generated headers are hidden, select the notice to display them.
- Deselect the
Content-Typeheader Postman added automatically.
- Add a new row with
Content-Typein the Key field and
text/xmlin the Value field.
- Add a new row for a header with
SOAPActionin the Key field and
"#MethodName"in the Value field. (The quotes are required.) Without this header, the service will return 500.