Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Callback Client in Webservice

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic