class MessageExtractor {

    public void extract(final WilmaHttpEntity message) {
        String body = message.getBody();
        try {
            base64DecoderProcessor.process(message);
            fastInfosetDecompressorProcessor.process(message);
        } catch (SystemException | ApplicationException e) {
            String loggerID = message.getWilmaMessageLoggerId();
            LOGGER.info("Failed to extract message content! ID: " + loggerID + ". Restoring original content...", e);
            message.setBody(body);
        } finally {
            closeStream(message);
        }
    }

}