On 09/08/12 09:08, Sergey Beryozkin wrote:
Hi
On 07/08/12 21:36, Christopher Wash wrote:
Thanks for your quick reply, Sergey.

If the code for this exists, I may try to model my solution off of it and
then switch to utilize CXF once available. Could you point me in the
direction of the APIs that support this?

The only thing I can say at the moment is that I will do something
similar to what Dan did with the JAX-WS frontend.

Dan helped me with linking a new asynchronous HTTP conduit with the client runtime which has been retrofitted to support all the new JAX-RS 2.0 client enhancements (filters, interceptors, new Response API and new exception classes, and async, except for the actual new client API - that will be supported later).

The way to do asynchronous invocations with WebClient:

Option 1: use JAX-RS 2.0 AsyncInvoker
http://jax-rs-spec.java.net/nonav/2.0-SNAPSHOT/apidocs/javax/ws/rs/client/AsyncInvoker.html

Example:

Future<Book> future = webClient.async().get(Book.class);
Future<Book> future = webClient.async().post(Entity.xml(new Book()), Book.class, new MyInvocationCallback<Book>());

Option2. Use 'shortcuts' on WebClient:

Future<Book> future = webClient.get(Book.class, new MyInvocationCallback<Book>());

Future<Book> future = webClient.post(new Book(), Book.class, new MyInvocationCallback<Book>());


It is available only in CXF 2.7.0 (to be released soon)

Cheers, Sergey

Reply via email to