MultiPart mp = response.readEntity(MultiPart.class);
Inbound inbound = new RestPayloadImpl.Inbound();
setActionReport(RestPayloadImpl.Inbound.fillFromMultipart(mp, inbound, logger));
if (logger.isLoggable(Level.FINER)) {
logger.log(Level.FINER, "------ PAYLOAD ------");
Iterator<Part> parts = inbound.parts();
while (parts.hasNext()) {
Part part = parts.next();
logger.log(Level.FINER, " - {0} [{1}]", new Object[]{part.getName(), part.getContentType()});
}
logger.log(Level.FINER, "---- END PAYLOAD ----");