I have a requirement where, as part of a Web Service [ Java ], I enter details of a job into Database, which is asynchronously processed by a Windows Service [ C# ] and makes a HTTP Restful call to the Java web service notifying the status of the job.
The scenario:
- Client makes a synchronous Restful call to the Java Web Service.
- The Java Web Service enters the job details into database (similar to making an asynchronous call) and waits for a response back from the Windows Service (which is a new HTTP request to the Java Web Service).
- Based on the response received, the Java Web Service needs to respond back to the client who is waiting on the synchronous call.
How can we achieve this in the Java Web Service?
EDIT: I've implemented restful web-service using Jersey framework and is running on a Jetty Server.