Examples of GreeterService


Examples of org.apache.camel.hello_world_soap_http.GreeterService

        Bus bus = bf.createBus(busFile.toString());
        BusFactory.setDefaultBus(bus);
        BusFactory.setThreadDefaultBus(bus);
       
        GreeterService gs = new GreeterService();
        Greeter greeter = gs.getGreeterSignaturePort();
        
        ((BindingProvider)greeter).getRequestContext().put(
                BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                "http://localhost:" + CXFTestSupport.getPort2()
                + "/WSSecurityRouteTest/GreeterSignaturePort"
View Full Code Here

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

            installBundle("org.apache.cxf.dosgi", "cxf-dosgi-ri-dsw-cxf", null, "jar");
        }
    }

    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

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

        // TODO : get this address using a DistributionProvider interface
        String address = "http://localhost:9090/greeter";
        waitForEndpoint(address);
       
        //do the invocation using a CXF api
        GreeterService greeter1 = null;
        try {
            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
            factory.setServiceClass(GreeterService.class);
            factory.setAddress(address);
            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
View Full Code Here

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

    protected void useService(final BundleContext bc, ServiceReference reference) {
        Object svc = bc.getService(reference);
        if (!(svc instanceof GreeterService)) {
            return;
        }
        final GreeterService greeter = (GreeterService) svc;

        Thread t = new Thread(new Runnable() {
            public void run() {
                greeterUI(bc, greeter);
            }
View Full Code Here

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

        try {
            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 {
                    private String name;
                    private int age;
                    private boolean exception;

                    GreeterDataImpl(String n, int a, boolean ex) {
                        name = n;
                        age = a;
                        exception = ex;
                    }
                   
                    public String getName() {
                        return name;
                    }

                    public int getAge() {
                        return age;
                    }

                    public boolean isException() {
                        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

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

    protected void useService(final BundleContext bc, ServiceReference reference) {
        Object svc = bc.getService(reference);
        if (!(svc instanceof GreeterService)) {
            return;
        }
        final GreeterService greeter = (GreeterService) svc;

        Thread t = new Thread(new Runnable() {
            public void run() {
                greeterUI(bc, greeter);
            }
View Full Code Here

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

            installBundle("org.apache.cxf.dosgi", "cxf-dosgi-ri-dsw-cxf", null, "jar");
        }
    }

    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

Examples of org.apache.cxf.dosgi.samples.greeter.GreeterService

        // TODO : get this address using a DistributionProvider interface
        String address = "http://localhost:9090/greeter";
        waitForEndpoint(address);
       
        //do the invocation using a CXF api
        GreeterService greeter1 = null;
        try {
            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
            factory.setServiceClass(GreeterService.class);
            factory.setAddress(address);
            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
View Full Code Here

Examples of org.apache.cxf.dosgi.samples.greeter.rest.GreeterService

    protected void useGreeterService(final BundleContext bc, ServiceReference reference) {
        Object svc = bc.getService(reference);
        if (!(svc instanceof GreeterService)) {
            return;
        }
        final GreeterService greeter = (GreeterService) svc;

        Thread t = new Thread(new Runnable() {
            public void run() {
                greeterUI(bc, greeter);
            }
View Full Code Here

Examples of org.apache.cxf.dosgi.samples.greeter.rest.GreeterService

            installBundle("org.apache.cxf.dosgi", "cxf-dosgi-ri-dsw-cxf", null, "jar");
        }
    }

    private GreeterInfo 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.