SerializationContext context = new SerializationContext(writer);
serializer.serialize(
xmlType, null, reportDefinition, context);
return sanitize(writer.toString());
} catch (IllegalArgumentException e) {
throw new SerializationException("Could not serialize report.", e);
} catch (SecurityException e) {
throw new SerializationException("Could not serialize report.", e);
} catch (IllegalAccessException e) {
throw new SerializationException("Could not serialize report.", e);
} catch (InvocationTargetException e) {
throw new SerializationException("Could not serialize report.", e);
} catch (NoSuchMethodException e) {
throw new SerializationException("Could not serialize report.", e);
} catch (IOException e) {
throw new SerializationException("Could not serialize report.", e);
}
}