<!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;">
    Re: Metro in JBoss 7 HowTo
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/asoldano">Alessio Soldano</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/757622#757622">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 Mike,</p><p>I'll comment later on the classpath / client topic.</p><blockquote class="jive-quote"><p>Mike P wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Lastly, it's interesting that, possibly, as is, right now, Metro can not do WS-Trust with a CXF server. Unless that tagged on /mex url becomes automagically available.</p><p>My thinking on that one, is that *if* the wsdl advertises the (extra?) metadata, that CXF then goes ahead and makes avaibable this mystery /mex service (that apparently does GETs and POSTs and whatnots), and that Metro "ought to" not make assumptions about mex being available when the wsdl doesn't list it (which might be considered a bug in Metro - which should be reported - or at least feedback ought to be requested on this issue - I can post a report about my findings, since I've already spend time banging my head into this...).</p><p>*Maybe* there could a flag somewhere that makes CXF make available mex even though wsdl doesn't advertise it - just so that clients like Metro that require this (wrongfully), don't end up failing.</p><p>*Or*, have CXF add mex always. I don't know when mex should be added - perhaps only&#160; with this WS-Trust stuff? Or perhaps for other ws security features. Not needed for simple unsecure ws calls I would think (will have to verify that).</p></blockquote><p>I did a bit of additional investigation on this topic today. Basically, Apache CXF is able to reply to WS-MEX requests sent to "/mex". The problem is with properly configuring the STS endpoint on JBoss AS.</p><p>You need to have the JBoss Web layer deal with HTTP messages to the /mex subpath, for instance by having a web.xml descriptor as follows (please note the wildcard in the url pattern):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;web-app ...&gt;</p><p>&#160;&#160; &lt;servlet&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;servlet-name&gt;TestSecurityTokenService&lt;/servlet-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;servlet-class&gt;org.jboss.test.ws.jaxws.samples.wsse.policy.trust.SampleSTS&lt;/servlet-class&gt;</p><p>&#160;&#160; &lt;/servlet&gt;</p><p>&#160;&#160; &lt;servlet-mapping&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;servlet-name&gt;TestSecurityTokenService&lt;/servlet-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;url-pattern&gt;/SecurityTokenService/*&lt;/url-pattern&gt;</p><p>&#160;&#160; &lt;/servlet-mapping&gt;</p><p>&lt;/web-app&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>Besides that, I unfortunately found a bug in the jbossws-cxf SubjectCreatingInterceptor which basically block any WS-MEX call, see </span><a class="jive-link-external-small" href="https://issues.jboss.org/browse/JBWS-3543" target="_blank">https://issues.jboss.org/browse/JBWS-3543</a><span> . It's fixed on jbossws-cxf trunk and will be in next release.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This said, there're many complaints on the net regarding Metro default behaviour wrt WS-MetadataExchange and STS endpoints; btw Glen Mazza also created a WSIT / Metro improvement ticket at <a class="jive-link-external-small" href="http://java.net/jira/browse/WSIT-1586">http://java.net/jira/browse/WSIT-1586</a> long time ago (for a better configurability of Metro), but that's not been worked yet.</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/757622#757622">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>