Package org.apache.cxf.frontend

Examples of org.apache.cxf.frontend.ClientProxyFactoryBean


    @Before
    public void before() {
        impl = new CollectionService();
        createService(CollectionServiceInterface.class, impl, null);
       
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.getServiceFactory().getServiceConfigurations().add(0,
                                                              new XFireCompatibilityServiceConfiguration());
        proxyFac.setServiceClass(CollectionServiceInterface.class);
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://CollectionServiceInterface");
        proxyFac.setBus(getBus());

        csi = (CollectionServiceInterface)proxyFac.create();
    }
View Full Code Here


    @Before
    public void setUp() throws Exception {
        super.setUp();
        createService(DocumentService.class, "DocService");
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
        factory.getServiceConfigurations()
            .add(0, new org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration());
        proxyFac.setServiceFactory(factory);
        proxyFac.setDataBinding(new AegisDatabinding());

        proxyFac.setAddress("local://DocService");
        proxyFac.setServiceClass(IDocumentService.class);
        proxyFac.setBus(getBus());

        Object proxyObj = proxyFac.create();
        docClient = (IDocumentService)proxyObj;
        Client client = ClientProxy.getClient(proxyObj);
        ClientImpl clientImpl = (ClientImpl)client;
        clientImpl.setSynchronousTimeout(1000000000);
    }
View Full Code Here

        assertValidBoolean("@type='xsd:int'", typeElement);
    }

    @Test
    public void testDataMovementPart() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setServiceClass(FlatArrayServiceInterface.class);
        proxyFac.setBus(getBus());

        Object proxyObj = proxyFac.create();
        FlatArrayServiceInterface client = (FlatArrayServiceInterface)proxyObj;
        client.submitStringArray(STRING_ARRAY);
        assertArrayEquals(STRING_ARRAY, service.stringArrayValue);
    }
View Full Code Here

        assertArrayEquals(STRING_ARRAY, service.stringArrayValue);
    }

    @Test
    public void testDataMovementBean() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setServiceClass(FlatArrayServiceInterface.class);
        proxyFac.setBus(getBus());

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

        client.takeBeanWithFlatArray(bwfa);
        assertArrayEquals(INT_ARRAY, service.beanWithFlatArrayValue.getValues());
    }
    @Test
    public void testFlatCollection() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://FlatArray");
        proxyFac.setServiceClass(FlatArrayServiceInterface.class);
        proxyFac.setBus(getBus());

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

        assertEquals("Channa Doll", sholder.value);
    }
   
    @Test
    public void ordinaryParamNameTest() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
        proxyFac.setServiceFactory(factory);
        proxyFac.setDataBinding(new AegisDatabinding());

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

        Echo echo = (Echo)proxyFac.create();
        String boing = echo.simpleEcho("reflection");
        assertEquals("reflection", boing);
    }
View Full Code Here

    @Before
    public void before() {
        impl = new CollectionService();
        createService(CollectionServiceInterface.class, impl, null);

        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.getServiceFactory().getServiceConfigurations().add(0,
                                                              new XFireCompatibilityServiceConfiguration());
        proxyFac.setDataBinding(new AegisDatabinding());
        proxyFac.setAddress("local://CollectionServiceInterface");
        proxyFac.setBus(getBus());

        csi = proxyFac.create(CollectionServiceInterface.class);
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        super.setUp();
        createService(DocumentService.class, "DocService");
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
        factory.getServiceConfigurations()
            .add(0, new org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration());
        proxyFac.setServiceFactory(factory);
        proxyFac.setDataBinding(new AegisDatabinding());

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

        Object proxyObj = proxyFac.create(IDocumentService.class);
        docClient = (IDocumentService)proxyObj;
        Client client = ClientProxy.getClient(proxyObj);
        ClientImpl clientImpl = (ClientImpl)client;
        clientImpl.setSynchronousTimeout(1000000000);
    }
View Full Code Here

        s.getEndpoint().getService().setInvoker(new BeanInvoker(new HelloProxyServiceImpl()));
    }

    @Test
    public void testProxy() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setAddress("local://HelloProxyService");
        proxyFac.setBus(getBus());
        AegisContext aegisContext = new AegisContext();
        aegisContext.getBeanImplementationMap().put(Hello.class, MyHello.class.getName());
        AegisDatabinding binding = new AegisDatabinding();
        binding.setAegisContext(aegisContext);

        setupAegis(proxyFac.getClientFactoryBean(), binding);
        HelloProxyService client = proxyFac.create(HelloProxyService.class);

        Hello h = client.sayHiWithProxy();
        assertTrue(h instanceof MyHello);
    }
View Full Code Here

        assertEquals("Channa Doll", sholder.value);
    }

    @Test
    public void ordinaryParamNameTest() throws Exception {
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
        proxyFac.setServiceFactory(factory);
        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

TOP

Related Classes of org.apache.cxf.frontend.ClientProxyFactoryBean

Copyright © 2018 www.massapicom. 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.