Gul

There are two aspects. The client model and the transport model. The
client model depends on whether you call the NonBlocking APIs (or use
the async stubs).

The transport model depends on whether you call the method:
serviceClient().getOptions().setUseSeparateListener(true);
or
stub._getServiceClient().getOptions().setUseSeparateListener(true);

This also relies on you enabling ws-addressing:

engageModule("addressing");

This adds a <wsa:ReplyTo> header into the message. Any WS-Addressing
compliant endpoint will now respond 202 OK and then initiate a new
HTTP connection for the response. Certainly for Axis2 you don't need
to do anything on the server side to enable this.

A really important point is that the
client-programming-model-asynchrony and the
ws-addressing-transport-level-asynchrony are completely orthogonal.
You can have the code blocking and two HTTP connections, or you can
have the code nonBlocking and a single HTTP req-resp. Obviously the
most useful combination is to have both.

Just for interest, the WS-Addressing working group has recently
published a WS-Policy assertion that services can use to say whether
they support the single HTTP connection (known as anonymous) or the
dual-http connection (known by W3 as nonAnonymous and Microsoft as
Duplex). See here:
http://dev.w3.org/cvsweb/~checkout~/2004/ws/addressing/ws-addr-wsdl.html?content-type=text/html;%20charset=utf-8#wspolicyanonresponses

Paul

On 3/7/07, Gul Onural <[EMAIL PROTECTED]> wrote:




I have a question about the async. Invocation of the web service interfaces
with Axis2.

My understanding from the existing documentation
(http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html),

Axis2 definition of the async. invocation refers to the pattern where :

- calls to axis2 client immediately returns to the caller application
(async.), however invocation between
the client and server still becomes sync.

What I want to achieve is that the calls to server immediately returns to
client as well. And then
the server sends another message to the client where the client has a
listener for, when the task on the server
side completed.

Can you give me some pointers to achieving this in a pluggable manner using
Axis2 client and server components ?
What is the right way of doing it ?

Thanks,

Gul


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to