Carlo Bonamico
2012-09-28 08:03:54 UTC
Carlo Bonamico [https://community.jboss.org/people/carlo.bonamico] created the discussion
"Is it possible to configure JAX-WS services with an external descriptor?"
To view the discussion, visit: https://community.jboss.org/message/762155#762155
--------------------------------------------------------------
Hi,
jbossws.deployer/META-INF/jboss-beans.xml
<bean name="ServiceEndpointManager" class="org.jboss.ws.server.ServiceEndpointManager">
     <!--
       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 AlwaysModifySOAPAddress is true.
       If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
     -->
     <property name="webServiceHost">www.external.domain.com</property>
     <property name="webServiceSecurePort">443</property>
     <property name="alwaysModifySOAPAddress">true</property>
     ...
   </bean>
In this way the resulting url exposed in the wsdl is https://www.external.domain.com/path/ https://www.external.domain.com/path/... which is what I needed to achieve.
Reply to this message by going to Community
[https://community.jboss.org/message/762155#762155]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
"Is it possible to configure JAX-WS services with an external descriptor?"
To view the discussion, visit: https://community.jboss.org/message/762155#762155
--------------------------------------------------------------
Hi,
Something else you might want to try is setting your soap:address to something like " https://replace-me/ https://REPLACE-ME", that should force the https protocol to be use in the soap:address when rewriting it. I think this probably has the side effect of overwriting the webServicePort you might want to >specify though.
Then enabled rewriting of the address injbossws.deployer/META-INF/jboss-beans.xml
<bean name="ServiceEndpointManager" class="org.jboss.ws.server.ServiceEndpointManager">
     <!--
       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 AlwaysModifySOAPAddress is true.
       If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
     -->
     <property name="webServiceHost">www.external.domain.com</property>
     <property name="webServiceSecurePort">443</property>
     <property name="alwaysModifySOAPAddress">true</property>
     ...
   </bean>
In this way the resulting url exposed in the wsdl is https://www.external.domain.com/path/ https://www.external.domain.com/path/... which is what I needed to achieve.
If nothing of this helps, please create a feature request jira. We might think about adding another configuration option (webServiceProtocol) and achieve what you want throught that.
--------------------------------------------------------------Reply to this message by going to Community
[https://community.jboss.org/message/762155#762155]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]