我正在尝试使用Node JS作为开发服务器在应用程序中实现Soap API。我使用以下代码。但我收到一条错误消息。
var soap = require('soap');
var url = 'https://testwebservices.creditsafe.com/GlobalData/1.3/MainServiceBasic.svc/meta?wsdl';
var auth = "Basic " + new Buffer("*****" + ":" + "*****").toString("base64");
var args = { countries: 'US' };
soap.createClient(url, { wsdl_headers: {Authorization: auth} }, function(err, client) {
if (err) {
console.log(err);
}else{
client.FindCompanies(args ,function(err, result)
{
if(err){
throw err
client.describe(); // here i am getting error message
}else{
console.log(result);
}
});
}
});