4 Replies Latest reply on Jan 21, 2009 10:23 AM by dejanmr

    WSDL is correctly modified to use the configured https port

    rnagy

      Hi,

      JBoss issue: When an ear file is deployed and used with the https protocol, the WSDL is not correctly modified to use the configured port numbers.

      Baseline setup:

      - JBOSS version JBOSS-4.2.2.GA
      - Linux 2.6.9-55.0 ELsmp
      - EchoService is packaged as .ear and contains JMX MBean to manage configuration
      - The .ear contains EchoService wsdl
      - The endpoint url in the wsdl is expected to be dynamically rebuilt during deployment.

      HTTP deployment (works as expected)

      Test Procedure:
      - Install a clean instance of JBoss
      - Start JBoss "out of the box"
      - Deploy the ear file (echows.ear)
      (drop the file to the directory $JBOSS_HOME/server/default/deploy/)
      - Verify the echo web service (EchoService) is deployed using the JMX Management Console (http://localhost:8080/jmx-console/)
      - Use http://localhost:8080/jbossws/services to identify the Registered Service Endpoint Address
      - Result:
      http://localhost.localdomain:8080/services/echows/EchoServiceEndpoint?wsdl
      - Follow link to wsdl. Result:

      - <definitions targetNamespace="http://www.accenture.com/afmstt/echows">
       - <types>
       - <xs:schema elementFormDefault="qualified" targetNamespace="http://www.accenture.com/afmstt/echows" version="1.0">
       <xs:include schemaLocation="http://localhost.localdomain:8080/services/echows/EchoServiceEndpoint?wsdl&resource=echo.xsd"/>
       </xs:schema>
       </types>
       - <message name="echoResponse">
       <part element="ech:echoResponse" name="response"/>
       </message>
       - <message name="echoRequest">
       <part element="ech:echoRequest" name="request"/>
       - </message>
       - <portType name="EchoPort">
       - <operation name="echo">
       <input message="ech:echoRequest"/>
       <output message="ech:echoResponse"/>
       </operation>
       </portType>
       - <binding name="EchoHttpBinding" type="ech:EchoPort">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       - <operation name="echo">
       <soap:operation soapAction=""/>
       - <input>
       <soap:body use="literal"/>
       </input>
       - <output>
       <soap:body use="literal"/>
       </output>
       </operation>
       </binding>
       - <service name="EchoWebService">
       - <port binding="ech:EchoHttpBinding" name="EchoPort">
       <soap:address location="http://localhost.localdomain:8080/services/echows/EchoServiceEndpoint"/>
       </port>
       </service>
      </definitions>
      


      HTTPS deployment (does not work)
      - Install a clean instance of JBoss
      - Reconfigure JBoss to use SSL and port 8443
      - Copy keystore to $JBOSS_HOME/server/default/conf
      - Edit $JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml to enable SSL connector on port 8443 and define keystore file path and password
      - Comment out the default 8080 connector
      <!--Connector port="8080" address="${jboss.bind.address}"
       maxThreads="250" maxHttpHeaderSize="8192"
       emptySessionPath="true" protocol="HTTP/1.1"
       enableLookups="false" redirectPort="8443" acceptCount="100"
       connectionTimeout="20000" disableUploadTimeout="true" /-->
      
       <!-- Define a SSL HTTP/1.1 Connector on port 8443
       This connector uses the JSSE configuration, when using APR, the
       connector should be using the OpenSSL style configuration
       described in the APR documentation -->
      
       <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
       maxThreads="150" scheme="https" secure="true"
       clientAuth="false" sslProtocol="TLS" keystoreFile="${jboss.server.home.dir}/conf/test.jks"
       keystorePass="echotest"
       />
      

      - Start JBoss
      - Deploy the ear file (echows.ear)
      (drop the file to the directory $JBOSS_HOME/server/default/deploy/)
      - Verify the echo web service (EchoService) is deployed using the JMX Management Console (https://localhost:8443/jmx-console/)
      - Use https://localhost:8443/jbossws/services to identify the Registered Service Endpoint Address
      - Result:
      http://localhost.localdomain:8080/services/echows/EchoServiceEndpoint?wsdl
      wrong - should be https://localhost.localdomain::8443/services/echows/EchoServiceEndpoint?wsdl
      - Modify the link to the correct one:
      https://localhost.localdomain:8443/services/echows/EchoServiceEndpoint?wsdl to expected endpoint wsdl.

      - Result:
      - <definitions targetNamespace="http://www.accenture.com/afmstt/echows">
       - <types>
       - <xs:schema elementFormDefault="qualified" targetNamespace="http://www.accenture.com/afmstt/echows" version="1.0">
       <xs:include schemaLocation="https://localhost.localdomain:8443/services/echows/EchoServiceEndpoint?wsdl&resource=echo.xsd"/>
       </xs:schema>
       </types>
       - <message name="echoResponse">
       <part element="ech:echoResponse" name="response"/>
       </message>
       - <message name="echoRequest">
       <part element="ech:echoRequest" name="request"/>
       </message>
       - <portType name="EchoPort">
       - <operation name="echo">
       <input message="ech:echoRequest"/>
       <output message="ech:echoResponse"/>
       </operation>
       </portType>
       - <binding name="EchoHttpBinding" type="ech:EchoPort">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       - <operation name="echo">
       <soap:operation soapAction=""/>
       - <input>
       <soap:body use="literal"/>
       </input>
       - <output>
       <soap:body use="literal"/>
       </output>
       </operation>
       </binding>
       - <service name="EchoWebService">
       - <port binding="ech:EchoHttpBinding" name="EchoPort">
       <soap:address location="http://localhost.localdomain:8080/services/echows/EchoServiceEndpoint"/>
       </port>
       </service>
      </definitions>
      


      Note that the
      <xs:include schemaLocation="https://localhost.localdomain:8443/services/echows/EchoServiceEndpoint?wsdl&resource=echo.xsd"/>
      contains the updated https and 8443 (as expected).

      Note that the <soap:address location ... >> contains http and 8080.

      Again, it had been expected that the soap address location would have been updated to https and port 8443 as was correctly done for SchemaLocation.

      We are asking for either an explanation of what we did incorrectly or for an indication of when this issue can be expected to be fixed.

      If desired, we will open a Jira item if we are led to believe this is a suspected bug.

      Regard,
      --Rich.


        • 1. Re: WSDL is correctly modified to use the configured https p

          1) Title of topic should be "WSDL is NOT correctly modified to use the configured port numbers."

          2)Any news on this issue?

          I could see many people complaining about this, but no valid solution so far.

          • 2. Re: WSDL is correctly modified to use the configured https p

            Issue can be resolved using instructions on this page:http://jbossws.jboss.org/mediawiki/index.php?title=Secure_transport

            • 3. Re: WSDL is correctly modified to use the configured https p
              rnagy

              Thanks for the suggestion. We had the opportunity to test out the suggestion, but it is still setting the SOAP address location to be HTTP instead of HTTPS.

              We made the web.xml changes as described in the Wiki link -- this had no discernible impact on the generated SOAP address location in the WSDL. It still uses a regular HTTP address when generating the service URL.

              We did confirm that the new web.xml was being deployed, as this file was made available through the temporary expansion of the EAR file created when deploying the web service. Despite the change, we are still seeing an HTTP address being generated.

              Are there any other SSL configuration resources available that discuss this issue? We've scoured most of the web resources and haven't found anything, but are curious to see if there's anything else that may be helpful.

              --Rich.

              • 4. Re: WSDL is correctly modified to use the configured https p

                Annotations on EJB3 Web service class like this provided us with expected results - soap address was HTTPS, regardless of way of accessing WSDL (http/https). serverAuthPolicy is policy we have configured.

                @WebService(serviceName = "zzzzzz",
                 name="zzzzzz",
                 portName="zzzzzzPort",
                 targetNamespace ="http://www.zzzzzz.com/zzzzzz")
                @SecurityDomain("serverAuthPolicy")
                @PermitAll
                @WebContext(
                 authMethod="CLIENT-CERT",
                 transportGuarantee="CONFIDENTIAL",
                 contextRoot="zzzzContextRoot",
                 secureWSDLAccess=false
                )