wsdl-next
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

wsdl-next

wsdl-next is a simple WSDL parcer for Node.js

npm version npm downloads npm downloads

Installing

Install with npm

npm install wsdl-next

Install with yarn

yarn add wsdl-next

Basic Usage

Create WSDL

WsdlNext.create(url: string)

wsdl = await WsdlNext.create('http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL');

getNamespaces

Returns a collection with all available namespaces

const result = await wsdl.getNamespaces();

getMethodParamsByName

Returns all response/request parameter for a given function name

{
  params: {
    params: xmldoc.XmlAttributes | xmldoc.XmlAttributes[], 
    name: string,
    namespace: string,
  },
  response: {
    params: xmldoc.XmlAttributes | xmldoc.XmlAttributes[],
    name: string,
    namespace: string,
  }
}
const result = await wsdl.getMethodParamsByName('CountryName');

getAllMethods:

Returns all in WSDL available methods

 const result = await wsdl.getAllMethods();

getXmlDataAsJson:

Returns data from the given XML as JSON

const result = WsdlNext.getXmlDataAsJson(xmlResponse);

Credits

wsdl-next was inspired by wsdlrdr, rewritten in TypeScript for further improvement.

License

wsdl-next is released under the MIT License. See the bundled LICENSE file for details.

Readme

Keywords

Package Sidebar

Install

npm i wsdl-next

Weekly Downloads

10

Version

1.0.7

License

MIT

Unpacked Size

38.1 kB

Total Files

8

Last publish

Collaborators

  • int1m