Message message = MessageFactory.getInstance().getMessage();
try {
payloadProxy.setPayload(message, getPayload(inputFile));
} catch (IOException e) {
throw new MessageDeliverException("Error reading remote input file '" + inputFile.getAbsolutePath() + "'.", e);
} catch (RemoteFileSystemException e) {
throw new MessageDeliverException("Error reading remote input file '" + inputFile.getAbsolutePath() + "'.", e);
} catch (MimeDecodeException e) {
throw new MessageDeliverException("Error decoding input file '" + inputFile.getAbsolutePath() + "' payload using '" + mimeDecoder.getClass().getName() + "'. Wrong MimeDecoder, or MimeDecoder may require additional configuration.", e);
}
return message;
}