0 Replies Latest reply on Jun 11, 2013 12:53 PM by Daniel Cote

    Problem with Async calls when using "Spring based in-container Bus creation"

    Daniel Cote Newbie

      Hi,

       

      This post is in continuation with previous one (see https://community.jboss.org/message/802369#802369).

       

      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

      WS-Addressing headers <a:Action/>, <a:MessageID/>, <a:ReplyTo/>… The client issue a 'One-way (invokeOneWay methods)'. 

       

      The receiver of the call, also hosted in a JBOSS container, get the call, conduct the business logic and answer back.

      If the 'ReplyTo/Address' specifies an http endpoint, the interaction succeed.

       

      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),

      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.

       

      The HTTPS call failed because the 'http:tlsClientParameters' were not taken into account...

       

      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.

      Here a couple of lines of the trace, showing the main steps:

       

      1) initial client's call (invokeOneWay)

       

      We can see (in bold) that the runtime correctly detect the cxf.xml and setup the conduit accordingly

       

       

      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

      2013-06-11 11:24:22,738 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreType KEY_STORE_TYPE_SET

      2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreProvider KEY_STORE_PROVIDER_NOT_SET

      2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreType KEY_STORE_TYPE_SET

      2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.jsse.TLSParameterJaxBUtils.getKeystoreProvider KEY_STORE_PROVIDER_NOT_SET

      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

      2013-06-11 11:24:22,748 FINE (EJB default - 35) org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean Successfully performed injection.

      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.

      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 https://localhost:8443/XDSRegistryWS/DocumentRegistry_Service - no injection will be performed.

      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'

      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'

      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 [sun.security.ssl.SunX509KeyManagerImpl@3677ef1]trustManagers [sun.security.ssl.X509TrustManagerImpl@7fbf01f5]secureRandom nullDisable Common Name (CN) Check: true

       

      2) responding WebService (Async call mode, because of the presence of WS-Attributes

       

      We see that no ' org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean' step occured, hence the 'TLS keyManagers nulltrustManagers nullsecureRandom nullDisable Common Name (CN) Check: false'

       

      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

      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'

      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'

      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

      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

      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]

      2013-06-11 11:24:23,368 FINE (default-workqueue-2) org.apache.cxf.interceptor.OutgoingChainInterceptor.getChain Interceptors contributed by service: []