dev@jax-ws.java.net

Async handler, bug or feature?

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Tue, 28 Feb 2006 10:13:51 +0100

On client side when response come to async. handler (implementation of
AsyncHandler interface),
parameter Response<> that is passed to callback method handleResponse()
contains not response wrapper, but essentially return value.

In other words:

        public void handleResponse (Response<AddNumbersResponse> response) {
            try {
                output = response.get ();
                System.out.println(output.getClass().getName()); //
output java.lang.Integer, but not expected async.client.AddNumbersResponse
            } catch (ExecutionException e) {
            } catch (InterruptedException e) {
            }
        }

"async addNumbers sample" from old jaxws implementation will make output
"java.lang.Integer" rather than "async.client.AddNumbersResponse".

Is this feature of JAX-WS-REARH of its some bug?

Thanks.
WBR,
Alexey