Lots of people call Postman “a REST client.” They’re not wrong. However, Postman is actually used for any calls sent over HTTP. Since SOAP and GraphQL are agnostic with regards to the underlying transport protocol, Postman can handle those types of calls too.

It’s fashionable these days to talk about the REST (REpresentational State Transfer) architectural pattern, but a ton of developers still run on the older SOAP (Simple Object Access Protocol). Unless your organization is brand-new, chances are you’re developing and maintaining legacy codebases that rely on SOAP.

If so, here’s how you can use Postman for making HTTP SOAP requests:

  1. Enter the SOAP endpoint as the request URL in Postman:
    https://www.w3schools.com/xml/tempconvert.asmx
  2. Set the request method to POST.
  3. Under the Body tab, set the body type to raw and select XML from the dropdown. Once you add XML data as the body, Postman will automatically add a Content-Type header that can be seen under the Headers tab. While REST typically uses JSON and other data formats, SOAP relies on XML.
  4. Under the Headers tab, add a new header where Content-Type is the key and text/xml is the value in order to override the one added for you in the previous step, since the endpoint we’re working with requires a different Content-Type header. You can deselect the originally added header.
  5. Back in the request body under the Body tab, define the SOAP envelope, body, and header tags. Start with the required SOAP envelope tag and define all the namespaces. Enter the SOAP body and headers. The name of the SOAP method (operation) should be specified in the SOAP body, as seen in the code block below. Then hit Send, and inspect the response.
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">

  <soap12:Body>

    <FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/">

      <Fahrenheit>75</Fahrenheit>

    </FahrenheitToCelsius>

  </soap12:Body>

</soap12:Envelope>

This example uses a temperature conversion service to convert 75 degrees Fahrenheit to Celsius. Try it out in the example template SOAP: Fahrenheit to Celsius conversion:

If you’re a genius who can already do this conversion in your head, then check out this collection of other public SOAP APIs to mess around with.

And there you have it! Postman is a trusty tool to handle any API that can utilize HTTP—like REST, SOAP, and GraphQL.

This is an update of a previously published article.