Errro创建了一个肥皂客户端

时间:2018-09-15 13:38:32

标签: javascript node.js soap

请帮助我

我想消耗一块肥皂。我使用节点js和肥皂

这是代码

soap.createClientAsync(url,wsdlOptions).then((client)=>{
                                    client.addHttpHeader('Content-Type','text/xml; charset=utf-8');
                                    client.addHttpHeader('SOAPAction','http://tempuri.org/ConvertSignDocument');
                                    client.setSOAPAction("http://tempuri.org/ConvertSignDocument");
                                    //client.on("POS")                          
                                    client.POSTAsync(args).then((result) =>{
                                        console.log(result);
                                        console.log(rawResponse);
                                        console.log(soapHeader);
                                        console.log(rawRequest);
                                    }).catch((err)=>{
                                        console.log(err);
                                    });
                                }).catch((err)=>{
                                    console.log(err);
                                });

这是错误

  

Blockquote TypeError:client.POSTAsync不是函数           在soap.createClientAsync.then(D:\ Web \ FactElect \ route \ inicial.js:155:15)           在tryCatcher(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ util.js:16:23)           在Promise._settlePromiseFromHandler(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:512:31)           在Promise._settlePromise(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:569:18)           在Promise._settlePromise0(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:614:10)           在Promise._settlePromises(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:694:18)           在_drainQueueStep(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:138:12)           在_drainQueue(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:131:9)           在Async._drainQueues(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:147:5)           在Instant.Async.drainQueues(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:17:14)           在runCallback(timers.js:810:20)           在tryOnImmediate(timers.js:768:5)           在processImmediate [as _immediateCallback](timers.js:745:5)       Envio de factura numero 1 a las Sat Sep 15 2018 GMT-0500(Horaest.Pacífico,Sudamérica)       TypeError:client.POSTAsync不是函数           在soap.createClientAsync.then(D:\ Web \ FactElect \ route \ inicial.js:155:15)           在tryCatcher(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ util.js:16:23)           在Promise._settlePromiseFromHandler(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:512:31)           在Promise._settlePromise(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:569:18)           在Promise._settlePromise0(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:614:10)           在Promise._settlePromises(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ promise.js:694:18)           在_drainQueueStep(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:138:12)           在_drainQueue(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:131:9)           在Async._drainQueues(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:147:5)           在Instant.Async.drainQueues(D:\ Web \ FactElect \ node_modules \ bluebird \ js \ release \ async.js:17:14)           在runCallback(timers.js:810:20)           在tryOnImmediate(timers.js:768:5)           在processImmediate [as _immediateCallback](timers.js:745:5)

我不明白为什么它不起作用。

谢谢。

0 个答案:

没有答案