executionContext = smooks.createExecutionContext();
} else {
executionContext = smooks.createExecutionContext(messageProfile);
}
StringResult result = new StringResult();
smooks.filterSource(executionContext, new StringSource((String) payload), result);
HashMap beanHash = new HashMap(executionContext.getBeanContext().getBeanMap());
if(beanHash != null) {
message.getBody().add(EXTRACTED_BEANS_HASH, beanHash); // Backward compatibility.
} else {
message.getBody().remove(EXTRACTED_BEANS_HASH); // Backward compatibility.
}
if(logger.isDebugEnabled()) {
long timeTaken = System.currentTimeMillis() - start;
logger.debug("Transformed message for profile [" + messageProfile + "]. Time taken: "
+ timeTaken + ". Message in:\n[" + payload.toString()+ "]. \nMessage out:\n[" + result.toString() + "].");
}
setTransformationOutput(message, result.toString(), executionContext);
} else {
logger.warn("Only java.lang.String payload types supported. Input message was of type [" + payload.getClass().getName() + "]. Returning message untransformed.");
}
} catch(Throwable thrown) {