首页 文章

Nodejs Soap Client - ETIMEDOUT到JAX-WS Soap webservice

提问于
浏览
0

我正在尝试在我的本地NodeJs应用程序中创建一个Soap Client来调用我们的Legacy系统(Java),它暴露了JAX-WS webservices(SOAP) . 此Web服务部署在Tomcat EC2实例上 . ELB仅接受端口443上的流量,并将呼叫定向到端口:80上的EC2实例侦听 .

如果我在遗留Web应用程序上公开RestAPI endpoints 并使用“请求”模块,则nodejs代码可以调用Rest-Endpoint .

如果它是一个soap webservice然后我得到以下错误 . 如果你们能指导我朝着正确的方向前进,真的很棒 .

我总是得到以下错误:

Error: connect ETIMEDOUT xx.xx.xxx.xxx:80
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
  code: 'ETIMEDOUT',
  errno: 'ETIMEDOUT',
  syscall: 'connect',
  address: 'xx.xx.xxx.xxx',
  port: 80 }

下面是我的soap-client代码:使用node-module:https://github.com/vpulim/node-soap

var soap = require('soap');
var path = require("path");
            var options = {
                ignoredNamespaces: {
                    namespaces: ['targetNSAlias']
                },
                timeout: 120000,
                port:443
            };

           soap.createClient("https://hostname/service?WSDL", options,function(err, client) {

    }

提前致谢 .

1 回答

  • 1

    地址可能不正确,我建议您验证连接信息或尝试使用SoapUI验证一切正常 .

相关问题