Summary
JAX-WS provides an easy mechanism for accessing services asynchronously. The SEI can specify additional methods that a can use to access a service asynchronously. The Celtix Enterprise code generators will generate the extra methods for you. You simply need to add the business logic.
Table of Contents
In addition to the usual synchronous mode of invocation, Celtix Enterprise also supports two forms of asynchronous invocation:
Polling approach
In this case, to invoke the remote operation, you call a special method that has no output parameters, but returns a javax.xml.ws.Response
object. The Response
object (which inherits from the javax.util.concurrency.Future
interface) can be polled to check whether or not a response message has arrived.
Callback approach
In this case, to invoke the remote operation, you call another special method that takes a reference to a callback object (of javax.xml.ws.AsyncHandler
type) as one of its parameters. Whenever the response message arrives at the client, the runtime calls back on the AsyncHandler
object to give it the contents of the response message.