private EntityMarshaller getViewEntityMarshaller(Method method, String className) {
EntityMarshaller viewMarshaller = new DefaultEntityMarshaller();
Returns returnsAnnotation = method.getAnnotation(Returns.class);
if (returnsAnnotation != null) {
String contentType = returnsAnnotation.value();
EntityMarshaller marshaller = entityMarshallerMap.get(contentType);
if (marshaller != null) {
viewMarshaller = marshaller;
} else {
logger.error("could not find view entity marshaller for content type "