【问题标题】:Node js SOAP library trouble with the word DateAdvance带有DateAdvance这个词的Node js SOAP库问题
【发布时间】:2015-12-23 23:03:27
【问题描述】:

我正在使用这个库节点 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这个词。

谢谢。

【问题讨论】:

    标签: node.js soap


    【解决方案1】:

    我是个白痴,在 SOAP 服务的文档中说该字段是整数,我需要把它放在不带双引号的地方。给您添麻烦了。

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

    【讨论】:

      猜你喜欢
      • 2020-04-15
      • 1970-01-01
      • 2011-08-29
      • 1970-01-01
      • 2018-12-16
      • 1970-01-01
      • 1970-01-01
      • 2020-11-12
      • 1970-01-01
      相关资源
      最近更新 更多