Overview
This node allows sending custom SOAP requests by manually defining the entire SOAP envelope XML. It is designed for scenarios where you need full control over the SOAP request structure, such as interacting with legacy SOAP web services or APIs that require specific envelope formats not supported by standard SOAP clients.
Typical use cases include:
- Calling SOAP operations with complex or custom headers and body structures.
- Integrating with SOAP services that require authentication via custom XML headers.
- Testing or debugging SOAP endpoints by crafting precise SOAP envelopes.
- Using dynamic variables and expressions to customize requests per input item.
For example, you can define a SOAP envelope with placeholders like {{username}} and {{password}} for authentication, and parameters like {{param1}} and {{param2}} for operation inputs, which get replaced at runtime.
Properties
| Name | Meaning |
|---|---|
| WSDL URL | The URL of the WSDL file describing the SOAP web service. The actual service endpoint URL is automatically extracted from this WSDL URL. |
| SOAP Type/Operation | The name of the SOAP operation/method to call (e.g., GetInvoice, SetInvoice). This is used in the SOAPAction HTTP header and to locate response data. |
| SOAP Envelope | The full SOAP envelope XML to send. Supports template variables using {{variableName}}, n8n expressions like {{ $json.field }}, and direct credential field access. You define the entire XML structure here. |
| Authentication Source | How to provide authentication credentials: either use stored API credentials (which supply {{username}} and {{password}} variables), or define template variables manually. |
| Template Variables | When manual authentication source is selected, define key-value pairs to replace variables in the SOAP envelope template (e.g., username, password, param1). |
| HTTP Headers | Additional HTTP headers to include in the SOAP request, such as Content-Type overrides or custom authorization headers. |
| Request Timeout (Ms) | Timeout for the HTTP request in milliseconds (default 30000 ms). |
Output
The node outputs an array of items, each containing a JSON object with the following fields:
response: The parsed SOAP response body as a JSON object. The node attempts to extract the relevant part of the SOAP response corresponding to the called operation, e.g.,<OperationName>Responseor<OperationName>Result.rawResponse: The raw XML string returned by the SOAP service.statusCode: The HTTP status code of the SOAP response.statusText: The HTTP status text of the SOAP response.
If the node encounters an error and "Continue On Fail" is enabled, it outputs an item with an error message and any available HTTP response details (statusCode, statusText, rawResponse).
The node does not output binary data.
Dependencies
- Requires an internet connection to access the specified WSDL URL and SOAP service endpoint.
- Uses an HTTP client library to send POST requests.
- Parses XML responses using an XML-to-JS parser.
- Optionally requires an API key credential configured in n8n if "Use Credentials" authentication source is selected.
Troubleshooting
Common issues:
- Incorrect WSDL URL or inaccessible service endpoint will cause request failures.
- Malformed SOAP envelope XML or missing required variables can lead to invalid requests.
- Wrong SOAP operation name may result in unexpected or empty responses.
- Timeout errors if the service is slow or unresponsive.
- Authentication failures if credentials or template variables are incorrect.
Error messages:
- Network errors or timeouts will show as request failures with HTTP status codes or timeout exceptions.
- SOAP faults returned by the service appear in the raw response; users should inspect
rawResponsefor fault details. - Parsing errors if the response XML is malformed or unexpected.
Resolutions:
- Verify the WSDL URL and ensure the service is reachable.
- Double-check the SOAP envelope template syntax and variable names.
- Confirm the SOAP operation name matches the service definition.
- Adjust timeout settings if needed.
- Provide correct credentials or template variables depending on the authentication method.