节点js SOAP库与DateAdvance这个词有关

时间:2015-12-23 23:03:28

标签: node.js soap

我正在使用此库节点js https://github.com/vpulim/node-soap。当我尝试给客户端args时,如果参数是DateAdvance:'“给出以下错误:

Error: soap: Client: Server was unable to read request. ---> There is an error in XML document (1, 467). ---> Input string was not in a correct format

这是代码的一部分

var soap = require ('soap');
   var url = 'https://elstestserver.endicia.com/LabelService/EwsLabelService.asmx?wsdl';
   var args = {LabelRequest: {DateAdvance: ""}};
   soap.createClient (url, function (err, client) {
       client.MyFunction (args, function (err, result) {
           console.log (result);
       });
   });

只有DateAdvance这个词。

谢谢。

1 个答案:

答案 0 :(得分:0)

我是一个白痴,在SOAP服务的文档中说该字段是整数,我需要把它放在没有双引号的地方。对不起,麻烦。

var args = {LabelRequest: {DateAdvance: 0}};