Package org.apache.cxf.dosgi.samples.greeter

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService.greetMe()


    private Map<GreetingPhrase, String> useService(ServiceReference sref) {
        GreeterService hs = (GreeterService)bundleContext.getService(sref);
        assertNotNull(hs);
        try {
            return hs.greetMe("Fred");
        } catch (Exception ex) {
            fail("unexpected exception");
        }
        return null;
    }
View Full Code Here


            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
            factory.setServiceClass(GreeterService.class);
            factory.setAddress("http://localhost:9090/greeter");
            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
            GreeterService client = (GreeterService)factory.create();
            Map<GreetingPhrase, String> greetings = client.greetMe("Fred");
            Assert.assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
            System.out.println("Invocation result: " + greetings);
           
            try {
                class GreeterDataImpl implements GreeterData {
View Full Code Here

                        return exception;
                    }               
                }
               
                GreeterData gd = new GreeterDataImpl("Stranger", 11, true);
                client.greetMe(gd);
                Assert.fail("GreeterException has to be thrown");
            } catch (GreeterException ex) {
                Assert.assertEquals("Wrong exception message",
                             "GreeterService can not greet Stranger",
                             ex.toString());
View Full Code Here

    private Map<GreetingPhrase, String> useService(ServiceReference sref) {
        GreeterService hs = (GreeterService)bundleContext.getService(sref);
        assertNotNull(hs);
        try {
            return hs.greetMe("Fred");
        } catch (Exception ex) {
            fail("unexpected exception");
        }
        return null;
    }
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.