Package org.apache.cxf.greeter_control

Examples of org.apache.cxf.greeter_control.Greeter.greetMe()


        // other invocation to fail

        assertEquals("CXF", greeter.greetMe("cxf"));

        try {
            greeter.greetMe("cxf");
            fail("Didn't get the exception");
        } catch (Exception ex) {
            //ex.printStackTrace();
            assertTrue(ex.getCause().getClass().getName(), ex.getCause() instanceof SocketTimeoutException);
        }
View Full Code Here


        for (int i = 0; i < 20; i++) {
            Greeter g = getGreeter(inactiveReplica);
            verifyStrategy(g, expectRandom
                              ? RandomStrategy.class
                              : SequentialStrategy.class);
            String response = g.greetMe("fred");
            assertNotNull("expected non-null response", response);
            String currEndpoint = getCurrentEndpoint(g);
            if (!(prevEndpoint == null || currEndpoint.equals(prevEndpoint))) {
                randomized = true;
            }
View Full Code Here

        for (int i = 0; i < 20; i++) {
            Greeter g = getGreeter(inactiveReplica);
            verifyStrategy(g, expectRandom
                              ? RandomStrategy.class
                              : SequentialStrategy.class);
            String response = g.greetMe("fred");
            assertNotNull("expected non-null response", response);
            String currEndpoint = getCurrentEndpoint(g);
            if (!(prevEndpoint == null || currEndpoint.equals(prevEndpoint))) {
                randomized = true;
            }
View Full Code Here

            }

            List<String> cookies = Arrays.asList(new String[] {"a=a", "b=b"});
            headers.put("Cookie", cookies);
           
            String greeting = greeter.greetMe("Bonjour");
            String cookie = "";
            if (greeting.indexOf(';') != -1) {
                cookie = greeting.substring(greeting.indexOf(';'));
                greeting = greeting.substring(0, greeting.indexOf(';'));
            }
View Full Code Here

            assertNotNull("no response received from service", greeting);
            assertEquals("Hello Bonjour", greeting);
            assertTrue(cookie.contains("a=a"));
            assertTrue(cookie.contains("b=b"));

            greeting = greeter.greetMe("Hello");
            cookie = "";
            if (greeting.indexOf(';') != -1) {
                cookie = greeting.substring(greeting.indexOf(';'));
                greeting = greeting.substring(0, greeting.indexOf(';'));
            }
View Full Code Here

            assertEquals("Hello Bonjour", greeting);
            assertTrue(cookie.contains("a=a"));
            assertTrue(cookie.contains("b=b"));
           
           
            greeting = greeter.greetMe("NiHao");
            cookie = "";
            if (greeting.indexOf(';') != -1) {
                cookie = greeting.substring(greeting.indexOf(';'));
                greeting = greeting.substring(0, greeting.indexOf(';'));
            }
View Full Code Here

        try {
            Greeter greeter = service.getGreeterPort();
            updateAddressPort(greeter, PORT);

            String greeting = greeter.greetMe("Bonjour");
           
            assertNotNull("no response received from service", greeting);
            assertEquals("Hello Bonjour", greeting);
           
            greeting = greeter.greetMe("Hello");
View Full Code Here

            String greeting = greeter.greetMe("Bonjour");
           
            assertNotNull("no response received from service", greeting);
            assertEquals("Hello Bonjour", greeting);
           
            greeting = greeter.greetMe("Hello");
            assertNotNull("no response received from service", greeting);
            assertEquals("Hello Hello", greeting);
           
           
            greeting = greeter.greetMe("NiHao");
View Full Code Here

            greeting = greeter.greetMe("Hello");
            assertNotNull("no response received from service", greeting);
            assertEquals("Hello Hello", greeting);
           
           
            greeting = greeter.greetMe("NiHao");
            assertNotNull("no response received from service", greeting);
            assertEquals("Hello NiHao", greeting);

        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
View Full Code Here

        Greeter greeter = service.getGreeterPort();
        BindingProvider bp = (BindingProvider)greeter;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   "http://localhost:" + PORT + "/PerRequest");
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        String result = greeter.greetMe("World");
        assertEquals("Hello World", result);
        assertEquals("Bonjour default", greeter.sayHi());
    }
    @Test   
    public void testInvocationWithSpringBeanAnnotation() 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.