Package com.fasterxml.jackson.jaxrs.json

Examples of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider


    @Test
    public void testMultipart() throws Exception {
       
        String endpointAddress = "http://localhost:" + PORT + "/webapp/multipart";
        MultipartStore proxy = JAXRSClientFactory.create(endpointAddress, MultipartStore.class,
            Collections.singletonList(new JacksonJsonProvider()));
        Book json = new Book("json", 1L);
        InputStream is1 =  getClass().getResourceAsStream("/org/apache/cxf/systest/jaxrs/resources/java.jpg");
       
        Map<String, Object> attachments = proxy.addBookJsonImageStream(json, is1);
        assertEquals(2, attachments.size());
View Full Code Here


    public void testGetSuperBookCollectionProxy() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/store2";
        BookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress, BookStoreSpring.class,
            Collections.singletonList(new JacksonJsonProvider()));
        List<SuperBook> books = proxy.getSuperBookCollectionJson();
        assertEquals(999L, books.get(0).getId());
    }
View Full Code Here

    public void testEchoSuperBookCollectionProxy() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/store2";
        BookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress, BookStoreSpring.class,
            Collections.singletonList(new JacksonJsonProvider()));
        WebClient.getConfig(proxy).getHttpConduit().getClient().setReceiveTimeout(10000000L);
        List<SuperBook> books =
            proxy.echoSuperBookCollectionJson(Collections.singletonList(new SuperBook("Super", 124L, true)));
        assertEquals(124L, books.get(0).getId());
        assertTrue(books.get(0).isSuperBook());
View Full Code Here

    public void testEchoSuperBookProxy() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/store2";
        BookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress, BookStoreSpring.class,
            Collections.singletonList(new JacksonJsonProvider()));
        SuperBook book = proxy.echoSuperBookJson(new SuperBook("Super", 124L, true));
        assertEquals(124L, book.getId());
        assertTrue(book.isSuperBook());
    }
View Full Code Here

    public void testEchoGenericSuperBookCollectionProxy() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/custombus/genericstore";
        GenericBookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress,
            GenericBookStoreSpring.class, Collections.singletonList(new JacksonJsonProvider()));
        List<SuperBook> books =
            proxy.echoSuperBookCollectionJson(Collections.singletonList(new SuperBook("Super", 124L, true)));
        assertEquals(124L, books.get(0).getId());
        assertTrue(books.get(0).isSuperBook());
    }
View Full Code Here

    public void testEchoGenericSuperBookProxy() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/custombus/genericstore";
        GenericBookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress,
            GenericBookStoreSpring.class, Collections.singletonList(new JacksonJsonProvider()));
        WebClient.getConfig(proxy).getHttpConduit().getClient().setReceiveTimeout(1000000000L);
        SuperBook book = proxy.echoSuperBookJson(new SuperBook("Super", 124L, true));
        assertEquals(124L, book.getId());
        assertTrue(book.isSuperBook());
    }
View Full Code Here

    public void testEchoGenericSuperBookProxy2Json() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/genericstore2";
        GenericBookStoreSpring2 proxy = JAXRSClientFactory.create(endpointAddress,
            GenericBookStoreSpring2.class, Collections.singletonList(new JacksonJsonProvider()));
        WebClient.getConfig(proxy).getHttpConduit().getClient().setReceiveTimeout(1000000000L);
        WebClient.client(proxy).type("application/json").accept("application/json");
        SuperBook book = proxy.echoSuperBook(new SuperBook("Super", 124L, true));
        assertEquals(124L, book.getId());
        assertTrue(book.isSuperBook());
View Full Code Here

    public void testEchoGenericSuperBookProxy2JsonType() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/genericstore2type";
        GenericBookStoreSpring2 proxy = JAXRSClientFactory.create(endpointAddress,
            GenericBookStoreSpring2.class, Collections.singletonList(new JacksonJsonProvider()));
        WebClient.getConfig(proxy).getHttpConduit().getClient().setReceiveTimeout(1000000000L);
        WebClient.client(proxy).type("application/json").accept("application/json");
        SuperBook2 book = proxy.echoSuperBookType(new SuperBook2("Super", 124L, true));
        assertEquals(124L, book.getId());
        assertTrue(book.isSuperBook());
View Full Code Here

    public void testEchoGenericSuperBookCollectionProxy2Json() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/genericstore2";
        GenericBookStoreSpring2 proxy = JAXRSClientFactory.create(endpointAddress,
            GenericBookStoreSpring2.class, Collections.singletonList(new JacksonJsonProvider()));
        WebClient.client(proxy).type("application/json").accept("application/json");
        List<SuperBook> books =
            proxy.echoSuperBookCollection(Collections.singletonList(new SuperBook("Super", 124L, true)));
        assertEquals(124L, books.get(0).getId());
        assertTrue(books.get(0).isSuperBook());
View Full Code Here

    public void testEchoGenericSuperBookCollectionProxy2JsonType() throws Exception {
       
        String endpointAddress =
            "http://localhost:" + PORT + "/webapp/genericstore2type";
        GenericBookStoreSpring2 proxy = JAXRSClientFactory.create(endpointAddress,
            GenericBookStoreSpring2.class, Collections.singletonList(new JacksonJsonProvider()));
        WebClient.client(proxy).type("application/json").accept("application/json");
        List<SuperBook2> books =
            proxy.echoSuperBookTypeCollection(Collections.singletonList(new SuperBook2("Super", 124L, true)));
        assertEquals(124L, books.get(0).getId());
        assertTrue(books.get(0).isSuperBook());
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider

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.