wsdl-next
v1.0.7
Published
Simple WSDL parser
Downloads
25
Readme
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.