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

easysoap

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easysoap

A simple to use Soap Client for Node.js

  • 0.6.12
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

What ?

easySoap is a WSDL SoapClient for Node.js.

How to get ?

npm install easysoap

How to use ?

var easySoap    = require('easysoap');

//soap client params
var clientParams = {

    //set soap connection data (mandatory values)
    host    : 'www.sample.com',
    path    : '/dir/soap',
    wsdl    : '/dir/wsdl',

    //set soap header (optional)
    header  : [{
        'name'      : 'item_name',
        'value'     : 'item_value',
        'namespace' : 'item_namespace'
    }]
};

//soap client options
var clientOptions = {
    secure : true/false //is https or http
};

//create new soap client
var SoapClient = new easySoap.Client(clientParams, clientOptions);

    SoapClient.call({
        'method'    : 'soapMethod2',

        //optional namespace for call
        'namespace' : 'soapMethod2Namespace',

        //optional headers for call
        'headers'       : {
            'Cookie' : 'test'
        },

        'params' : {

            //default
            'test'  : 2,

            //list of items
            'test1' : ['item1', 'item2']

            //if attributes needed
            'test2' : {

                '_attributes'   : {
                    'id' : 1
                },
                '_value'        : 'test1data'
            }
        }
    })
    .done(

        //success
        function(res) {
            res.data        // response data as array
            res.response    // full response data (including xml)
            res.header      // response header
        },

        //method fail
        function(err) {
            console.log(err);
        }
    );

Keywords

FAQs

Package last updated on 13 Mar 2014

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