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. I didn't look much tought, I decided to try some way to test soap with a rest tool. And this is how I did it with Postman:
- Set the request URL to use POST
For this tutorial we're going to use this wsdl: http://www.dneonline.com/calculator.asmx
Then, set the body to raw and the content-type to XML (text/xml)
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>
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>