[jboss-user] [JBoss Web Services] - Asynchronous calls using JAX-WS

Daniel Cote do-not-reply at jboss.com
Sat Mar 16 18:48:19 EDT 2013


Daniel Cote [https://community.jboss.org/people/daniel.cote.qc.ca] created the discussion

"Asynchronous calls using JAX-WS"

To view the discussion, visit: https://community.jboss.org/message/803107#803107

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

Reply to this message by going to Community
[https://community.jboss.org/message/803107#803107]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130316/8b145979/attachment-0001.html 


More information about the jboss-user mailing list