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.
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.
Joined: Jun 23, 2004
Thanks for the information provided, have something to look at now.