我们公开了部署在负载均衡器后面的Tomcat实例上的webservice。 负载均衡器只允许HTTPS流量,但Jax-ws终点指向HTTP WSDL URL而不是HTTPS。当客户端访问Loadbalancer HTTPS URL时,它将被重定向到HTTP,并且由于HTTP上的流量被阻塞在LB上,客户端会因为WSDL无法访问而出现错误。JAX-WS Webservices,具有HTTPS端点URL而不是HTTP的负载均衡器
sun-jaxws.xml或webservice注释中是否存在指定告诉JAX-WS公开HTTPS url而不是HTTP的任何配置。
下面是我的配置:
sun-jaxws.xml:
<?xml version="1.0" encoding="UTF-8"?>
<endpoints
xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime'
version='2.0'>
<endpoint
name='/TestService'
implementation='com.test.service.TestServiceImpl'
url-pattern='/TestService' />
Annotation Config On WebService Impl class:
@WebService(serviceName="TestServiceImpl",
portName="TestService",
endpointInterface = "com.test.service.TestService",
targetNamespace="http://test.com"
)
@HandlerChain(file = "handlers.xml")
@MTOM
@XmlAccessorType(XmlAccessType.PROPERTY)
public class TestServiceImpl implements TestService{
//Implementation
}
这将是巨大的,如果有些能在正确的方向指向我。
请阅读注释过在不同场景解决方案
您是否尝试过指向SSL版本的WSDL,而不是基于http:// server:port/web_service?WSDL创建客户端,请使用https:// server:ssl_port/web_service?WSDL ? WSDL的SSL版本应该在部署WS时自动创建(如果配置了服务器SSL)。 – Xargos 2013-03-25 07:57:23
我指向LoadBalancer的HTTPS url,但正如您在上图中所看到的,WSDL url指向HTTP – John 2013-03-25 13:41:41