Skip to content

What This Adds In Cloud Code

  • Savon-backed SOAP client from Cloud Code.
  • Async call pattern via Nimbu.Future bridge.
  • Useful for legacy ERP/CRM integrations that still expose SOAP.

Quick Start

js
const Soap = require('soap');
const client = Soap.client('https://example.com/service?wsdl');

API

FunctionParamsReturnsNotes
client(wsdl, options)WSDL URL + client optionsSoapClientClient instances are cached by WSDL+options.
SoapClient.call(operation, message, options?)operation name + payloadPromise-likeUses Nimbu.Future; returns parsed body by default.

call options usually include operation-specific fields; set raw: true to get raw XML.

Practical Example

js
const Soap = require('soap');

const client = Soap.client('https://partner.example.com/ws/users?wsdl', {
  open_timeout: 15,
  read_timeout: 15
});

const result = await client.call('GetUserByEmail', { email: request.params.email });

Failure Modes & Gotchas

  • Invalid SSL options/certs can fail client initialization.
  • Keep operation payload shape aligned with WSDL contract.