1

I have deployed a JAX-WS web service hosted in a JBoss 7.1.1. The webservice is acceded by a reverse proxy. To access the service from the public internet, it has to be done by the https protocol, but the communication between the reverse proxy and the JBoss is in http. So the host present in the wsdl file is http <soap:address location="http://example.com/WS"/>and it has to be <soap:address location="https://example.com/WS"/>.

The JBoss configuration is as follows:

modify-wsdl-addres = true


wsdl-host = jbossws.undefined.host

Here is the reference for the webservices configuration: https://docs.jboss.org/author/display/AS71/Web+services+configuration

But I can find where to force the protocol to be https in the soap addres.

  • Duplicate of http://stackoverflow.com/questions/32913933/jboss-7-1-jax-ws-webservice-behind-reverse-proxy-https-to-http-transformation? – shonky linux user Nov 02 '15 at 03:55

1 Answers1

0

The web and webservices subsystem configurations work together to provide the endpoint URL (and also URLs for xs:import statements).

In the webservices configuration add the following line

<wsdl-port>443</wsdl-port>

In the web configuration change the scheme of the http connector from http to https and add proxy-port="443"

So it will look like this:

<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="https" socket-binding="http" 
     secure="true" proxy-port="443"/>
     ...
</subsystem>
<subsystem xmlns="urn:jboss:domain:webservices:1.2">
    <modify-wsdl-address>true</modify-wsdl-address>
    <wsdl-host>jbossws.undefined.host</wsdl-host>
    <wsdl-port>443</wsdl-port>
    ...
</subsystem>
shonky linux user
  • 1,163
  • 10
  • 15