aspose file tools*
The moose likes Web Services and the fly likes Asynchronous call in the Server side?., Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Asynchronous call in the Server side?.," Watch "Asynchronous call in the Server side?.," New topic
Author

Asynchronous call in the Server side?.,

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi Friends..

i'm wondering about how to implement Asynchronous call in the Server side?..
(the Server used is Glassfish)..

is there any turorial or link for develop it?..
sorry i'm still beginner in developing WebService..

Thanks in advance..

Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hello!
You are asking about asynchronous calls on the server side - do you mean asynchronous invocation of other web services from a web service or do you mean implementing a web service that processes request asynchronously? If the latter, then:
In order for your web service server to be asynchronous, an option is to follow something along these lines:
- Receive a request.
- Validate the request to the extent possible.
- Generate an id for the request (only if polling is used).
- Associate the id with the request (only if polling is used).
- Queue the request in a queue of some sort.
- Return the id (only if polling is used).

At this time, the client has completed the request and received a result, optionally containing an id with which it can poll for the result of the request later.

At some point in time in the web service server:
- The request is taken from the queue and processed.
- If the result is to be returned using callback, then call back and enclose the result.
- If the result is to be returned using polling, then place the request result in the polling queue.
Later when the client calls the polling function, supplying the request id, the result is returned to the client.

The above is a basic outline of how to implement asynchronous processing of requests in a web service. There may be additional aspects to take into consideration.
I haven't seen any tutorials on this subject.
Best wishes!
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi Ivan, thanks for your reply..

sorry i try to "digest" step by step..

do you mean asynchronous invocation of other web services from a web service?


how to reach it?.. is it implemented as the Client side (use the Service class or Port interface)?..
is it implemented use @WebServiceRef?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Asynchronous call in the Server side?.,
 
Similar Threads
JAX-WS Async call
How to initiate single javascript call asynchronously?
AJAX
Synchronous/Asynchronous
Question on Asynchronous web service call using document style.