0.6.22 • Published 11 years ago

flyvictor-easysoap v0.6.22

Weekly downloads
3
License
MIT
Repository
github
Last release
11 years ago

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
    // optional timeout (milliseconds)
    timeout : 5000
};

//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);
        }
    );
0.6.22

11 years ago

0.6.21

11 years ago

0.6.20

11 years ago

0.6.19

11 years ago

0.6.18

11 years ago

0.6.17

11 years ago

0.6.16

11 years ago

0.6.15

11 years ago

0.6.14

11 years ago