I am trying to consume a SOAP web service using node-soap module. However, I get 'Cannot parse response' error while calling one of the method of the web service.
Here is the implementation:
var soap = require('soap');
var url = 'http://myservice.com/MyService.svc?wsdl';
var args = {
Username: '***',
Password: '***'
};
soap.createClient(url, function(err, client) {
if (!err) {
client.MyService(args, function(err, response) {
if (!err) {
console.log('MyService response:', response);
} else {
console.log('Error in MyService:', err);
}
});
} else {
console.log('Error in createClient: ', err);
}
});
How can I fix this?
via zretscen
No comments:
Post a Comment