Skip to content

SOAP Request

Sends a SOAP envelope to an external service.

@lainstack/soap/request · APIs

Sends a SOAP envelope (XML) by POST or PUT and returns the XML response. Use it when the service publishes a WSDL or expects a SOAP envelope. For JSON or plain XML APIs use @lainstack/http/request.

  • Put the full envelope in envelopeBody. The block sends Content-Type text/xml and Accept text/xml unless you set those headers. soapAction becomes the SOAPAction header.
  • body is the raw response XML. structuredBody exists only when you give a response XSD (responseSchemaSource or responseSchemaSet) and responseValueSchema. Without them, later blocks can only read the XML text.
  • A 2xx response that fails the XSD, or has the wrong root element, fails the block. Non-2xx responses are not checked against the XSD.
  • Many services return a SOAP fault with HTTP 500. By default that fails the block (not retried). Set failOnHttpError to false to get the “error” port with the fault XML in body.
  • The timeout defaults to 5 s (allowed 100 ms to 120 s).
  • Redirects are not followed. Only http and https to public hosts work. Private and reserved addresses and URLs with a user:password part are refused.
  • Authenticate with a connection in credentialId, never with secrets in the envelope or headers.
  • Output is redacted: values that look like credentials show as [REDACTED].
  • An automatic Idempotency-Key header is added unless you set one. A replay from or through this block sends the request again.
  • A test run calls the real endpoint, unless the block has a pinned sample output (testing).
Setting Key Type Details
SOAP endpoint (required) url URL The SOAP service endpoint URL.
Connection credentialId Connection Optional saved connection used to authenticate the SOAP request.
SOAP envelope (required) envelopeBody Text XML envelope to send; accepts a static string or a reference to a data field.
Method method One of POST, PUT HTTP method used for the SOAP request. Defaults to POST.
SOAPAction soapAction Text Optional SOAPAction header value.
Fail on HTTP error failOnHttpError Yes or no When off, non-2xx responses take the HTTP error port instead of failing.
Timeout timeoutMs Number Maximum request duration in milliseconds.
Output Path Type
Status status Number
Ok ok Yes or no
Body body Text
Exit Port Notes
Out out
HTTP error error Failure exit. Exists only when failOnHttpError is false.