[jboss-user] [JBossWS] - WSDL is correctly modified to use the configured https port

rnagy do-not-reply at jboss.com
Mon May 12 17:08:34 EDT 2008


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.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150192#4150192

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150192



More information about the jboss-user mailing list