if (responseMediaType == null) {
Set<MediaType> producedMime = null;
SearchResult searchResult = context.getAttribute(SearchResult.class);
if (searchResult != null && searchResult.isFound()) {
MethodMetadata methodMetadata = searchResult.getMethod().getMetadata();
producedMime = methodMetadata.getProduces();
logger.debug("Determining Content-Type from @Produces on method: {}", producedMime); //$NON-NLS-1$
}
if (producedMime == null || producedMime.isEmpty()) {
if (result instanceof Response) {
Response response = (Response)result;