try {
ExecutionContext executionContext = smooks.createExecutionContext();
JavaResult result = new JavaResult();
// Configure the execution context to generate a report...
executionContext.setEventListener(new HtmlReportGenerator("target/report/report.html"));
smooks.filterSource(executionContext, new StringSource(messageIn), result);
return (List<Customer>) result.getBean("customerList");
} finally {