Skip to content

SOAP over HTTP + XSLT (golden recipe)

SOAP in MeshFlows is a pattern, not a first-class adapter. You already have the pieces: egress.http.call for the transport, XML + transformers.apply_xslt for envelope wrap/unwrap.

There is no soap.call provider and no WSDL import in this recipe. A thin SOAP/WSDL connector can come later if a named landscape needs generated stubs; most comparison questions (“do you have adapters?”) are answered by this pattern plus a demo.

Demo: flows/workflows/soap_http_xslt_demo.yaml (trigger flows/triggers/soap-http-xslt-demo-http.yaml).

Related: Capability comparison (gaps), Egress HTTP, Transformations.

What you get

Step Capability Role
Wrap transformers.apply_xslt Inner XML → SOAP 1.1 Envelope/Body
Call egress.http.call POST with Content-Type: text/xml and SOAPAction
Unwrap transformers.apply_xslt SOAP response → inner result XML

Typical extras:

  • context_extract_json with json_path: /body — HTTP /call returns JSON {status_code, headers, body}; the SOAP XML is the body string.
  • payload_from: context:soap_xml — feed that string into the unwrap XSLT.
  • context_extract_xml — read a result element into context for logs / conditions.

What you do not get

  • WSDL download / import / code generation
  • Auto-filled SOAPAction or namespaces from a WSDL
  • WS-Security, MTOM, SOAP 1.2 as a product feature (you can still set headers/body yourself)
  • A designer “SOAP connector” with operation pickers
  • A new orchestrator step type (type: soap)

Namespaces: prefer local-name() in XSLT 1.0 so prefixes do not break the mapping.

Recipe YAML

- id: wrap_envelope
  type: service_call
  capability_name: transformers.apply_xslt
  capability_version: "^1.0"
  path: /applyXSLT
  payload_from: initial
  xslt_file: transforms/examples/soap-wrap-envelope.xslt
  version: "1.0"

- id: soap_call
  type: service_call
  capability_name: egress.http.call
  capability_version: "^1.0"
  path: /call
  connection: soap_number_conversion
  method: POST
  url: /webservicesserver/NumberConversion.wso
  headers:
    Content-Type: text/xml; charset=utf-8
    SOAPAction: '"http://www.dataaccess.com/webservicesserver/NumberToWords"'
  payload_from: wrap_envelope
  fail_on_error_status: true

- id: extract_soap_xml
  type: context_extract_json
  input_from: soap_call
  json_path: /body
  context_key: soap_xml

- id: unwrap_body
  type: service_call
  capability_name: transformers.apply_xslt
  capability_version: "^1.0"
  path: /applyXSLT
  payload_from: context:soap_xml
  xslt_file: transforms/examples/soap-unwrap-body.xslt
  version: "1.0"

Copy the demo artifacts under flows/artifacts/transforms/examples/soap-* and point xslt_file / url / SOAPAction at your service.

Prerequisites

  • Transformers + egress HTTP deployed and registered.
  • HTTP connection with base_url (demo: flows/connections/soap_number_conversion.yaml) and a relative url on the step. Do not put https://… in the first-class url field — the orchestrator parses https:/… as a bound-document ref.
  • Downstream host on egress.http.allowed_hosts (lab example config includes www.dataaccess.com for the NumberToWords demo).
  • SOAP 1.1: Content-Type: text/xml and a quoted SOAPAction header.

The public NumberConversion endpoint is a convenience for the demo. Pytest mocks egress.http.call so CI does not depend on the internet.

When to add a real SOAP provider later

Build a soap.call / WSDL provider only when you need reusable operation metadata, WS-Security, or generated bindings across many services. Until then, keep SOAP as HTTP + artifacts — same rule as other integrations: no new orchestrator step type.