Universal SOAP Node

Send custom SOAP requests with manual envelope definition

Overview

This node allows sending custom SOAP requests by manually defining the entire SOAP envelope XML. It is designed for scenarios where you need to interact with SOAP web services that may not have pre-built integrations or when you want full control over the SOAP request structure.

Typical use cases include:

  • Calling legacy SOAP APIs with complex or custom envelopes.
  • Testing or debugging SOAP operations by crafting specific requests.
  • Integrating with SOAP services requiring custom authentication headers or parameters.

For example, you can specify a WSDL URL, define the SOAP operation name, and provide a fully customized SOAP envelope with placeholders for variables such as username, password, or other parameters. The node replaces these placeholders with actual values from credentials or manual input, sends the request, and parses the SOAP response into JSON.

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 (by removing the ?WSDL suffix).
SOAP Type/Operation The name of the SOAP operation/method to call, e.g., GetInvoice, SetInvoice.
SOAP Envelope The complete SOAP envelope XML to send. Supports template variables in {{variableName}} format, n8n expressions like {{ $json.field }}, and direct credential field access. Default example includes username/password placeholders.
Authentication Source How to provide authentication credentials: either use stored API credentials (for {{username}} and {{password}} variables) or define template variables manually.
Template Variables When using manual authentication source, a collection of variable name/value pairs to replace placeholders in the SOAP envelope template. For example, username, password, or any other parameter.
HTTP Headers Additional HTTP headers to include in the SOAP request, such as Content-Type, Authorization, etc.
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: Parsed JSON representation of the SOAP response body, typically the main result object extracted from the SOAP envelope.
  • rawResponse: The raw XML string returned by the SOAP service.
  • statusCode: HTTP status code of the SOAP response.
  • statusText: HTTP status text of the SOAP response.

If the SOAP response contains nested elements named after the operation with suffixes like Response or Result, the node attempts to extract and return those specifically for easier consumption.

No binary data output is produced by this node.

Dependencies

  • Requires an HTTP client library to send POST requests (uses Axios).
  • Uses an XML parser library to convert SOAP XML responses into JSON.
  • Optionally requires an API key credential for SOAP authentication if "Use Credentials" option is selected.
  • No additional environment variables are required beyond standard n8n credential setup.

Troubleshooting

  • Common issues:

    • Incorrect WSDL URL or inability to extract service endpoint URL.
    • Malformed SOAP envelope XML causing server errors.
    • Missing or incorrect authentication credentials leading to authorization failures.
    • Timeout errors if the SOAP service is slow or unresponsive.
  • Error messages:

    • HTTP errors will include status code and status text in the output JSON under error details.
    • Parsing errors may occur if the SOAP response is not well-formed XML.
    • If the node is set to stop on failure, it throws detailed errors including the item index for easier debugging.
  • Resolutions:

    • Verify the WSDL URL is correct and accessible.
    • Validate the SOAP envelope XML syntax.
    • Ensure credentials or manual variables are correctly provided and match the SOAP service requirements.
    • Increase the timeout setting if necessary.

Links and References

Discussion