Update, April 2020: If you want to read the latest about SOAP requests, check out our new post called Making SOAP Requests with Postman.
Frequently called a REST client, Postman is actually a tool that handles any calls sent over HTTP. Since SOAP is agnostic with regards to the underlying transport protocol, Postman easily handles SOAP calls too.
A lot of web and mobile developers have chosen to transition new code to the REST (REpresentational State Transfer) architectural style, but a significant part of the development community still runs on SOAP (Simple Object Access Protocol). A number of these teams are maintaining legacy codebases, work with large enterprise customers who rely on SOAP, or have strict security requirements that are not satisfied by newer technologies.
Lots of developers use Postman for making HTTP SOAP requests. Here’s how:
- Enter the SOAP endpoint as the request URL in Postman.
- Set the request method to
- Under the Body tab, set the body type to
XML (text/xml)from the dropdown. This will automatically add the correct
Content-Typeheader as can be seen under the Headers tab. While REST typically uses JSON and other data formats, SOAP relies on XML.
- In the request body, define the SOAP envelope, body, and header tags. Start with the 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, for example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hs="http://www.holidaywebservice.com/HolidayService_v2/"> <soapenv:Body> <hs:GetHolidaysForMonth> <hs:year>2018</hs:year> <hs:countryCode>UnitedStates</hs:countryCode> <hs:month>11</hs:month> </hs:GetHolidaysForMonth> </soapenv:Body> </soapenv:Envelope>
This example uses a holiday web service to query which holidays occur in the month of November.
And there you have it! Postman is a versatile tool to handle both your REST and SOAP testing and development.
This is an update of the originally published article.