<!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;">
    Asynchronous calls using JAX-WS
</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/803107#803107">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>The context.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>An "in-container" WebService issues an asynchronous call to another Webservice.</p><p>My program works correctly... I just want to clarify a technical aspect.</p><p>In using JbossFinal7.1.1 and&#160; <strong>jbossws-cxf-4.1.1.Final.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It seems that the cxf stack has an 'odd' behavior, comparing to what I'm used to see.&#160; In an async call, the invoker is not supposed to get any answer from the outgoing call: the invokee will send the answer to the address specified in the '<span style="font-family: courier new,courier; font-size: 8pt;">ReplyTo' </span>URL conveyed in the soap header.</p><p>The executing stack has to figured out that the receiver receives the payload, and that's it!&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In my previous experiences, with other AppServer, I never saw a "payload" sent back..</p><p>I was a bit confused to see an answer coming from the invokee...&#160; Here the log...</p><p>---------------------------------------------------------------------------------------------</p><p>Here, we're in the in-container WebService...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,358 INFO (EJB default - 58) org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass Creating Service {urn:ihe:iti:xds-b:2007}DocumentRegistry_Service from class org.apache.cxf.jaxws.support.DummyImpl</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here, just before the call (extract from the code) to the other WebService...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table><tbody><tr><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";">logger.logic("invokeOneWay called...");</td></tr><tr><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";">dispatch.invokeOneWay(invokeParameter);</td></tr><tr><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";"><br/></td><td style=";">logger.logic("invokeOneWay returned...");</td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;"><br/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,358 CONF (EJB default - 58) com.ibm.ai.xds.soap.SoapClient.callJAXBWS invokeOneWay called...</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">A configured SoapHandler takes care of logging the outgoing payload</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;"><br/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,374 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.handleMessage Calling handleMessage within com.ibm.ai.xds.soap.EnvelopeSOAPHandler</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,374 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.handleMessage Outgoing SOAP response...</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;"><span>22:40:18,405 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.logMessage&#160; [null] Message sent: payload:[&lt;soap:Envelope xmlns:soap="</span><a class="jive-link-external-small" href="http://www.w3.org/2003/05/soap-envelope" rel="nofollow" target="_blank">http://www.w3.org/2003/05/soap-envelope</a><span>"&gt;&lt;soap:Header&gt;&lt;wsa:Action xmlns:wsa="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>" xmlns:ns0="</span><a class="jive-link-external-small" href="http://www.w3.org/2003/05/soap-envelope" rel="nofollow" target="_blank">http://www.w3.org/2003/05/soap-envelope</a><span>" ns0:mustUnderstand="1"&gt;urn:ihe:iti:2007:RegisterDocumentSet-b&lt;/wsa:Action&gt;&lt;wsa:ReplyTo xmlns:wsa="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>" xmlns:ns0="</span><a class="jive-link-external-small" href="http://www.w3.org/2003/05/soap-envelope" rel="nofollow" target="_blank">http://www.w3.org/2003/05/soap-envelope</a><span>" ns0:mustUnderstand="1"&gt;&lt;wsa:Address&gt;</span><a class="jive-link-external-small" href="http://localhost:8080/XDSRepositoryWS/DocumentRepository_Service" rel="nofollow" target="_blank">http://localhost:8080/XDSRepositoryWS/DocumentRepository_Service</a><span>&lt;/wsa:Address&gt;&lt;/wsa:ReplyTo&gt;&lt;wsa:To&#160; xmlns:wsa="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>"&gt;</span><a class="jive-link-external-small" href="http://localhost:8080/XDSRegistryWS/DocumentRegistry_Service" rel="nofollow" target="_blank">http://localhost:8080/XDSRegistryWS/DocumentRegistry_Service</a><span>&lt;/wsa:To&gt;&lt;wsa:MessageID&#160; xmlns:wsa="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>"&gt;fc12c6a5-7c32-4fbb-962c-596a6afae42a&lt;/wsa:MessageID&gt;&lt;/soap:Header&gt;&lt;soap:Body&gt;...&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;]</span></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>The invokee web service is started <span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">and send immediatly an ack with a "content" limited to the Headers, No Body&#160; (a non-empty body would not make sense...).</span></p><p><span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">The invokee is also hosted by the same Jboss server<br/></span></p><p><span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">The payload is :<br/></span></p><p><span style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;"><span>22:40:18,655 CONF (http-localhost-127.0.0.1-8080-3) com.ibm.ai.xds.webContext.XDSHandler.logMessage message sent... payload:[&lt;soap:Envelope xmlns:soap="</span><a class="jive-link-external-small" href="http://www.w3.org/2003/05/soap-envelope" rel="nofollow" target="_blank">http://www.w3.org/2003/05/soap-envelope</a><span>"&gt;&lt;soap:Header&gt;&lt;MessageID&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>"&gt;urn:uuid:a62d5c9e-aa4d-4e72-a0a8-319eb16c70fb&lt;/MessageID&gt;&lt;To&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>"&gt;</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing/anonymous" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing/anonymous</a><span>&lt;/To&gt;&lt;ReplyTo&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>"&gt;&lt;Address&gt;</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing/none" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing/none</a><span>&lt;/Address&gt;&lt;/ReplyTo&gt;&lt;RelatesTo&#160; xmlns="</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing</a><span>"&gt;</span><a class="jive-link-external-small" href="http://www.w3.org/2005/08/addressing/unspecified" rel="nofollow" target="_blank">http://www.w3.org/2005/08/addressing/unspecified</a><span>&lt;/RelatesTo&gt;&lt;/soap:Header&gt;&lt;soap:Body/&gt;&lt;/soap:Envelope&gt;]</span></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,655 INFO (http-localhost-127.0.0.1-8080-3) com.ibm.ai.xds.webContext.XDSHandler.Msg sent to: [ 127.0.0.1]&#160; &lt;-- response from call to action:[urn:ihe:iti:2007:RegisterDocumentSet-b] from :[127.0.0.1]</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And just after, the invoking thread <span style="font-family: courier new,courier; font-size: 8pt;">(EJB default - 58)</span> logged that the invoke returned which ends this thread execution (whic is correct)</p><p><span style="font-family: courier new,courier; font-size: 8pt;"><br/></span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,655 CONF (EJB default - 58) com.ibm.ai.xds.soap.SoapClient.callJAXBWS invokeOneWay returned...</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">22:40:18,655 INFO (EJB default - 58) com.ibm.ai.asyncCallMgr.CallItem.run runSpecific exit...</span></p><p> -----------------------------------------------------------------------------------------------------------------</p><p><span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">Although the program worked correctly, I'm curious to know what is the correct behavior...</span></p><p><span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">For comparision, I never saw that kind of acknowledge, </span><span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">using Websphere Application Server...</span></p><p style="text-align: start;"><span style="font-size: 10pt; font-family: arial,helvetica,sans-serif;">Here a capture using TCPMON, showing that the receiving service just close the connection (on WAS), at the HTTP level (no SOAP payload at all)<br/></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="text-align: start;">-----------------------------------------------------------------------------------------------------------------</p><p><span style="font-family: courier new,courier;">HTTP/1.1 202 Accepted</span></p><p><span style="font-family: courier new,courier;">X-Powered-By: Servlet/3.0</span></p><p><span style="font-family: courier new,courier;">Content-Type: application/soap+xml; charset=UTF-8</span></p><p><span style="font-family: courier new,courier;">Content-Length: 0</span></p><p><span style="font-family: courier new,courier;">IBM-WAS-Reset-Connection: TRUE</span></p><p><span style="font-family: courier new,courier;">Content-Language: fr-CA</span></p><p><span style="font-family: courier new,courier;"><strong>Connection: Close</strong></span></p><p><span style="font-family: courier new,courier;">Date: Fri, 15 Mar 2013 03:14:29 GMT</span></p><p><span style="font-family: courier new,courier;">Server: WebSphere Application Server/8.5</span></p><p>-----------------------------------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Is this kind of detail left to the implementation of there is a requirement that is not correctly meet by one of those implementations.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Best regards,</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/803107#803107">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>