<!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;">
    Problem with Async calls when using "Spring based in-container Bus creation"
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/daniel.cote.qc.ca">Daniel Cote</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/822617#822617">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><span>This post is in continuation with previous one (see </span><a class="jive-link-external-small" href="https://community.jboss.org/message/802369#802369#802369" target="_blank">https://community.jboss.org/message/802369#802369</a><span>).</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In this context, an in-container JAX-WS client, leveraging a Spring-base configuration (cxf.xml), issue an outgoing call to a WebService using in an Asynchronous mode, leveraging the</p><p>WS-Addressing headers &lt;a:Action/&gt;, &lt;a:MessageID/&gt;, &lt;a:ReplyTo/&gt;&#8230; The client issue a 'One-way (invokeOneWay methods)'.&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The receiver of the call, also hosted in a JBOSS container, get the call, conduct the business logic and answer back.</p><p>If the 'ReplyTo/Address' specifies an http endpoint, the interaction succeed.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If the 'ReplyTo/Address' specifies an HTTPS endpoint, the interaction failed because it seems that, when constructing the response (an outgoing call on a new Http connection),</p><p>the cxf runtime DOES NOT detect the 'cxf.xml' configuration parameter file that is deployed with the application, as in a standard 'client's' interaction.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The HTTPS call failed because the 'http:tlsClientParameters' were not taken into account...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Conceptually speaking, it seems to me reasonable to assume that an outgoing 'callback' response should be behaving exactly as a standard client call, hence using the cxf.xml resource.</p><p>Here a couple of lines of the trace, showing the main steps:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>1) initial client's call (invokeOneWay)</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We can see (in bold) that the runtime correctly detect the cxf.xml and setup the conduit accordingly</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,738 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been (re) configured for TLS keyManagers nulltrustManagers nullsecureRandom null</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,738 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreType KEY_STORE_TYPE_SET</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreProvider KEY_STORE_PROVIDER_NOT_SET</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreType KEY_STORE_TYPE_SET</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreProvider KEY_STORE_PROVIDER_NOT_SET</span></p><p><span style="font-size: 8pt;"><strong>2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been (re) configured for TLS keyManagers [sun.security.ssl.SunX509KeyManagerImpl@3677ef1]trustManagers [sun.security.ssl.X509TrustManagerImpl@7fbf01f5]secureRandom null</strong></span></p><p><span style="font-size: 8pt;"><strong>2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Successfully performed injection.</strong></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Could not find a definition for bean with id {urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit - no injection will be performed.</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;"><span>2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Could not find a definition for bean with id </span><a class="jive-link-external-small" href="https://localhost:8443/XDSRegistryWS/DocumentRegistry_Service" rel="nofollow" target="_blank">https://localhost:8443/XDSRegistryWS/DocumentRegistry_Service</a><span> - no injection will be performed.</span></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.logConfig No Trust Decider configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,758 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.logConfig No Auth Supplier configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:22,758 FINE (EJB default - 35) org.apache.cxf.transport.http.HTTPConduit.logConfig Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been configured for TLS keyManagers <strong>[sun.security.ssl.SunX509KeyManagerImpl@3677ef1]trustManagers [sun.security.ssl.X509TrustManagerImpl@7fbf01f5]secureRandom nullDisable Common Name (CN) Check: true</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>2) responding WebService (Async call mode, because of the presence of WS-Attributes<br/></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We see that no '<span style="font-size: 8pt;"><strong> org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean' step occured, hence the '</strong></span>TLS keyManagers nulltrustManagers nullsecureRandom nullDisable Common Name (CN) Check: false'</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.setTlsClientParameters Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been (re) configured for TLS keyManagers nulltrustManagers nullsecureRandom null</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.logConfig No Trust Decider configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.logConfig No Auth Supplier configured for Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit'</span></p><p><strong style="font-size: 8pt; font-family: courier new,courier;">2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.logConfig Conduit '{urn:ihe:iti:xds-b:2007}DocumentRegistry_Port_Soap12.http-conduit' has been configured for TLS keyManagers nulltrustManagers nullsecureRandom nullDisable Common Name (CN) Check: false</strong></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.transport.http.HTTPConduit.setMessageObserver registering incoming observer: org.apache.cxf.ws.addressing.impl.InternalContextUtils$2$1@359f34de</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:23,358 FINE (default-workqueue-2) org.apache.cxf.interceptor.OutgoingChainInterceptor.getChain Interceptors contributed by bus: [org.apache.cxf.ws.policy.PolicyOutInterceptor@2db8eb3e]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">2013-06-11 11:24:23,368 FINE (default-workqueue-2) org.apache.cxf.interceptor.OutgoingChainInterceptor.getChain Interceptors contributed by service: []</span></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/822617#822617">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>