将Js节点作为服务器http来使用外部Web服务

我想要安装Node Js以在SOAP中使用外部Web服务。 这是架构:

|Webshere application| ---HTTP---> |Node Js| ----HTTPS--> ||External Web Service||

这是我正在做的脚本:

 var http = require('http'); var httpntlm = require('httpntlm'); var options = { url: "https://serverexterno/WebServiceSOAP?wsdl" } const server = http.createServer( (req, res) => { let body = ''; let headers = req.headers let as400Response =''; req.setEncoding('ascii'); req.on('data', (chunk) => { body += chunk; }); httpntlm.post(options, function (err, resp) { console.log (resp); if(err) { return console.log(err); } console.log( resp.headers); console.log("resp.body" + resp.body); body = resp.body; res.statusCode = 200; return res.end(resp.body); }); console.log ('Finish ....'); } catch (er) { res.statusCode = 400; return res.end(`error: ${er.message}`); } }); }); server.listen(8084, function(){ console.log("Server listening on: http://localhost:%s", 8087); }); 

但是,我没有收到预期的结果。 我在html中收到消息“Hello!这是一个Axis2 Web服务!”。 似乎web服务没有执行。

有人可以帮我,为什么得到这个错误?