<!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="http://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;">
    How to configure a service-ref in the environment?
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/m.winkels">Maarten Winkels</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/634825#634825">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 style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm building an application that uses both internal and external webservices. This application is based on JAX-WS and is using @WebServiceRef to inject references to webservices. The location of the WSDL for the endoints are configured in th web.xml using a service-ref element. This is working great.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The location of the webservices, however, differs per deployment environment. My question is how to make the endpoint (WSDL) location configurable per location. To me this seems very similar to defining a JDBC or any other resource: The application uses anamed resource that is configured in the container. I'm not finding the functionality to do this in JBoss 7, however.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have been trying a number of options:</p><p>- Use a system property in the web.xml like&#160; &lt;wsdl-file&gt;${some.property}?wsdl&lt;/wsdl-file&gt;. This does not seem to work.</p><p style="padding-left: 30px;">This doesn't seem to work.</p><p>- Use a jboss-web.xml and do property override there.</p><p style="padding-left: 30px;">I haven't tried this yet, but looking at the source code that parses the jboss-web.xml I see nothing that will inject system properties</p><p>- Configure the service-ref in Global JNDI.</p><p style="padding-left: 30px;">According to the spec the mappedName property of the @WebServiceRef annotation should link it to a globally defined resource. I cannot find a way to define global JNDI entries in JBoss AS 7, let alone configure a WebServcice EndPoint.</p><p>- Use jUDDI for web service registration and lookup.</p><p style="padding-left: 30px;">I'm a little bit hesitant to use another product to connect the dots. Is this the only possible solution?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Can anyone point me in the right direction?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks!</p><p>-Maarten Winkels</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/634825#634825">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>