我尝试使用本地 WSDL 文件来使用 Web 服务。我使用过两种WDSL。
- GDSQueue.wsdl
- GDSQueueAbstract.wsdl
第一个,GDSQueue.wsdl 导入 GDSQueueAbstract.wsdl。但是在node-soap中,当我使用client.describe()
时,它显示以下输出:
{ GdsQueueService:
{ GdsQueueCountServicePort: {},
GdsQueueListServicePort: {},
GdsQueuePlaceServicePort: {},
GdsEnterQueueServicePort: {},
GdsExitQueueServicePort: {},
GdsNextOnQueueServicePort: {},
GdsClearQueueServicePort: {},
GdsQueueAgentListServicePort: {} } }
现在要调用服务,我应该使用
GdsQueueService.GdsQueueCountServicePort.service(params , callback)
但是没有任何服务方法来调用此网络服务。结果,我无法理解为什么node-soap不创建服务方法。
最佳答案
问题不清楚,但是您可以验证调用的语法,因为您应该像这样使用它
soap.createClient(urlOfTheWebService, function (err, client)
{
client.GdsQueueService.GdsQueueCountServicePort(parameter,function(err, result)
{
//do something with the result or the error received
console.log(result);
});
}
);
没有理由在通话结束时添加 .service
关于node.js - Node-soap client.describe()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23978199/