Package org.apache.cxf.greeter_control

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


        Greeter greeter = service.getGreeterPort();
        BindingProvider bp = (BindingProvider)greeter;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   "http://localhost:" + PORT + "/SpringBean");
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        String result = greeter.greetMe("World");
        assertEquals("Hello World", result);
        assertEquals("Bonjour World", greeter.sayHi());
    }
   
    private void doSessionsTest(String url) {
View Full Code Here


        String result = greeter.greetMe("World");
        assertEquals("Hello World", result);
        assertEquals("Bonjour World", greeter.sayHi());
       
        result = greeter2.greetMe("Universe");
        assertEquals("Hello Universe", result);
        assertEquals("Bonjour Universe", greeter2.sayHi());
       
        //make sure session 1 was maintained
        assertEquals("Bonjour World", greeter.sayHi());
View Full Code Here

        final Greeter greeter = gs.getGreeterPort();
        updateAddressPort(greeter, PORT);
        LOG.fine("Created greeter client.");    
        ConnectionHelper.setKeepAliveConnection(greeter, true);

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

    }
}
View Full Code Here

        greeter.greetMeOneWay("CXF");

        // two-way

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

        try {
            greeter.pingMe();
View Full Code Here

            String response;
           
            @Override
            public void run() {
                response = greeter.greetMe("twoway");
            }
  
        }
       
        TwowayThread t = new TwowayThread();   
View Full Code Here

            // assertEquals("INCOMPATIBLE_HTTPSERVERPOLICY_ASSERTIONS", ex.getCode());
        }
       
        // greetMe - no operation or message specific policies

        assertEquals("CXF", greeter.greetMe("cxf"));
    
        // pingMe - policy attached to binding operation fault should have no effect

        try {
            greeter.pingMe();
View Full Code Here

        bus.getInInterceptors().add(in);
        bus.getOutInterceptors().add(out);
       

        try {
            greeter.greetMe("mytest");
            fail("SoapFault expected");
        } catch (Exception e) {
            assertTrue("Addressing Header Required message is expected",
                       e.getMessage().contains("Addressing Property is not present"));
        }
View Full Code Here

        greeter.greetMeOneWay("CXF");

        // two-way

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

        try {
            greeter.pingMe();
View Full Code Here

        greeter.greetMeOneWay("CXF");

        // greetMe - operation policy specifies receive timeout and should cause every
        // other invocation to fail

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

        try {
            greeter.greetMe("cxf");
            fail("Didn't get the exception");
        } catch (Exception ex) {
View Full Code Here

        // 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

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.