我使用node.js soap发送肥皂请求,但我一直在收到错误。如何使用nodejs肥皂创建wsdl soap请求
在了SoapUI我的XML看起来是这样的:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:acl="http://schemas.datacontract.org/2004/07/Acl.WcfService.Model">
<soapenv:Header/>
<soapenv:Body>
<tem:GetOrder>
<!--Optional:-->
<tem:args>
<!--Optional:-->
<acl:ApiKey></acl:ApiKey>
<!--Optional:-->
<acl:OrderId></acl:OrderId>
</tem:args>
</tem:GetOrder>
</soapenv:Body>
</soapenv:Envelope>
这里是我的代码:
var args = {
'args': {
'ApiKey' : '***',
'OrderId' : '***'
}
};
soap.createClient(wsdlURL, function (err, soapClient) {
soapClient.GetOrder(args, function (err, result) {
//the result goes here
if (err) {
console.log(err);
return;
}
console.log(result);
});
});
以下是错误:
一个:InternalServiceFault 坏API金钥
请有人帮我解决这个问题吗?
忘了提,我使用的是ApiKey在SoapUI上工作。 –