Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wsdl-to-rest

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wsdl-to-rest

WSDL Parser

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

wsdl-to-rest

WSDL Parser

Use this library to:

  • Parse WSDL functions and types
  • Convert a JSON object (from a REST api or any other source) to a SOAP message
  • Convert a SOAP response XML to the same JSON format

How to use

npm install wsdl-to-rest

const parser = require('wsdl-to-rest');
const fs = require('fs');

fs.readFile('LocalService.wsdl', 'utf8', function (err, wsdl) {

    var methods = parser.getFunctions(wsdl);
    console.log(methods);

    var method = parser.getFunction(wsdl, "GetStatus");
    console.log(method);

    var requestBody = {
        SimpleNode: 0,
        ComplexNode: {
          nodeAttribute: 0.55,
          InnerElement: 'abc'
        }
        Collection: {
          collectionAttribute: 'x',
          Item: [
            { attribute: 1, Child: 2 },
            { attribute: 3, Child: 4 }
          ]
        }
    };
    var xml = parser.requestBody(wsdl, "GetStatus", requestBody, true);
    console.log(xml);
    
});

Tests

Unit testing in private repositories

Keywords

FAQs

Package last updated on 03 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc