0 Replies Latest reply on Mar 16, 2013 6:48 PM by Daniel Cote

    Asynchronous calls using JAX-WS

    Daniel Cote Newbie

      The context.

       

      An "in-container" WebService issues an asynchronous call to another Webservice.

      My program works correctly... I just want to clarify a technical aspect.

      In using JbossFinal7.1.1 and  jbossws-cxf-4.1.1.Final.

       

      It seems that the cxf stack has an 'odd' behavior, comparing to what I'm used to see.  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 'ReplyTo' URL conveyed in the soap header.

      The executing stack has to figured out that the receiver receives the payload, and that's it! 

       

       

      In my previous experiences, with other AppServer, I never saw a "payload" sent back..

      I was a bit confused to see an answer coming from the invokee...  Here the log...

      ---------------------------------------------------------------------------------------------

      Here, we're in the in-container WebService...

       

      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

       

      Here, just before the call (extract from the code) to the other WebService...

       






      logger.logic("invokeOneWay called...");





      dispatch.invokeOneWay(invokeParameter);





      logger.logic("invokeOneWay returned...");

       


      22:40:18,358 CONF (EJB default - 58) com.ibm.ai.xds.soap.SoapClient.callJAXBWS invokeOneWay called...

       

      A configured SoapHandler takes care of logging the outgoing payload


      22:40:18,374 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.handleMessage Calling handleMessage within com.ibm.ai.xds.soap.EnvelopeSOAPHandler

      22:40:18,374 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.handleMessage Outgoing SOAP response...

      22:40:18,405 CONF (EJB default - 58) com.ibm.ai.xds.soap.EnvelopeSOAPHandler.logMessage  [null] Message sent: payload:[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" ns0:mustUnderstand="1">urn:ihe:iti:2007:RegisterDocumentSet-b</wsa:Action><wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" ns0:mustUnderstand="1"><wsa:Address>http://localhost:8080/XDSRepositoryWS/DocumentRepository_Service</wsa:Address></wsa:ReplyTo><wsa:To  xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/XDSRegistryWS/DocumentRegistry_Service</wsa:To><wsa:MessageID  xmlns:wsa="http://www.w3.org/2005/08/addressing">fc12c6a5-7c32-4fbb-962c-596a6afae42a</wsa:MessageID></soap:Header><soap:Body>...</soap:Body></soap:Envelope>]

       


      The invokee web service is started and send immediatly an ack with a "content" limited to the Headers, No Body  (a non-empty body would not make sense...).

      The invokee is also hosted by the same Jboss server

      The payload is :


      22:40:18,655 CONF (http-localhost-127.0.0.1-8080-3) com.ibm.ai.xds.webContext.XDSHandler.logMessage message sent... payload:[<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><MessageID  xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:a62d5c9e-aa4d-4e72-a0a8-319eb16c70fb</MessageID><To  xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To><ReplyTo  xmlns="http://www.w3.org/2005/08/addressing"><Address>http://www.w3.org/2005/08/addressing/none</Address></ReplyTo><RelatesTo  xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/unspecified</RelatesTo></soap:Header><soap:Body/></soap:Envelope>]

      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]  <-- response from call to action:[urn:ihe:iti:2007:RegisterDocumentSet-b] from :[127.0.0.1]

       

      And just after, the invoking thread (EJB default - 58) logged that the invoke returned which ends this thread execution (whic is correct)


      22:40:18,655 CONF (EJB default - 58) com.ibm.ai.xds.soap.SoapClient.callJAXBWS invokeOneWay returned...

      22:40:18,655 INFO (EJB default - 58) com.ibm.ai.asyncCallMgr.CallItem.run runSpecific exit...

      -----------------------------------------------------------------------------------------------------------------

      Although the program worked correctly, I'm curious to know what is the correct behavior...

      For comparision, I never saw that kind of acknowledge, using Websphere Application Server...

      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)

       

      -----------------------------------------------------------------------------------------------------------------

      HTTP/1.1 202 Accepted

      X-Powered-By: Servlet/3.0

      Content-Type: application/soap+xml; charset=UTF-8

      Content-Length: 0

      IBM-WAS-Reset-Connection: TRUE

      Content-Language: fr-CA

      Connection: Close

      Date: Fri, 15 Mar 2013 03:14:29 GMT

      Server: WebSphere Application Server/8.5

      -----------------------------------------------------------------------------------------------------------------

       

      Is this kind of detail left to the implementation of there is a requirement that is not correctly meet by one of those implementations.

       

      Best regards,