Hi all,
I have this problem using cxf dispatching behavior.
I have developed an Interceptor that implements the
org.apache.cxf.jaxrs.ext.RequestHandler interface.
In its "public Response handleRequest(Message m, ClassResourceInfo
resourceClass)" method I throw an exception (e.g. a WebServiceException) or
a Fault. I have not apparent problems but, on the client side, the client
receives a different exception (a ServerWebApplicationException) with the
error message empty.
Here the code:
Server side:
public class RestInterceptor implements RequestHandler {
......
@Override
public Response handleRequest(Message m, ClassResourceInfo
resourceClass){
.....
throw new WebServiceException("Failure in the dispatching ws
invocation!");
.....
}
}
ServerWebApplicationException received on client side:
Status : 500
Headers :
Content-Length : 0
Connection : close
Server : Jetty(7.x.y-SNAPSHOT)
cause=null
detailMessage=null
errorMessage=""
.....
I received the same exception also if I throw a Fault.
What is the problem? I have to use another exception? Why?
Thanks a lot,
Andrea
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-throw-an-exception-from-public-Response-handleRequest-Message-m-ClassResourceInfo-resourceCla-tp5723225.html
Sent from the cxf-user mailing list archive at Nabble.com.