Professional Documents
Culture Documents
Asynchronous Web Wervices - Apache
Asynchronous Web Wervices - Apache
Services
Jaliya N. Ekanayake
Basics of Web Services
Simple Web Service Invocations
Example>>
Client Side Asynchrony
Polling
Client repeatedly poll for the availability of the results, while performing some other task.
Example>>
Client Side Asynchrony
Result Callbacks
Client provides a callback method. Proxy will dispatch the result using the
callback method.
1 Creates a
Callback Callback
Object 4 Response is dispatched
to the callback by the client proxy
Issues
Client has to provide the callback method
Client has to handle the additional complexity
Response can be retrieved asynchronously
Callback
Code Snippet
Example>>
Asynchronous Web Service Model
The service does not “return” anything.
It can send the response (if any) by itself.
Transport may or may not be synchronous
E.g. 1 (HTTP Transport)
Service has a void return type and it will send a response after a while using different
HTTP connection
E.g. 2 (One way transport -JMS)
Service sends a response using a new one way transport.
What is required.
Service should have the capability to send the response by itself.
Client should be able to correlate the request and the response
Client should have an addressable endpoint.
Sender M
Service
Receiver M
Client
Features
Service sends the response by itself.
Correlation information contains in the SOAP message itself.
Client has both a Sender and a Receiver.
Support from the Existing Technologies
Microsoft .NET supports the client side asynchrony.
With the WSE 2.0 the service asynchrony is also supported.
Systinet WASP supports the client side asynchrony and WS-Addressing.
Axis 2 (Currently under development) will support both.
Summery
There are many advantages of using asynchronous patterns in
implementing web services for B2B, EAI scenarios.
Client Side Asynchrony
Fire & Forget
Polling
Callbacks
Service Asynchrony
Technology support
References
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmaj/html/
aj2mpsoarch.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/
html/cpconinvokingwebservicesasynchronously.asp
www.fawcette.com/xmlmag/ 2003_02/magazine/practice/dchappell/
http://www.c-sharpcorner.com/Code/2004/April/AsyncWebServices.asp
http://www.esecurityplanet.com/prodser/article.php/2235201
http://xml.coverpages.org/ni2004-04-15-a.html
Thank You!