// let velocity parse and generate the result in buffer
VelocityEngine engine = getVelocityEngine();
if (log.isDebugEnabled()) {
log.debug("Velocity is evaluating using velocity context: " + variableMap);
}
engine.evaluate(velocityContext, buffer, logTag, reader);
// now lets output the results to the exchange
Message out = exchange.getOut(true);
out.setBody(buffer.toString());
Map<String, Object> headers = (Map<String, Object>) velocityContext.get("headers");