report.setMessage(msg);
BaseProvider<ActionReportResult> provider;
String type = getAcceptedMimeType(req);
if ("xml".equals(type)) {
res.setContentType("application/xml");
provider = new ActionReportResultXmlProvider();
} else if ("json".equals(type)) {
res.setContentType("application/json");
provider = new ActionReportResultJsonProvider();
} else {
res.setContentType("text/html");