我正在尝试在我的本地 NodeJs 应用程序中创建一个 Soap 客户端来调用我们的旧系统 (Java),该系统暴露了 JAX-WS Web 服务 (SOAP)。此 Web 服务部署在 Tomcat EC2 实例上。ELB 仅接受端口 443 上的流量,并将调用定向到侦听端口:80 上的 EC2 实例。
如果我在遗留 Web 应用程序上公开 RestAPI 端点并使用“请求”模块,则 nodejs 代码能够调用 Rest-Endpoint。
如果它是一个肥皂网络服务,那么我会收到以下错误。如果你们能引导我朝着正确的方向前进,那就太好了。
我总是收到以下错误:
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 }
下面是我的肥皂客户端代码:使用节点模块: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) {
}
提前致谢。