2

I'm fairly new to web services and I need to consume one from a soap service.

var soap = require('soap');
var url = 'http://remoteweb/ws/service1.asmx?wsdl';
var args = {
    id: '2010-xxxxx',
    user: 'aaa',
    pass: 'bbb'
};
soap.createClient(url, function(err, client){
    if(err) throw err;
    client.remoteMethod(args, function(err,result){
         console.log(result);
    });
});

At first I get Error: Invalid WSDL URL: http://remoteweb/ws/service1.asmx?wsdl Code: 401 and then the Responde Body as the result.
If I go to the url http://remoteweb/ws/service1.asmx?wsdl everything's fine I get to see the composure of the file and there I confirm that remoteMethod awaits those 3 parameters.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Daniel Sh.
  • 2,078
  • 5
  • 42
  • 67

0 Answers0