How to consume WCF soap web service in node.js

I tried lot of examples available in the net using node module wcf.js. But could not get any appropriate result. I'm using the below url

https://webservice.kareo.com/services/soap/2.1/KareoServices.svc?wsdl

Any one who can explain me with the help of code will be really helpful. I want to know how to access the wsdl in node.js

Thanks.

You don't have that many options.

You'll probably want to use one of:

  • node-soap
  • douche
  • soapjs

i tried node-soap to get INR USD rate with following code.

app.get('/getcurr', function(req, res) {
var soap = require('soap');
var args = {FromCurrency: 'USD', ToCurrency: 'INR'};
var url = "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL";
soap.createClient(url, function(err, client) {
    client.ConversionRate(args, function(err, result) {
        console.log(result);
    });
  });
});

Code Project has got a neat sample which uses wcf.js for which api's are wcf like so no need to learn new paradigm.

You'll probably want to use one of:

node-soap - https://github.com/milewise/node-soap

douche - https://github.com/kr1sp1n/douche

soapjs - https://github.com/jmoyers/soapjs

See question already existing about it here -> Node.js: how to consume SOAP XML web service

Maybe this can help you: Edge.js WCF

And all of it: Edge.js

I think that an alternative would be to:

Yes, this is a rather dirty and low level approach but it should work without problems