Package org.apache.cxf.jaxrs.client

Examples of org.apache.cxf.jaxrs.client.WebClient.back()


    // PUT the items to be added to the "quotes" container
    response = wc.path("1").type(MediaType.TEXT_PLAIN)
        .put("Something is rotten in the state of Denmark");
    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("2").type(MediaType.TEXT_PLAIN).put("I could be bounded in a nutshell");
    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    assertEquals(createdResponse, response.getStatus());
View Full Code Here


    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("2").type(MediaType.TEXT_PLAIN).put("I could be bounded in a nutshell");
    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");
    assertEquals(createdResponse, response.getStatus());
View Full Code Here

    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    assertEquals(createdResponse, response.getStatus());

    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");
    assertEquals(createdResponse, response.getStatus());

    // check that there are four items in the container "quotes"
    wc.back(true).path("containers/quotes");
    Container container = wc.accept(MediaType.APPLICATION_XML).get(Container.class);
View Full Code Here

    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");
    assertEquals(createdResponse, response.getStatus());

    // check that there are four items in the container "quotes"
    wc.back(true).path("containers/quotes");
    Container container = wc.accept(MediaType.APPLICATION_XML).get(Container.class);
    int numberOfItems = container.getItem().size();
    int expectedNumber = 4;
    assertEquals("Expected: " + expectedNumber + " items, Seeing: " + numberOfItems,
        expectedNumber, numberOfItems);
View Full Code Here

    // PUT the container "quotes"
    Response response = wc.path("containers/quotes").put(quotesContainer);
    response = wc.path("1").type(MediaType.TEXT_PLAIN)
        .put("Something is rotten in the state of Denmark");
    response = wc.back(false).path("2").type(MediaType.TEXT_PLAIN).put("I could be bounded in a nutshell");
    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");

    // delete item 3
    wc.back(false).path("3").delete();
View Full Code Here

    // PUT the container "quotes"
    Response response = wc.path("containers/quotes").put(quotesContainer);
    response = wc.path("1").type(MediaType.TEXT_PLAIN)
        .put("Something is rotten in the state of Denmark");
    response = wc.back(false).path("2").type(MediaType.TEXT_PLAIN).put("I could be bounded in a nutshell");
    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");

    // delete item 3
    wc.back(false).path("3").delete();
View Full Code Here

    Response response = wc.path("containers/quotes").put(quotesContainer);
    response = wc.path("1").type(MediaType.TEXT_PLAIN)
        .put("Something is rotten in the state of Denmark");
    response = wc.back(false).path("2").type(MediaType.TEXT_PLAIN).put("I could be bounded in a nutshell");
    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");

    // delete item 3
    wc.back(false).path("3").delete();

    // search the container for all items containing the word "king"
View Full Code Here

    response = wc.back(false).path("2").type(MediaType.TEXT_PLAIN).put("I could be bounded in a nutshell");
    response = wc.back(false).path("3").type(MediaType.TEXT_PLAIN).put("catch the conscience of the king");
    response = wc.back(false).path("4").type(MediaType.TEXT_PLAIN).put("Get thee to a nunnery");

    // delete item 3
    wc.back(false).path("3").delete();

    // search the container for all items containing the word "king"
    wc.back(true).path("containers/quotes").query("search", "king");
    Container container = wc.accept(MediaType.APPLICATION_XML).get(Container.class);
    int numberOfItems = (container.getItem() == null) ? 0 : container.getItem().size();
View Full Code Here

    // delete item 3
    wc.back(false).path("3").delete();

    // search the container for all items containing the word "king"
    wc.back(true).path("containers/quotes").query("search", "king");
    Container container = wc.accept(MediaType.APPLICATION_XML).get(Container.class);
    int numberOfItems = (container.getItem() == null) ? 0 : container.getItem().size();
    int expectedNumber = 0;
    assertEquals("Expected: " + expectedNumber
        + " items which pass the search criterion, Seeing: " + numberOfItems,
View Full Code Here

            .accept("application/atom+xml;type=entry");
        for (int i = 0; i < 8; i++) {
            Entry entry = wcEntry.path("entry/" + i).get(Entry.class);
            entry.toString();
            entries.add(entry);
            wcEntry.back(true);
        }
        checkSimpleFeed(entries);
    }
   
    private void checkSimpleFeed(List<Entry> entries) throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.