warseph / soap-as-promised

Convert all soap methods to promises. Inspired by soap-q.
MIT License
37 stars 14 forks source link

⚠️ This repo is archived and no longer mantained ⚠️

This library was created when existing libraries, like node-soap, were outdated and lacked support for promises. However, times have changed, and first-class promise support has been introduced.

Due to the advancements and lack of updates to this library, it is no longer recommended for use. For the best results, please use the *Async methods in the original library.

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: