This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have to create a web service for one of my clients. The requirement is such that the client will access my web services to do some processing and get the result back.
I am building the architecture. My requirement is to get and xml from the client. convert the xml children into xml list and process each child individually. by processing i mean i have to do some work with the information of the child nodes. After the processing for a particular child is complete i want to send a result back to the client asynchronously.
Now i have no idea how to send messages asynchronously from server to client. I have used JMS with MDB before. But it was when both the producer and the consumer were in the same JVM.
But in this case, the producer will be residing on the server and consumer would be the client from some entirely different JVM.
Can you please tell me if it is possible in web services.
Ashwin Raghavan wrote:Now i have no idea how to send messages asynchronously from server to client.
There are only 2 options available: polling and pushing. Either you connect to the server periodically and check if there is a new message exists, or keep Socket opened to make server push data to the client any time.
Joined: Dec 26, 2012
I believe by pushing you are saying that i use topics. subsrcibe a topic for the client, and then keep on passing messages to it. can you please guide me how i can create jms topics in tomcat and pass message to the client. or can you guide me to a link where they have an example.