VLT-Website-Heading

How to use Postman to test your SOAP APIs Web Services endpoint

Dec 13, 2019 4:37:05 PM / by Vu Long Tran

This is a guide on how to use Postman to test your SOAP APIs.

I will be using the W3school's online Web Services endpoint for this example demonstration of how to access the SOAP APIs.

W3Schools has provided "TempConvert" (Temperature Conversion) endpoint that we will use here: https://www.w3schools.com/Xml/tempconvert.asmx.

Key items you need:

So let's run the start using Postman to test the example SOAP APIs.

How to use Postman to test your SOAP APIs

Step 1 - Open Postman and create new request

Step 2 - Add endpoint to Postman

  • Set W3School's Web Services Endpoint as the link in the text box: https://www.w3schools.com/Xml/tempconvert.asmx
  • Make sure it is set to "POST" request
  • Make sure it is set to "raw" and "XML"
  • In the "Headers" tab, "Context-Type" should equal "text/xml".

Step 3 - Add request body to your request

This is the request details you need to add to the body of your request.

This is because going to the endpoint and just asking for a response will not be clear to the endpoint what you need. So you need to tell it that you have "50" degrees Fahrenheit and you need to convert it for you using the "FahrenheitToCelsius" function.

So make sure you have this added as "XML" text in Postman. Examples below:

<?xml version="1.0" encoding="utf-8"?>
<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>50</Fahrenheit>
</FahrenheitToCelsius>
</soap12:Body>
</soap12:Envelope>

Step 4 - Run the request by clicking "Send"

When you're ready. Run the request by clicking "Send" request (blue button).

You should get a response of "10" degrees celsius for this example

Video of using Postman to test your SOAP APIs:

Here's a video of using Postman to test your SOAP APIs available below:

How to use Postman to test your SOAP APIs demonstration

In this video I will be showing you how to use Postman software to test your SOAP APIs and WSDL endpoints.

You can also consider using the Calculator Web Services endpoint: http://dneonline.com/calculator.asmx if you would like to test your Postman and gain a better understanding of Web Services and SOAP APIs.

Topics: web services, apis

Vu Long Tran

Written by Vu Long Tran

Sales Engineer APAC @Puppet. ex-@Forrester consultant. Writing on #cloud, #automation, and #tech tinkering!

    Lists by Topic