Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.UnsupportedMediaTypeException


               throw new MethodNotAllowedException("No resource method found for " + httpMethod + ", return 405 with Allow header", res);
            }
         }
         else if (!consumeMatch)
         {
            throw new UnsupportedMediaTypeException("Cannot consume content type");
         }
         throw new NotAcceptableException("No match for accept header");
      }
      if (list.size() == 1) return list.get(0);
View Full Code Here


               throw new MethodNotAllowedException("No resource method found for " + httpMethod + ", return 405 with Allow header", res);
            }
         }
         else if (!consumeMatch)
         {
            throw new UnsupportedMediaTypeException("Cannot consume content type");
         }
         throw new NotAcceptableException("No match for accept header");
      }
      if (list.size() == 1) return list.get(0);
View Full Code Here

public class UnsupportedMediaTypeExceptionMapperTest extends
    TestExceptionMapperBase {

    @Test
    public void handleException() {
        UnsupportedMediaTypeException nae =
            new UnsupportedMediaTypeException("unacceptable");
        UnsupportedMediaTypeExceptionMapper naem =
            injector.getInstance(UnsupportedMediaTypeExceptionMapper.class);
        Response r = naem.toResponse(nae);
        assertEquals(415, r.getStatus());
        verifyMessage(r, rtmsg("unacceptable"));
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.UnsupportedMediaTypeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.