I have a requirement to call WCF dotnet webservice from node js , Can any of you suggest the best module avaiable now.
Just some references should be enough
Thanks
If this is a simple service (simple xml, no advanced message level security) then I recommend to just send the raw Xml using request.
If the xml is complex then you can use node-soap.
If there is message-level security use wcf.js.
If the WCF service has an endpoint that returns JSON you should be able to hit it with a basic node.js HTTP request.
Below is a simple sample to execute make an HTTP request from node. This should get you started. Replace "www.google.com" with the name of the server where the WCF server lives and update the path to point to the svc file:
var http = require('http');
var options = {
hostname: 'www.google.com',
port: 80,
path: '/',
method: 'GET'
};
var req = http.request(options, function(res) {
console.log('STATUS: ' + res.statusCode);
console.log('HEADERS: ' + JSON.stringify(res.headers));
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log('CHUNK: ' + chunk);
});
res.on('end', function () {
console.log('DONE');
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
req.end();