postman webservice

Using Postman to test SOAP webservices

Recently I had to maintain a soap-based webservice. Really ugly stuff, you know. The problem is that I wanted to test my endpoint, but as the development environment is inside a docker that is inside a vagrant (is it correct to say this? 😩) I’m unable to use online tools like plum voice soap tester (or maybe it is some restriction in my network, not sure).

Looking for a desktop application I just found some specific to REST webservices. But I didn’t look very hard, I decided to try some way to test soap with a rest tool. And this is how I did it with Postman:

For this tutorial we’re going to use this wsdl: http://www.dneonline.com/calculator.asmx

1. Set the request URL to use POST

2. Then, set the body to raw and the content-type to XML (text/xml)

3. Set the envelope according to the specifications

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Add xmlns="http://tempuri.org/">
<intA>4</intA>
<intB>2</intB>
</Add>
</soap:Body>
</soap:Envelope>

4. Hit send! You should get the response below

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AddResponse xmlns="http://tempuri.org/">
<AddResult>6</AddResult>
</AddResponse>
</soap:Body>
</soap:Envelope>

Leave a Reply

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.