<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Is it possible to configure JAX-WS services with an external descriptor?
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/carlo.bonamico">Carlo Bonamico</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/762155#762155">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi, </p><p> I had to manage a situation similar to <a class="jive-link-thread-small" href="https://community.jboss.org/thread/146575">https://community.jboss.org/thread/146575</a><span> where a JBoss instance publishes a JaxWs service (annotated with @WebService) on plain </span><a class="jive-link-external-small" href="http://" target="_blank">http://</a><span> on an internal network, and an external Apache httpd server with mod_proxy or mod_jk re-publishes the service over </span><a class="jive-link-external-small" href="https://" target="_blank">https://</a><span> on the outside. The environment is JBoss-WS on JBoss AS 5.1.0.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> In order to be able to rewrite the soap:address field in the WSDL I successfully followed @asoldano advice:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">>Something else you might want to try is setting your soap:address to something like "<a class="jive-link-external-small" href="https://replace-me/" style="color: #355491;" target="_blank">https://REPLACE-ME</a>", 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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Then enabled rewriting of the address in </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;">jbossws.deployer/META-INF/jboss-beans.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="background-color: #ffffff; font-size: 12px; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;"><bean name="ServiceEndpointManager" class="org.jboss.ws.server.ServiceEndpointManager"><br/>      <!--<br/>        The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address><br/>        element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.<br/>      <br/>        If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless AlwaysModifySOAPAddress is true.<br/>        If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.<br/>      --><br/>      <property name="webServiceHost">www.external.domain.com</property><br/>      <property name="webServiceSecurePort">443</property><br/>      <property name="alwaysModifySOAPAddress">true</property><br/>      ...<br/>    </bean></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>In this way the resulting url exposed in the wsdl is </span><a class="jive-link-external-small" href="https://www.external.domain.com/path/" target="_blank">https://www.external.domain.com/path/</a><span>... which is what I needed to achieve.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>However, apparently this only works for services which have an associated wsdl file provided by the developer <span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">(@WebService(wsdlLocation = "WEB-INF/...")) in the deployment. I would like to enable a similar behavior on services which have only the defining implementation class. </span></p><p><span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">Is it possible to associate to an @WebService class an external deployment descriptor which only specifies soap:address and/or other specific jaxws parameters, without having to explcitely create (and obviously maintain over time) the wsdlby hand?<br/></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;"><span>In general, I think that this scenario is not so uncommin, and it would be useful to have a parameter as suggested by @asoldano to simply enable rewriting of </span><a class="jive-link-external-small" href="http://" target="_blank">http://</a><span> into </span><a class="jive-link-external-small" href="https://" target="_blank">https://</a></span></p><p><span style="background-color: #ffffff; color: #555555; font-family: 'Lucida Sans', 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">></span>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.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/762155#762155">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>