Package org.apache.cxf.frontend

Examples of org.apache.cxf.frontend.ClientProxyFactoryBean.create()


        proxyFac.setDataBinding(new AegisDatabinding());

        proxyFac.setAddress("local://Echo");
        proxyFac.setBus(getBus());

        Echo echo = proxyFac.create(Echo.class);
        String boing = echo.simpleEcho("reflection");
        assertEquals("reflection", boing);
    }

}
View Full Code Here


        setupAegis(pf.getClientFactoryBean(), binding);
        pf.getServiceFactory().setProperties(props);
        pf.setAddress("local://WS1");
        pf.setProperties(props);

        client = pf.create(WS1.class);

        Server server = createService(WS1.class, new WS1Impl(), "WS1", binding);
        new LoggingFeature().initialize(server, null);
        server.getEndpoint().getService().setInvoker(new BeanInvoker(new WS1Impl()));
    }
View Full Code Here

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setAddress("local://IInterfaceService");
        proxyFac.setBus(getBus());
        setupAegis(proxyFac.getClientFactoryBean());

        IInterfaceService client = proxyFac.create(IInterfaceService.class);

        IChild child = client.getChild();
        assertNotNull(child);
        assertEquals("child", child.getChildName());
        assertEquals("parent", child.getParentName());
View Full Code Here

        clientBean.setTransportId("http://schemas.xmlsoap.org/soap/http");
        clientBean.setServiceClass(HelloService.class);
        clientBean.setBus(getBus());
        clientBean.getInInterceptors().add(new LoggingInInterceptor());
       
        HelloService client = (HelloService) proxyFactory.create();
       
        ClientImpl c = (ClientImpl)ClientProxy.getClient(client);
        c.getOutInterceptors().add(new LoggingOutInterceptor());
        c.getInInterceptors().add(new LoggingInInterceptor());
       
View Full Code Here

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setBus(getBus());

        FlatArrayServiceInterface client = proxyFac.create(FlatArrayServiceInterface.class);
        client.submitStringArray(STRING_ARRAY);
        assertArrayEquals(STRING_ARRAY, service.stringArrayValue);
    }

    @Test
View Full Code Here

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setBus(getBus());

        FlatArrayServiceInterface client = proxyFac.create(FlatArrayServiceInterface.class);
        BeanWithFlatArray bwfa = new BeanWithFlatArray();
        bwfa.setValues(INT_ARRAY);
        client.takeBeanWithFlatArray(bwfa);
        assertArrayEquals(INT_ARRAY, service.beanWithFlatArrayValue.getValues());
    }
View Full Code Here

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setBus(getBus());

        FlatArrayServiceInterface client = proxyFac.create(FlatArrayServiceInterface.class);
        BeanWithFlatCollection bwfc = new BeanWithFlatCollection();
        bwfc.getValues().add(1);
        bwfc.getValues().add(2);
        bwfc.getValues().add(3);
        bwfc = client.echoBeanWithFlatCollection(bwfc);
View Full Code Here

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setAddress("local://ExceptionService");
        proxyFac.setBus(getBus());
        setupAegis(proxyFac.getClientFactoryBean());

        ExceptionService client = proxyFac.create(ExceptionService.class);

        try {
            client.sayHiWithException();
            fail("Must throw exception!");
        } catch (HelloException e) {
View Full Code Here

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setAddress("local://ExceptionServiceJaxWs1");
        proxyFac.setBus(getBus());
        setupAegis(proxyFac.getClientFactoryBean());

        ExceptionService clientInterface = proxyFac.create(ExceptionService.class);

        clientInterface.sayHiWithException();
    }

    @Test(expected = HelloException.class)
View Full Code Here

        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
      
        factory.setServiceClass(University.class);
        factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
        factory.setAddress("local://dlbTest");
        University client = (University) factory.create();
      
        Teacher tr = client.getTeacher(new Course(40, "Intro to CS", "Introductory Comp Sci"));
        assertNotNull(tr);
        assertEquals(52, tr.getAge());
        assertEquals("Mr. Tom", tr.getName());
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.