What CXF version is it ?
The following test checks this condition:
https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java#L241
Cheers, Sergey
On 24/09/15 14:18, Govindaram PS wrote:
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.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/