5 Replies Latest reply on Jun 24, 2010 11:11 AM by davidl360

    Using WS behing a reverse proxy

    bblasko

      We host our web services behind a reverse proxy which serves as our security and HTTPS termination. Everything works OK with the exception of the dynamic WSDL generation. Since the URL used to access the WS service is not the same as the actual URL of the JBoss service, the WSDL soap:address is incorrect.

      Is there a way to override the webServiceHost and webServicePort at the application instance vs the entire container?

      Example

      https://proxyhost/webcxta/service1?wsdl maps to http://jbossserver:8080/webcxta/service1?wsdl
      https://proxyhost/webcxtb/service2?wsdl maps to
      http://jbossserver:8080/webcxtb/service2?wsdl

        • 1. Re: Using WS behing a reverse proxy
          richard_opalka
          • 2. Re: Using WS behing a reverse proxy
            bblasko

            If you set webServiceHost it applies to all web services hosted in the container. I need to be able to override the host for a specific web context within the container.

            In my example, I have two web context webcxta and webcxtb both are hosted on the same jboss container. What I need is to have the same fucntionality as provided by webServiceHost property but at the individual web app level.

            • 3. Re: Using WS behing a reverse proxy
              richard_opalka

              Copy/Paste from the configuration file you were modifying:
              ---

              The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
               element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
              
               If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
               If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.

              ---
              Did you try to set up <soap:address> manually in WSDL and set modifySOAPAddress to false?

              • 4. Re: Using WS behing a reverse proxy
                bblasko

                Yes, that approach will work and is a potential workaround so long as you have static WSDL. I am using annotated POJO for the web services so having the WSDL dynamically generated on deployment is preferred.

                What I really need is the ability to specify the host override in the web.xml or webservices.xml.


                • 5. Re: Using WS behing a reverse proxy
                  davidl360

                  What was the solution to this, I can get my host correct, but getting the url to have https instead of http is just not happening.  What does it take to get this to work when you are behind a reverse proxy doing ssl offloading?