Last Updated On
In this tutorial, we will send a SOAP Request in Postman.
Table of Contents
What is a SOAP Request?
Postman can make HTTP calls using Simple Object Access Protocol (SOAP), a platform-independent messaging protocol specification.
POST requests are used to send data to the API server to create or update a resource. The data sent to the server is stored in the request body of the HTTP request.
HTTP POST request provides additional data from the client to the server message body.
We will use the following URL for this Postman tutorial.
https://www.dataaccess.com/webservicesserver/NumberConversion.wso
Sample Request Body
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/">
<ubiNum>1525</ubiNum>
</NumberToWords>
</soap:Body>
</soap:Envelope>
Implementation Steps
To create the a SOAP request in Postman, follow the following steps:
Create a Collection
Step 1: Create a Collection, click on Collections, and then click on the “+” plus button.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-92.png?w=512)
Step 2: Provide a name to the collection – “API Testing”.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-93.png?w=703)
Add a request to the Collection
Step 3: To create a new request, click on “Add a request” if it is a new Collection. Otherwise, click on the 3 dots and select “Add request”.
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-115.png?w=342)
Step 4: Once you create a new request, then you will get the following window:
![](https://qaautomation.expert/wp-content/uploads/2023/06/image-95.png?w=1200)
Enter the details of request
Step 5: Enter the “name” in the request. Here, the name is “SOAP_Request”.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image.png?w=1134)
Step 6: Enter the “URL” in the address bar.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-1.png?w=793)
Step 7: Now, select the “POST” request from the list of request methods.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-2.png?w=711)
Step 8 – Add a Request body to the Post request
For this, select the Body tab.
Now in the Body tab, select raw and select XML as the format type from the drop-down menu, as shown in the image below. This is done because we need to send the request in the appropriate format that the server expects. Copy and paste the request body example mentioned at the beginning of the tutorial to the postman request Body.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-3.png?w=801)
Step 9: Add “Content-Type” to the Header.
Here, Content-Type is text/xml; charset=utf-8.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-4.png?w=925)
Step 10: Press the “Send” button.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-5.png?w=1200)
Verify the Response
Step 11: Once you press the send button, you will get the response from the server. Make sure you have a proper internet connection; otherwise, you will not get a response.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-6.png?w=1075)
Status
You can check the status code. Here, we got the status code 200, which means we got a successful response to the request. In the case of new resource creation, the status code should be 201. But as this is a dummy API, we are getting a status code of 200.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-7.png?w=1066)
Body
In the Body tab of the response box, we have multiple options to see the response in a different format.
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-13.png?w=988)
Format Type
Each request has a defined response to it as defined by the Content-Type header. That response can be in any format. Such as in the above example, we have XML code file.
Below are the various format type present in Postman.
JSON
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-9.png?w=979)
HTML
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-10.png?w=1002)
Text
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-11.png?w=987)
Headers
Headers are the extra information that is transferred to the server or the client. In Postman, headers will show like key-value pairs under the headers tab. Click on the Headers link as shown in the below image:
![](https://qaautomation.expert/wp-content/uploads/2023/10/image-12.png?w=1198)
We are done! Congratulations on making it through this tutorial and hope you found it useful! Happy Learning!!