【发布时间】:2017-05-30 17:05:47
【问题描述】:
我们已经使用JAX-WS RI 2.1.6 in JDK 6 实现了webservice 调用,现在问题来了,当我们启用https webservice 调用停止到达服务器并且java 报告以下错误,
javax.xml.ws.WebServiceException: java.io.IOException: 异步 IO operation failed (3), reason: RC: 55 指定的网络资源 或设备不再可用。
现在我已经在SoapUI 中测试了这个,并且在那里收到了来自服务的响应。
查看了各种解决方案,它告诉我们提供超时设置,但似乎没有任何效果。
@WebEndpoint(name = "RulesSoap")
public RulesSoap getRulesSoap() {
((BindingProvider)super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class)).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 1000);
((BindingProvider)super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class)).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 1000);
return super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class);
}
为了提供信息,JAX-WS 实现遵循几行简单的代码,
当然,我们将所有必要的数据提交到各自的存根中,但我没有在这里提交,因为我们的 http 电话正在通过,
Rules rules = new Rules(new URL(url), new QName("urn:decision:Rules", "Rules"));
RulesSoap rulesSoap = rules.getRulesSoap();
CorticonResponse response = rulesSoap.processRequest(request);
注意:我们的应用服务器WebSphere Application Server和版本7.0.0.19
提前致谢。
【问题讨论】:
标签: java web-services soap websphere jax-ws