node-soap icon indicating copy to clipboard operation
node-soap copied to clipboard

[Error: ns1:Client: No such operation 'loginCmsRequest': [object Object]]

Open juan77 opened this issue 14 years ago • 2 comments

Hi, I’m trying to connect to a web services from https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl

My code is very simple:

  var url = 'https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl';

  soap.createClient(url, function(err, client) {
    var args = [{'in0': 'value'}];

    client.loginCms(args, function(err, result) {
      if (err) return console.log(err);          
      //console.log('connected....');
    });
  });

But always causes the following error in console:

[Error: ns1:Client: No such operation 'loginCmsRequest': [object Object]]

And I don’t know if is a problem of my code or if the wsdl document isn’t not supported by current version of node-soap, any guiding is appreciated, because if isn't supported I would like to help to implement the missing requirements, because I really need it. Hope that is my code :D

juan77 avatar Mar 28 '12 16:03 juan77

This was due to this WSDL containing multiple schema elements inside a types element. Grab the latest version of node-soap and your sample code should now work (you still get an error but I think that's due to an invalid value for in0).

milewise avatar Mar 29 '12 04:03 milewise

Hi milewise!! WORKED LIKE A CHARM!

Million thx! node-soap rules!

juan77 avatar Mar 29 '12 15:03 juan77