SOAP API
ToolJet can establish connections with SOAP APIs using its REST API integration.
Setting up a SOAP API Data Source
To establish a connection with a SOAP API data source, you will need to add a REST API data source, as ToolJet handles SOAP APIs using REST API configurations.
You can refer to REST API Configuration Documentation for more information.
Querying SOAP API
Once you have connected to the REST API data source, you can easily write queries and interact with the SOAP API in the ToolJet application. Follow these steps to get started:
- Click on the + Add button in the query manager at the bottom panel of the editor.
- Select REST API from the Data Source section.
- Select the POST Method and enter your SOAP API endpoint.
- Add Headers
- Content-Type : text/xml (Specifies that the request body is XML.)
- Include any other required headers (e.g., Authorization, SOAPAction).
- Add Request Body in XML format.
- Click Preview to view the data returned from the query or click Run to execute the query.
tip
You can also transform the query results using the Transformations feature.
API Endpoint URL Example: http://www.dneonline.com/calculator.asmx
Request Body Example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:Add>
<tem:intA>100</tem:intA>
<tem:intB>5</tem:intB>
</tem:Add>
</soapenv:Body>
</soapenv:Envelope>
Additional Notes:
- SOAP APIs typically use the POST method. Using a different method can cause errors.
- Ensure that you have added Content-Type: text/xml header. The server requires the correct header to interpret the request as SOAP.
- Include the SOAPAction header if specified in the API documentation.