我使用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上工作。 –