Working with SOAP Web Services / APIs

SOAP (Simple Object Access Protocol) is a messaging protocol that uses XML in order to exchange information between computers.

Endpoint details

In order to read out all the endpoint details of a SOAP API you can use a tool such as SoapUI (download SoapUI Open Source).

Reading details from the WSDL

There you have to create a new project and provide the WSDL (Web Services Description Language), which as the name suggests describes the entire SOAP web service. Usually the WSDL is provided as one of the first URLs in the API documentation.

Make sure that Create Requests is turned on. This way the tool will create sample requests for you with the correct structure, where you simply have to fill in the parameters.

Reading documentation from the XSD

XSD files often contain documentation (similar to swagger files), however the documentation is not previewed in SoapUI.

In order to see the documentation, one needs to open the XSD file directly (e.g. in a code editor).

Testing requests

SoapUI

The sample request are then shown in the left sidebar. There you might have to click in some folders in order to see the actual requests.

Once you found the request that you want to test, just double click it and a new window will appear. Here you have to fill out the required parameters and send the request with the green play button.

Postman

In order to test the request in Postman, you can follow this article from Postman itself:

You can find the correct SOAPAction method name in the SoapUI Request under WS-A - Action:

The SOAPAction value always needs to have quotation marks ("") around it.

Locoia

In case the SOAP web service requires the text/xml Content-Type, add it as a header to the Connector itself:

{
  "content_type": "text/xml"
}

In the actions, you need to always select post as the method and add the SOAPAction method name in the header.

The XML can be written directly into the request body template.

You need to escape the inner quotation marks of the SOAPAction, e.g. "\"https://...\"".

Last updated