GeeCON Prague 2014*
The moose likes Web Services and the fly likes Callback Client in Webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Callback Client in Webservice " Watch "Callback Client in Webservice " New topic
Author

Callback Client in Webservice

Nikita Dutt
Greenhorn

Joined: Dec 24, 2010
Posts: 20
Hi All,

How do call back clients work in JAX-WS web-services ? . I have managed to write some sample code but unable to understand how does it work. Inline in the code






If i don't invoke method mySynchronized after invoking getUserDetailsAsyncCC , i will not get a response from my hosted web service.


Output if invoke in order


new TestWebService().getUserDetailsAsyncCC(parameters);
new TestWebService().mySynchronized(parameters);

IS

Calling clients --------------->
Callback client called the webservice
Callback client has got a response
-------------------------------------------------------------------------
Webservice Response = Hello Luke Murphy Today's Date = Tue Aug 16 11:18:34 IST 2011
-------------------------------------------------------------------------
Main method ends



Output if invoke just


new TestWebService().getUserDetailsAsyncCC(parameters);

IS

Calling clients --------------->
Callback client called the webservice
Main method ends


This time it didn't get a response from webservice and i didnt get Callback client has got a response


Now output if invoke in order

new TestWebService().getUserDetailsAsyncCC(parameters);
new TestWebService().mySynchronized(parameters);
new TestWebService().mySynchronized(parameters);


Calling clients --------------->
Callback client called the webservice
Callback client has got a response
-------------------------------------------------------------------------
Webservice Response = Hello Luke Murphy Today's Date = Tue Aug 16 11:22:55 IST 2011
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Webservice Response = Hello Luke Murphy Today's Date = Tue Aug 16 11:22:55 IST 2011
-------------------------------------------------------------------------
Main method ends

This time it didn't invoke the callback client twice ?


Please explain how do callback client works ?


Webservice server side code is





Thanks in advance
 
GeeCON Prague 2014
 
subject: Callback Client in Webservice