1.0.3 • Published 6 years ago

soap-client-node v1.0.3

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

soap-client-node

Soap client support https / http wsdl

Install with npm

  npm install soap-client-node

Module

urls

keyvalue
url'https://xxxx?wsdl' OR 'http://xxxx?wsdl' ( This can be http, '?wsdl is required' )
xmlns'http://xxxxxxx.com/' (XML Namespaces - The xmlns Attribute)

methodParams

keyvalue
type'POST' OR 'GET'
method'example' //method to call

params

keyvalue
xxxxx'xxxxxx'
xxxxx'xxxxxx'

Example

var client = require('soap-client-node');

var urls = {
  url: 'https://xxxxxxx?wsdl', 
  xmlns: 'http://xxxxxxx.com/'
}

var methodParams = {
  type: 'POST', 
  method: 'example' 
}

var params = { 
  username: 'userxxxx',
  password: 'passxxxx',
  x: 'xxxxx',
  y: 'yyyyy'
}

client.createClient(urls, methodParams, params, function(err, result){
  if(err){
    console.log('>>>>' + err + '<<<<');
  }else{
    console.log(result, 'in json')
    console.log(JSON.stringify(result), 'result')
  }
});

Body request

  
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://xxxxxxx.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:example>
         <username>userxxxx</username>
         <password>passxxxx</password>
         <x>xxxxx</x>
         <y>yyyyy</y>
      </ws:example>
   </soapenv:Body>
</soapenv:Envelope>
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago