如何通过节点肥皂获得肥皂内部/嵌套功能

时间:2020-09-24 07:48:22

标签: node.js xml soap

下面是XML

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <dem:remite>
         <dem:dataBody>
            <dem:name></dem:name>
         </dem:dataBody>
      </dem:remit>
   </soapenv:Body>
</soapenv:Envelope>

我已经使用节点肥皂来传递数据

下面是我的编码

var body = {
    dataBody: {
      name: "Alex"
    }
};

    soap.createClient("/MyService.svc/basic", function (err, client) {
        client.remite(body, function (err, result) {
            if (err) {
                console.log(err)
            }
            else {
                console.log(result)
            }
        });
    });

但我收到此错误->对象引用未设置为对象的实例

0 个答案:

没有答案
相关问题