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:
https://www.dataaccess.com/webservicesserver/NumberConversion.wso
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 text/xml
.
- Open the request Headers. If the auto-generated headers are hidden, select the notice to display them.
- Deselect the
Content-Type
header Postman added automatically. - Add a new row with
Content-Type
in the Key field andtext/xml
in the Value field. - Add a new row for a header with
SOAPAction
in the Key field and"#MethodName"
in the Value field. (The quotes are required.) Without this header, the service will return 500.
References
https://learning.postman.com/docs/sending-requests/soap/making-soap-requests/