soap-as-promised

1.26.0 • Public • Published

soap-as-promised Circle CI

Convert all node-soap methods to promises. Inspired by soap-q, but it doesn't add any suffix to methods, the client has the same interface as exposed by the original soap module.

Installation

npm install soap-as-promised

Usage

const soap = require('soap-as-promised');
 
soap.createClient('http://example.org/wsdl')
    .then((client) => client.myAwesomeSoapMethod({param: true}))
    .then((result) => console.log(`The result was: ${result}`))
    .catch((error) => console.error(`There was an error! ${error}`));

Important!

There are a couple of things that behave different from the original soap client:

  • Null responses return an object with like this {return: null, _rawResponse: "<SOAP RETURNED BY THE SERVICE>"}
  • String responses return an object like this: {return: 'String response', _rawResponse: "<SOAP RETURNED BY THE SERVICE>"}
  • When specifying endpoint as an extra parameter you need to pass the options parameter (at least null or {})

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.26.02,703latest

Version History

VersionDownloads (Last 7 Days)Published
1.26.02,703
1.14.30
1.23.086
1.19.11
1.19.0344
1.16.00
1.15.10
1.15.00
1.14.20
1.14.10
1.14.00
1.6.05
1.5.01
1.4.10
1.4.00
1.3.00
1.2.10
1.2.00
1.1.10
1.1.00
1.0.30
1.0.20
1.0.00

Package Sidebar

Install

npm i soap-as-promised

Weekly Downloads

3,140

Version

1.26.0

License

MIT

Unpacked Size

15.7 kB

Total Files

19

Last publish

Collaborators

  • warseph