// MediaType contentType = request.getHttpHeaders().getMediaType();
List<MediaType> accepts = request.getHttpHeaders().getAcceptableMediaTypes();
if (!isResponseMediaTypeAllowed(accepts))
{
throw new NotAcceptableException("No match for accept header");
}
ResourceMethod invoker = null;
for (ResourceMethod rm : methods)