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 require highly customized SOAP envelopes.

Typical use cases include:

  • Calling legacy SOAP APIs with complex or non-standard envelopes.
  • Testing and debugging SOAP operations by crafting exact request payloads.
  • Integrating with SOAP services requiring specific authentication headers or custom parameters.

For example, you can define a SOAP envelope with placeholders for username, password, operation name, and parameters, then replace those placeholders dynamically at runtime before sending the request.

Properties

Name Meaning
WSDL URL The URL of the WSDL file describing the SOAP web service. The actual service endpoint URL will be extracted automatically from this WSDL URL.
SOAP Type/Operation The name of the SOAP operation or method to call (e.g., GetInvoice, SetInvoice).
SOAP Envelope The full SOAP envelope XML to send. Supports template variables in {{variableName}} format, n8n expressions like {{ $json.field }}, and direct credential field access. Default example includes authentication header and body with parameters.
Authentication Source How to provide authentication credentials: either use stored API credentials (which populate {{username}} and {{password}}), 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.
HTTP Headers Additional HTTP headers to include in the SOAP request, such as Content-Type or Authorization.
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 JavaScript object. The node attempts to extract the relevant part of the SOAP body corresponding to the called operation's response or 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-JavaScript 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 incorrect template variable replacements can lead to invalid SOAP requests.
    • Missing or incorrect authentication credentials will cause authorization errors.
    • Timeout errors if the service is slow or unresponsive.
  • Error messages:

    • Network errors or timeouts will throw exceptions; ensure the service URL is reachable and timeout is sufficient.
    • SOAP faults returned by the service will appear in the raw response; inspect the response field for fault details.
    • If the node fails parsing the XML response, verify the service returns valid SOAP XML.
  • Resolutions:

    • Double-check the WSDL URL and service availability.
    • Validate your SOAP envelope XML syntax and variable usage.
    • Confirm credentials are correct and properly referenced in the envelope.
    • Increase the request timeout if needed.

Links and References

Discussion