Package org.apache.cxf.jaxrs.model

Examples of org.apache.cxf.jaxrs.model.ClassResourceInfo


    @Test
    public void testCustomSchemaJaxbContextPrefixes() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setSchemaLocations(Collections.singletonList("classpath:/book1.xsd"));
       
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here


    @Test
    public void testCustomSchemaWithImportJaxbContextPrefixes() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setSchemaLocations(Collections.singletonList("classpath:/books.xsd"));
       
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    @Test
    public void testExternalSchemaJaxbContextPrefixes() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setExternalLinks(Collections.singletonList("http://books.xsd"));
       
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    @Test
    public void testExternalRelativeSchemaJaxbContextPrefixes() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setExternalLinks(Collections.singletonList("books.xsd"));
       
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    public void testExternalSchemaCustomPrefix() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setExternalLinks(Collections.singletonList("http://books"));
        wg.setUseJaxbContextForQnames(false);
       
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    public void testCustomSchemaAndSchemaPrefixes() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setSchemaLocations(Collections.singletonList("classpath:/book2.xsd"));
        wg.setUseJaxbContextForQnames(false);
       
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    @Test
    public void testSingleRootResource() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setApplicationTitle("My Application");
        wg.setNamespacePrefix("ns");
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    @Test
    public void testTwoSchemasSameNs() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setApplicationTitle("My Application");
        wg.setNamespacePrefix("ns");
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(TestResource.class, TestResource.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
        checkResponse(r);
View Full Code Here

    }
   
    @Test
    public void testRootResourceWithSingleSlash() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        ClassResourceInfo cri =
            ResourceUtils.createClassResourceInfo(BookStoreWithSingleSlash.class,
                                                  BookStoreWithSingleSlash.class, true, true);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, null);
       
        Response r = wg.handleRequest(m, cri);
View Full Code Here

   
    @Test
    public void testMultipleRootResources() throws Exception {
        WadlGenerator wg = new WadlGenerator();
        wg.setDefaultMediaType(WadlGenerator.WADL_TYPE.toString());
        ClassResourceInfo cri1 =
            ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true);
        ClassResourceInfo cri2 =
            ResourceUtils.createClassResourceInfo(Orders.class, Orders.class, true, true);
        List<ClassResourceInfo> cris = new ArrayList<ClassResourceInfo>();
        cris.add(cri1);
        cris.add(cri2);
        Message m = mockMessage("http://localhost:8080/baz", "/bar", WadlGenerator.WADL_QUERY, cris);
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.model.ClassResourceInfo

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.