Making SOAP Requests with Postman

Lots of people call Postman, “a REST client.” They’re not wrong. However, Postman is actually used for any calls sent over HTTP. Keep reading to learn how to use Postman to make SOAP requests. Since SOAP and GraphQL are agnostic with regards to the underlying transport protocol, Postman can handle these 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.

Making SOAP Requests with Postman

If so, here’s how you can use Postman for making 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:

Postman SOAP Example

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.


Comments

Your email address will not be published. Required fields are marked *



This site uses Akismet to reduce spam. Learn how your comment data is processed.

6 thoughts on “Making SOAP Requests with Postman

  • George Gill

    What about WSDL import?

  • Carter Bailey

    What @George Gill said.

  • Gerard

    In my case, the instruction was not correct. Generally example headers, requests and responses are available here: https://www.w3schools.com/xml/tempconvert.asmx?op=CelsiusToFahrenheit but these changes helped me to achieve exepected results: Content-Type header with value “application/soap+xml; charset=utf-8” and the envelope example for SOAP 1.2.

  • Ravi Kumar

    Thanks for the Article, helpful !!
    Query: If I have to read all employee records from a WebService API, wondering how the body request looks like. In Rest we dont send any body then, instead we use GET method.
    How is this done in SOAP, any help?

  • ovo

    Very helpful…Thanks!

  • Lance Schaecher

    Postman v8.4.0
    What’s New
    You can now import WSDL specification into Postman

    https://www.postman.com/downloads/release-notes/

You might also like