# soap-as-promised

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

Latest version **1.26.0** (published 2019-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install soap-as-promised
pnpm add soap-as-promised
yarn add soap-as-promised
bun add soap-as-promised
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.26.0 |
| Published | 2019-02-26 |
| First published | 2015-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Ezequiel Rabinovich |
| Maintainers | warseph |
| Keywords | soap, promise |

## Links

- npm: https://www.npmjs.com/package/soap-as-promised
- Repository: https://github.com/warseph/soap-as-promised
- Issues: https://github.com/warseph/soap-as-promised/issues
- npm.io page: https://npm.io/package/soap-as-promised

## Dependencies (1)

- [soap](https://npm.io/package/soap.md) ^0.26.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.26.0 (latest) — 2019-02-26
- 1.14.3 — 2018-08-17
- 1.23.0 — 2017-11-09
- 1.19.1 — 2017-05-18
- 1.19.0 — 2017-04-13
- 1.16.0 — 2016-07-14
- 1.15.1 — 2016-05-20
- 1.15.0 — 2016-05-20
- 1.14.2 — 2016-04-22
- 1.14.1 — 2016-04-22
- 1.14.0 — 2016-04-22
- 1.6.0 — 2016-01-26
- 1.5.0 — 2015-10-29
- 1.4.1 — 2015-10-29
- 1.4.0 — 2015-10-29
- … 8 more at https://npm.io/package/soap-as-promised/versions

## README

# soap-as-promised [![Circle CI](https://circleci.com/gh/warseph/soap-as-promised.svg?style=svg)](https://circleci.com/gh/warseph/soap-as-promised)

Convert all [node-soap](https://github.com/vpulim/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
```js
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 `{}`)

---
_Source: https://npm.io/package/soap-as-promised · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
