Making SOAP requests
Postman can make various types of HTTP call in addition to REST, including to protocol-agnostic services such as SOAP and GraphQL.
The following steps outline how to make a SOAP request in Postman.
Open a new request tab in Postman and enter your SOAP endpoint URL in the address field. Try out the following example if you do not have a specific service you want to call:
Check out the Public SOAP APIs collection for more SOAP requests you can try.
Select POST from the request method drop-down.
In the Body tab, select raw and choose XML from the drop-down list.
Enter your XML in the text entry area, as in the following example:
<?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>
Your request body should include the SOAP
Body tags as required by the endpoint, as well as any namespaces. The data should include the name of the operation, together with any values you need to post to the service.
When you select an XML body type, Postman will automatically add a content type header of
application/xml, but depending on your service provider, for SOAP requests you may need
text/xml. Open the request Headers and click to show the hidden headers.
Check with your SOAP service whether you need the
text/xml header. If you need the
text/xml header, you will need to override the default setting added by Postman. Deselect the
Content-Type header Postman added automatically and add a new row with
Content-Type Key and
text/xml Value. Additionally, you will need to set a
SOAPAction header with a value of (and the quotes are required)
"#MethodName". Without this, the service will return 500.
Click Send to make your call to the SOAP service. If your call is successful you will see the response in the lower tab in Postman.
Check out the SOAP template for lots of sample requests you can try out in Postman.