sap
soap-as-promised
npm i soap-as-promised
sap

soap-as-promised

Convert all soap methods to promises. Inspired by soap-q.

by Ezequiel Rabinovich

1.26.0 (see all)License:MITTypeScript:Not Found
npm i soap-as-promised
Readme

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 {})

Downloads/wk

12.2K

GitHub Stars

35

LAST COMMIT

3yrs ago

MAINTAINERS

1

CONTRIBUTORS

6

OPEN ISSUES

2

OPEN PRs

13
VersionTagPublished
1.26.0
latest
4yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate