0

Are there any good alternatives to log incoming body in case of unmarshalException instead of something like:

try{
   byteRequest = IOUtils.toByteArray(request.getInputStream());
   jaxbRequest = unMarshaller.unmarshal(new ByteArrayInputStream(byteRequest));
} catch (UnmarshalException ex) {
   LOG.error("Exception unmarshalling: {}", new String(byteRequest, "UTF-8"), ex);
}
J2B
  • 1,633
  • 1
  • 15
  • 28

0 Answers0