We have exposed a webservice deployed on a Tomcat instance which is behind the Load Balancer. The Load-Balancer only allows the HTTPS traffic but the Jax-ws End-point points to the HTTP WSDL url instead of the HTTPS. When the Client access the Loadbalancer HTTPS URL it gets re-directed to HTTP and since the traffic is HTTP is blocked on LB, The client gets an error as WSDL is Inaccessible.
Is there any configuration in the sun-jaxws.xml or the webservice annotation to specify to tell the JAX-WS to expose the HTTPS url instead of HTTP.
Below is my Configuration:
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
}
It would be great if some can point me in the right direction.
Please Read the Comments too for the Solution in different scenarios