Making SOAP requests

Postman can make HTTP calls using SOAP, a platform-agnostic messaging protocol specification, in addition to REST, GraphQL, and WebSocket requests.

The following steps show how to make a SOAP request in Postman.

Entering your SOAP endpoint

  1. Open a new request tab in Postman and enter your SOAP endpoint URL in the address field.
  2. Select POST from the request method dropdown list.
SOAP method

As an example, try the following endpoint URL:

https://www.dataaccess.com/webservicesserver/NumberConversion.wso

This SOAP endpoint changes numeric values into their text equivalents, for example changing the value "500" into "five hundred".

If you want to see other SOAP request examples, take a look at the Public SOAP APIs collection.

Adding body data

  1. In the Body tab, select raw and choose XML from the dropdown list.
  2. Enter your XML in the text entry area.

SOAP body type

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>

Your request body must include the SOAP Envelope, Header, and 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.

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.

  1. Open the request Headers. If the auto-generated headers are hidden, select the notice to display them.
  2. Deselect the Content-Type header Postman added automatically.
  3. Add a new row with Content-Type in the Key field and text/xml in the Value field.
  4. 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.

SOAP Content Type

Sending your request

  1. Select 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.

SOAP response data

Next steps

Check out the Public SOAP APIs collection for sample requests you can try in Postman.

Last modified: 2022/01/15