Postman can make HTTP calls using Simple Object Access Protocol (SOAP), a platform-independent messaging protocol specification. In this example, the SOAP endpoint changes numeric values into their text equivalents, from 500
to five hundred
.
For more SOAP request examples, see the Public SOAP APIs collection.
If you haven't already, download and install the Postman desktop app.
To open an HTTP request, select New > HTTP.
Enter your SOAP endpoint URL in the address field. For this example, use the following endpoint URL: https://www.dataaccess.com/webservicesserver/NumberConversion.wso
.
Select POST from the request method dropdown list.
In the Body tab, select raw and choose XML from the dropdown list.
Enter your XML in the text entry area. To test the number conversion SOAP API used in the previous 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>
Your request body must include the SOAP Envelope
, Header
, and Body
tags as required by the endpoint, as well as any namespaces. The data needs to 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 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 decide which header is appropriate. If you need the text/xml
header, override the default setting added by Postman.
To set request headers, do the following:
Open the request Headers. If the auto-generated headers are hidden, select hidden to display them.
Clear the Content-Type
header, which was automatically added.
Add a new key-value pair, Content-Type
and text/xml
.
Add another key-value pair, SOAPAction
and "#MethodName"
(in this example, "#POST"
).
Select Send to make your call to the SOAP service. If your call is successful, Postman displays the response in the lower tab.
Last modified: 2023/6/30
Additional resources
Blog posts
Public workspaces