2014년 12월 2일 화요일

node-soap: TypeError: Object [object Object] has no method 'CreateMerchantAccount'

I'm new to Node.  From my nodejs code, I need to make a SOAP call.

I’m working on automating onboarding of a new merchant into the CreditCall system.  Nigel provided me with the necessary documentation last Friday and I started on the project today.
Here is my Node code snippet:
  var url = 'https://' + username + ':' + password + '@' + host +'/SOAP.asmx?wsdl';
  soap.createClient(url, function(err, client) {
    console.log(err);
    client.setSecurity(new soap.BasicAuthSecurity(username, password));
    client.CreateMerchantAccount(args, function(err, result) {                                                                                                        
      console.log(result);                                                                                                                                                                              
      console.log(err);                                                                                                                                                                                  
    });
  });
This gave the following error:TypeError: Object [object Object] has no method 'CreateMerchantAccount'
So clearly there is something wrong with the client.CreateMerchantAccount() line.
So I executed client.describe() and it returned:
{
    HttpServerWebService: {
        HttpServerWebServiceSoap: {
            Call: [ Object ],
            CallNameValue: [ Object ]
        },
        HttpServerWebServiceSoap12: {
            Call: [ Object ],
            CallNameValue: [ Object ]
        }
    }
}
This doesn't seem to give me enough clue about what the exact call should be.  Any ideas on what I'm doing wrong?



Which node-soap and soap version are you using?

From: nodejs@googlegroups.com [mailto:nodejs@googlegroups.comOn Behalf Of Fayez Asar
Sent: Saturday, November 29, 2014 8:13 PM
To: nodejs@googlegroups.com
Subject: [nodejs] node-soap: TypeError: Object [object Object] has no method 'CreateMerchantAccount'


댓글 없음:

댓글 쓰기