This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Callback Client in Webservice

 
Nikita Dutt
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic