1 Reply Latest reply on Apr 26, 2012 2:48 PM by dastraub

    Problem with generated WSDL containing wsdl:import

    sscpeter

      We created a web application and deployed it on JBOSS 7.1.1 and in our development environment it works great. Now we face a problem in the real world environment. The generated WSDL contains a wsdl:import with the actual address of the server. Something like this:

       

      <wsdl:import location="http://ourserver:8080/ourapplication/OurService?wsdl=OurServicePortType.wsdl" namespace="http://net.ourcompany.ourservice.service">

          </wsdl:import>

       

      The problem now is, that for security reasons the port 8080 is closed to access from outside and the wsdl is reached via a proxy pass to an URL without the port number like this:

       

      http://ourcompany.net/services/OurService?wsdl

       

      For the WSDL itself that works just fine, but the import fails because it tries to contact port 8080 directly. So my question now is: Is there a way to tell JBOSS to either use the "outside" URL (http://ourcompany/services/) for the import WSDL as well or to generate a WSDL containing the complete webservice information in one WSDL file without an import?

        • 1. Re: Problem with generated WSDL containing wsdl:import
          dastraub

          We solved this problem with this setting in the standalone/domain.xml :

           

            <subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host">

                      <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" proxy-name="YOUR_PROXY_HOST"  proxy-port="YOUR_PROXY_HOST_PORT"  />

           

            <subsystem xmlns="urn:jboss:domain:webservices:1.1">

                      <modify-wsdl-address>true</modify-wsdl-address>

                      <wsdl-host>YOUR_PROXY_HOST</wsdl-host>

                       <wsdl-port>YOUR_PROXY_HOST_PORT</wsdl-port>

           

           

          Not only the schema import has a incorrect address, but also the port type (so loadbalancing etc. doesn't work)

          With this setting we get the correct wsdl like this :

             ...

           

            <types>

            <xsd:schema>

                <xsd:import namespace="..." schemaLocation="YOUR_PROXY_HOST:YOUR_PROXY_HOST_PORT" />

              <xsd:schema>

            </types>

            ...

          <service name="...">

             port binding="..." name="....">

               <soap:address location="YOUR_PROXY_HOST:YOUR_PROXY_HOST_PORT" />

             </port>

          <service>

            ....