wood burning stoves 2.0*
The moose likes Web Services and the fly likes Web services sending messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Web services sending messages" Watch "Web services sending messages" New topic
Author

Web services sending messages

simon keillor
Greenhorn

Joined: Jun 23, 2004
Posts: 24
Hi,

Am new to web services and have been asked to look into them by my company as possible changes to our existing software.

I know clients send requests to web services and web services send responses to those requests, but I need to know is it possible for a web service to send messages to direct to clients rather than as a response

Have tried looking on the net but have not found any info about working this way.

Any advice would be greatly appreciated.

Regards


Simon
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2057
The web service will initiate the conversation? It is called solicit-response.

I believe JAX-RPC doesnt support it.

You can search using keyword 'solicit-response' in google.

The other 3 types are request-response, one-way request, and notification. This might help a little http://www-128.ibm.com/developerworks/webservices/library/ws-soaintro2/
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by simon keillor:
I know clients send requests to web services and web services send responses to those requests, but I need to know is it possible for a web service to send messages to direct to clients rather than as a response


Strictly speaking it is not possible if the "client" is just a plain web services client � the client is not "listening". However there are ways around it if the situation warrants it. Its always possible to include an embedded web server in the client application (Jetty is a popular choice but even Tomcat has an embedded version) and deploy the web service engine within it. Once the "client" is elevated to full service status it can be contacted by the "server" service.
See: Asynchronous operations and Web services, Part 1: A primer on asynchronous transactions and Asynchronous operations and Web services, Part 2 � especially Part 2 discusses how to realize "one-way", "solicit-response", and "notification" messaging modes.

Another alternative is to send the notification over a different protocol, e.g. the server could send a SOAP message via SMTP (which of course is slow and unreliable). None of this is part of JAX-RPC/JAX-WS though.
simon keillor
Greenhorn

Joined: Jun 23, 2004
Posts: 24
Hi,

Thanks for the information provided, have something to look at now.

Cheers
 
GeeCON Prague 2014
 
subject: Web services sending messages