ExecutionContext executionContext = smooks.createExecutionContext();
StringSource stringSource = new StringSource(new String(message));
StringResult stringResult = new StringResult();
// Configure the execution context to generate a report...
executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));
// Filter the message to the outputWriter, using the execution context...
smooks.filterSource(executionContext, stringSource, stringResult);
return stringResult.toString();