我有使用cxf调度行为的这个问题。 我开发了一个实现org.apache.cxf.jaxrs.ext.RequestHandler接口的Interceptor。 在其“公共响应handleRequest(Message m,ClassResourceInfo resourceClass)”方法中,我抛出一个异常(例如WebServiceException)或一个Fault。我没有明显的问题,但是,在客户端,客户端收到一个不同的异常(一个ServerWebApplicationException),错误消息为空。从org.apache.cxf.jaxrs.ext.RequestHandler中引发异常handleRequest方法
下面的代码:
服务器端:在客户端收到
public class RestInterceptor implements RequestHandler {
......
@Override
public Response handleRequest(Message m, ClassResourceInfo resourceClass){
.....
throw new WebServiceException("Failure in the dispatching ws invocation!");
.....
}
}
ServerWebApplicationException:
Status : 500
Headers :
Content-Length : 0
Connection : close
Server : Jetty(7.x.y-SNAPSHOT)
cause=null
detailMessage=null
errorMessage=""
.....
我收到了同样的异常也是,如果我扔了故障。 问题是什么?我必须使用另一个异常?为什么? 非常感谢,
安德烈
非常感谢,可惜我已经试过,但具有相同错误的行为和相同的空ServerWebApplicationException收到客户端上的继续。 – Andrea 2013-02-16 07:16:15