The following code works fine when the response is 200 with valid Employee.
When the request fails with some other status code, How to get
javax.ws.rs.core.Response?

The code is not giving WebApplicationException. If WebApplicationException
is available, we can get Response object from the exception.

Future<Employee> empFuture= webClient.get(new InvocationCallback<Employee>()
{

        @Override
        public void completed(Employee arg0) {
                // TODO Auto-generated method stub
                                                
        }

        @Override
        public void failed(Throwable arg0) {
                // TODO Auto-generated method stub
                                                
        }
});

Employee emp = empFuture.get();



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Async-client-Response-object-on-failure-tp5761264.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to