I was wondering if something similar to this is possible or if there's a
better way to do it:
public class WebServiceExceptionMapper implements ExceptionMapper<Exception>
{
private static Logger logger =
LoggerFactory.getLogger(WebServiceExceptionMapper.class);
@Override
public Response toResponse(Exception ex, Message requestMessage) {
logger.error("request=" + httpMessage.etc..etc.., ex);
return Response.status(Status.INTERNAL_SERVER_ERROR).build();
}
}
Basically I would like to be able to log not just the exception but the
request message that triggered the error. More specifically if the request
contains a JSON or XML I would like to grab that.
--
View this message in context:
http://cxf.547215.n5.nabble.com/Apache-CXF-ExceptionMapper-with-request-message-tp5749201.html
Sent from the cxf-user mailing list archive at Nabble.com.