Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
Postman is an API development platform for designing, building and testing API (Application Programming Interface). It can create different HTTP requests (GET, POST, PUT), save environments for later use, and convert the API to code for various languages (like JavaScript, Python).
SOAP (Soap Object Access Protocol) is a platform-independent XML-based messaging protocol for exchanging messages between computers. It is a format for sending and receiving messages. Postman allows its users to send HTTP messages using the SOAP endpoint.
In this article, we will discuss how to make SOAP requests in Postman.
What is a SOAP request?
Each application communicates with another application over the internet and these web applications run on different operating systems, technologies, and programming languages. The best way of communication between applications is over the HTTP, which is done best using SOAP (Soap Object Access Protocol).
SOAP is an XML-based application communication protocol used to exchange messages between computers.
In simple terms, SOAP is an XML-type format for sending and receiving messages between applications that communicate via the Internet.
Setting the SOAP endpoint
To set a SOAP request head over to your Postman Desktop Application.
🚀 Click on the ➕ button to start a new request.
🚀 Select POST from the various Request Verbs available.
🚀 Enter the endpoint URL in the address bar.
For this example, we will use the following endpoint http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso
This endpoint will return the name of the Capital of the country.
Adding Body data
🚀Change to the Body Tab under the request text box.
Using the above XML text, we are sending a request to return the name of the Capital city of the country US.
✅ The above image shows the output of the request we have sent. The output is an XML text returning the name of the Capital of the country.
Setting the Headers
🚀 Go to the Headers tab.
🚀 Make the hidden headers visible.
When we enter the XML body type, the Content-typeheader by default, is set toapplication/xml.Some services do not support this type of content, in such case manually override the Content-type to text/xml.
For this example, change the application/xml to text/xml.
🚀 Deselect the Content-type header.
🚀 Change the Content-type header to text/xml by making a new key-value pair.
Send SOAP Request
After the Body text and the headers have been set. Click on the Send button.
✅ The following response is received.
The response is Washington, the Capital of the US.
Yay!🤩 You have successfully created and sent a SOAP request in the Postman.
Frequently Asked Questions
For what purpose is Postman used?
Postman is an API client that makes it easy for developers to create, share, test and document APIs. Users are allowed to create and save simple and complex HTTP/s requests, as well as read their responses.
What is a SOAP request?
SOAP is an ordinary XML-based application communication protocol that is used to exchange messages between computers.
What is the difference between SOAP and REST API?
REST APIs are based on URIs (Uniform Resource Identifier) and the HTTP protocol and use JSON for a data format. SOAP (Soap Object Access Protocol) is a platform-independent XML-based messaging protocol used for exchanging messages between computers. SOAP is a protocol, whereas REST is an architectural style.
Conclusion
Pat yourself on the back👏 for finishing this article. In this article, we discussed what a SOAP request is and how to send a SOAP request using Postman. We have discussed setting the body and headers of the request.
After reading this article, if you are interested in knowing more about Postman, we recommend you to read some of our articles -