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,703
  • 2
  • 16
  • 31

0 Answers0