Skip to content
Reference

Adapter: SOAP Web Service

Call a SOAP 1.1 or 1.2 web service: an operation body in an envelope with its SOAPAction, WS-Security UsernameToken, faults as errors, and WSDL operation listing.

On this page

Purpose

Call a SOAP web service, such as a payer's real-time eligibility service or a legacy partner interface. A send step posts an operation body in a SOAP 1.1 or 1.2 envelope to endpointUrl and returns the response Body as JSON. It is the counterpart of the Mirth Web Service Sender, and the Mirth importer maps that connector to it.

Auth

  • HTTP basic or bearer with authType.
  • WS-Security UsernameToken with wsSecurity: PasswordText, or PasswordDigest (a SHA-1 digest of a fresh nonce, the created time and the password, so the password never travels). Set the user and password in wsSecurityCredentials; wsSecurityTimestampSeconds adds a wsu:Timestamp.
  • Mutual TLS, a private CA and a proxy through the shared connection options.

How a send works

  1. The body is the step's body, else a bodyTemplate (the step's, then the profile's) with each {{field}} filled from the step input and XML-escaped, else the step input when it is XML text.
  2. A body fragment is wrapped in an envelope for soapVersion. A whole envelope is sent as it is; with WS-Security, the engine parses it and rebuilds it with the security header first in its own Header, so the payload's text is never searched for a place to put it.
  3. The SOAPAction is the step's soapAction, else the action the WSDL gives the step's operation, else defaultSoapAction. SOAP 1.1 sends it in the SOAPAction header; SOAP 1.2 sends it as the action parameter of application/soap+xml.
  4. A response Fault fails the step. The error names the fault code and the HTTP status; the fault text, which can repeat a member id or a name, stays out of run history. A Client (1.1) or Sender (1.2) fault is not retried.
  5. Any other non-2xx answer fails the step too, without its body: 401 and 403 as authentication errors, other 4xx as rejected (not retried), and 408, 429 and 5xx as retryable.

list-operations reads the WSDL at wsdlUrl and lists each operation with its SOAPAction and SOAP version, and each service address. It does not generate code or check the body against the schema.

Settings

Auth is chosen with authType: none, basic, bearer (default none). Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.

SettingTypeRequiredDefaultSecretDescription
endpointUrlurlYesNoThe service endpoint the envelope is posted to. Use https:// for PHI: plain http:// is accepted with a warning.
soapVersionenum: 1.1, 1.2No1.1No1.1: text/xml with a SOAPAction header. 1.2: application/soap+xml with an action parameter.
wsdlUrlurlNoNoWSDL 1.1 to list operations from and look up a step's operation SOAPAction (often the endpoint with ?wsdl).
defaultSoapActionstringNoNoSOAPAction when the step sets neither soapAction nor operation.
authTypeenum: none, basic, bearerNononeNoHTTP authentication. Use the connection options for mutual TLS.
credentialsobjectNo
credentials.usernamestringNoNoUsed when authType is basic.
credentials.passwordstringNoYesUsed when authType is basic.
credentials.tokenstringNoYesUsed when authType is bearer.
wsSecurityenum: none, PasswordText, PasswordDigestNononeNoWS-Security UsernameToken in the SOAP header.
wsSecurityCredentialsobjectNoThe UsernameToken user and password.
wsSecurityCredentials.usernamestringNoNo
wsSecurityCredentials.passwordstringNoYes
wsSecurityTimestampSecondsnumberNoNoAdds a wsu:Timestamp that expires this many seconds after it is created.
bodyTemplatestringNoNoOperation body with {{field}} placeholders filled, XML-escaped, from the step input. A step's own bodyTemplate or body wins.
defaultHeadersmapNoYesExtra HTTP headers on every call.
timeoutnumberNo30000NoRequest timeout in milliseconds.
tlsCaPemstringNoYesPEM CA certificate(s) to verify the server against. See tlsCaMode.
tlsCaModeenum: replace, addNoNoTrust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem.
tlsClientCertPemstringNoYesPEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem.
tlsClientKeyPemstringNoYesPEM private key for the client certificate (encrypted at rest).
tlsClientPfxstringNoYesClient certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair.
tlsClientPassphrasestringNoYesPassphrase of the PKCS#12 bundle.
tlsMinVersionenum: TLSv1.2, TLSv1.3NoNoLowest TLS version to accept (default TLSv1.2).
proxyUrlurlNoNoHTTP(S) proxy, e.g. http://proxy.example.test:3128 (opens in a new tab). The proxy host must pass the SSRF rules (SSRF_ALLOWLIST for a private one).
proxyUsernamestringNoNoProxy user (Basic auth).
proxyPasswordstringNoYesProxy password.
noProxyarray of stringNoNoHosts sent direct, not through the proxy: a name (and its subdomains), .suffix, host:port or *.

Actions

A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.

ActionWhat it doesStep parametersKeys a message may supply
sendPost an operation body in a SOAP envelope and return the response Body as JSON.body?, bodyTemplate?, soapAction?, operation?body
list-operationsList the WSDL's operations with their SOAPAction and SOAP version, and its service addresses.NoneNone

Minimal example

The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.

json
{
  "name": "SOAP Web Service (example)",
  "adapterType": "soap",
  "config": {
    "endpointUrl": "https://soap.example.test/endpoint"
  }
}

Limits

  • Not supported: X.509 signing and encryption (BinarySecurityToken), MTOM and SOAP-with-attachments, WS-Addressing, WSDL 2.0, and following wsdl:import. For a service that needs them, keep that connection on its current interface engine.
  • endpointUrl and wsdlUrl take https:// or http://, as Mirth's Web Service Sender and Generic REST do. Plain HTTP sends message content and credentials (WS-Security, basic or bearer) in clear text, so saving, validating or testing such a profile returns a warning, and a stronger one when wsSecurity is PasswordText. Use https:// for PHI. The SSRF checks apply to both.
  • Every XML the adapter reads (responses, WSDLs and the body it is about to send) is refused when it holds a DOCTYPE or entity declaration. Responses and WSDLs over 5 MB are refused: the engine stops reading as soon as the cap is passed.
  • A send is never redirected to another origin (a 307 or 308 there is refused), so the envelope and its WS-Security password never follow it.
  • A WSDL is cached for five minutes per profile and credentials (at most 100 entries). Test connection reads it fresh.
  • The engine refuses a URL that resolves to a private address unless the host is in SSRF_ALLOWLIST (see Environment variables).

Reference