Package org.apache.cxf.jaxrs.client

Examples of org.apache.cxf.jaxrs.client.Client.header()


    public void testBookWithWebSocket() throws Exception {
        String address = "ws://localhost:" + getPort() + "/websocket";

        BookStoreWebSocket resource = JAXRSClientFactory.create(address, BookStoreWebSocket.class);
        Client client = WebClient.client(resource);
        client.header(HttpHeaders.USER_AGENT, JAXRSClientConduitWebSocketTest.class.getName());
       
        // call the GET service
        assertEquals("CXF in Action", new String(resource.getBookName()));

        // call the GET service in text mode
View Full Code Here


    public void testBookWithWebSocket() throws Exception {
        String address = "ws://localhost:" + getPort() + "/websocket";

        BookStoreWebSocket resource = JAXRSClientFactory.create(address, BookStoreWebSocket.class);
        Client client = WebClient.client(resource);
        client.header(HttpHeaders.USER_AGENT, JAXRSClientConduitWebSocketTest.class.getName());
       
        // call the GET service
        assertEquals("CXF in Action", new String(resource.getBookName()));

        // call the GET service in text mode
View Full Code Here

    public void testCallsWithIDReferences() throws Exception {
        String address = "ws://localhost:" + getPort() + "/websocket";

        BookStoreWebSocket resource = JAXRSClientFactory.create(address, BookStoreWebSocket.class, null, true);
        Client client = WebClient.client(resource);
        client.header(HttpHeaders.USER_AGENT, JAXRSClientConduitWebSocketTest.class.getName());
       
        // call the POST service twice (a unique requestId is automatically included to correlate the response)
        EchoBookIdRunner[] runners = new EchoBookIdRunner[2];
        runners[0] = new EchoBookIdRunner(resource, 549);
        runners[1] = new EchoBookIdRunner(resource, 495);
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.