• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Himai Minh

Chat Web Service Using Axis

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Chat Web Service and a java application as client.

When the client "connects" or call the method connect(user) in the server, the user is listed in the server.

How then would the server know if the user already closed the client application? I could call a disconnect method before the user closes the application. But what if the application closes without calling the disconnect method?

Is there a way that the server would know that the user is not connected anymore?
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to use asynchronous messaging.

Both the server and the client need to be a Web Service. A requester and provider. The provider hosts a WSDL for both the 'Chat Service' and the 'Chat Callback Service'.

The client then fetches the callback WSDL from the provider and builds a new one by importing the fetched wsdl <wsdl:import> and adding the port details of its client-side service.

The client can then generate the skeleton classes using wsdl2java and the server can do the same to build the stubs. The server can then invoke a isAlive() method or something similar to test if the client is there or not.

Look up 'Basic Callback Pattern' from the WS-I.

[ January 11, 2005: Message edited by: James Clinton ]
    Bookmark Topic Watch Topic
  • New Topic