Dan Retzlaff wrote:
Even that requires changing the web service operations to one-way. It looks
like that's the solution though. It's a larger impact than I was hoping for,
but I can see how it would work. Thanks Glen and Brad.

You can build a client that does asynchronous calls without changing your WSDL. You just need to give an appropriate JAX-WS binding file to wsdl2java and it will create a client interface with methods that take a callback object (I think it's called AsyncHandler, I don't have the javadocs to hand) and pass the result to that when it arrives instead of making you wait.

CXF includes a sample that shows how this works:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/jaxws_async/

Although this looks asynchronous from the point of view of the client code, all this actually does is make a normal synchronous call in a background thread. If your server is able to open connections back to the client machines then you might also want to look at WS-Addressing, which decouples the request and response by making a one-way call to start the operation and having the server call back to the client when it has finished. There's a CXF sample showing this too:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_addressing/

Ian

--
Ian Roberts               | Department of Computer Science
[EMAIL PROTECTED]  | University of Sheffield, UK

Reply via email to