private Object handleFault(Message ret) throws InvocationTargetException { if (ret.getBody() instanceof ServiceRuntimeException) { ServiceRuntimeException e = (ServiceRuntimeException) ret.getBody(); if (e.getCause() instanceof NotAuthorizedException) { // authorization exceptions need to be mapped to a client 403 response throw new InvocationTargetException(new WebApplicationException(Response.Status.FORBIDDEN)); } throw new InvocationTargetException(e); } throw new InvocationTargetException((Throwable) ret.getBody()); }
private Object handleFault(Message ret) throws InvocationTargetException { if (ret.getBody() instanceof ServiceRuntimeException) { ServiceRuntimeException e = (ServiceRuntimeException) ret.getBody(); if (e.getCause() instanceof NotAuthorizedException) { // authorization exceptions need to be mapped to a client 403 response throw new InvocationTargetException(new WebApplicationException(Response.Status.FORBIDDEN)); } throw new InvocationTargetException(e); } throw new InvocationTargetException((Throwable) ret.getBody()); }
private Object handleFault(Message ret) throws InvocationTargetException { if (ret.getBody() instanceof ServiceRuntimeException) { ServiceRuntimeException e = (ServiceRuntimeException) ret.getBody(); if (e.getCause() instanceof NotAuthorizedException) { // authorization exceptions need to be mapped to a client 403 response throw new InvocationTargetException(new WebApplicationException(Response.Status.FORBIDDEN)); } throw new InvocationTargetException(e); } throw new InvocationTargetException((Throwable) ret.getBody()); }
Throwable e = s.getCause(); if (e != null && e instanceof FaultException) { if ("AsyncResponse".equals(e.getMessage())) {
tuscanyMsg = endpointReference.getBindingInvocationChain().getHeadInvoker().invoke(tuscanyMsg); } catch (ServiceRuntimeException e) { if (e.getCause() instanceof InvocationTargetException) { if ((e.getCause().getCause() instanceof RuntimeException)) { tuscanyMsg.setFaultBody(e.getCause()); } else { tuscanyMsg.setFaultBody(((InvocationTargetException)e.getCause()).getTargetException()); } else if (e.getCause() instanceof FaultException) { tuscanyMsg.setFaultBody(e.getCause()); } else { tuscanyMsg.setFaultBody(e);