0.2.5 • Published 2 months ago

surfactant v0.2.5

Weekly downloads
12
License
MIT
Repository
github
Last release
2 months ago

🧼 surfactant

Transforming soap describe into typescript interface.

If the result don't fit your needs, please fire an issue, thanks!

The detail return types was in https://github.com/vpulim/node-soap#clientmethodasyncargs---call-method-on-the-soap-service

Basic Usage:

$ npx surfactant ./calculator.wsdl > calculator.wsdl.ts
# or
$ npx surfactant 'http://www.dneonline.com/calculator.asmx?WSDL' > calculator.wsdl.ts

# if you need prettify
$ npx surfactant ./calculator.wsdl | npx prettier --parser typescript  > calculator.wsdl.ts

// In your client code
import * as soap from 'soap'
import { ClientAsync } from 'calculator.wsdl'
(async () => {
  const client = (await soap.createClientAsync('http://www.dneonline.com/calculator.asmx?WSDL')) as soap.client & ClientAsync;
  const [ret] = await client.AddAsync({ intA:1, intB:2 });
  console.log(ret) // { AddResult: 3 }
})()
0.2.5

2 months ago

0.2.4

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago