Package org.apache.cxf.frontend

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


            }
            if (requestInfo.getAddress() != null) {
                factoryBean.setAddress(requestInfo.getAddress());
            }
           
            Object obj = factoryBean.create();
           
            setSubject(subject);
           
            return createConnectionProxy(obj, requestInfo, subject);
        } catch (WebServiceException wse) {
View Full Code Here


        factory.setWsdlURL(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl");
        factory.setServiceName(servName);
        factory.setServiceClass(DocLitWrappedCodeFirstService.class);
        factory.setEndpointName(portName);
       
        DocLitWrappedCodeFirstService port = (DocLitWrappedCodeFirstService) factory.create();       
        assertNotNull(port);

        String echoMsg = port.echo("Hello");
        assertEquals("Hello", echoMsg);
    }
View Full Code Here

        ServerFactoryBean server = (ServerFactoryBean)applicationContext.getBean("mtom-server");
       
        server.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
        server.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
       
        client = (org.apache.cxf.systest.aegis.mtom.fortest.MtomTest)proxyFac.create();
        impl = (MtomTestImpl)applicationContext.getBean("mtomImpl");
    }
   
   
    @Test
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

        ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
        clientBean.setAddress(address);
        clientBean.setServiceClass(LoanBrokerWS.class);
        // just create a new bus for use
        clientBean.setBus(BusFactory.newInstance().createBus());
        return (LoanBrokerWS) proxyFactory.create();
    }

    public static void main(String[] args) {
        LoanBrokerWS loanBroker = getProxy(url);
View Full Code Here

        ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
        ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
        clientBean.setAddress(ROUTER_ADDRESS);
        clientBean.setServiceClass(HelloService.class);
       
        HelloService client = (HelloService) proxyFactory.create();
        return client;
    }

    @Test
    public void testInvokingServiceFromCXFClient() throws Exception {       
View Full Code Here

        ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
        ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
        clientBean.setAddress(ROUTER_ADDRESS);
        clientBean.setServiceClass(HelloService.class);

        HelloService client = (HelloService) proxyFactory.create();

        String result = client.echo("hello world");
        assertEquals("we should get the right answer from router", result, "echo hello world");
        //assertTrue(writer.getString().indexOf("hello world") > 0);
View Full Code Here

            }
            if (factoryBean.getEndpointName() == null && getEndpointLocalName() != null) {
                factoryBean.setEndpointName(new QName(getEndpointNamespace(), getEndpointLocalName()));
            }

            return ((ClientProxy)Proxy.getInvocationHandler(factoryBean.create())).getClient();
        } else {
            ClientFactoryBean factoryBean = createClientFactoryBean();

            // configure client factory bean by CXF configurer
            configure(factoryBean);
View Full Code Here

                factoryBean.setEndpointName(new QName(getEndpointNamespace(), getEndpointLocalName()));
            }
           
            ObjectHelper.notNull(factoryBean.getEndpointName(), "Please provide endpoint/port name");
            ObjectHelper.notNull(factoryBean.getServiceName(), "Please provide service name");
            return (Client)factoryBean.create();
        }
    }


    /**
 
View Full Code Here

        }
        if (endpoint.getEndpointName() != null) {
            cfb.setEndpointName(endpoint.getEndpointName());
        }
        cfb.setConduitSelector(new NullConduitSelector());
        client = (ClientImpl)((ClientProxy)Proxy.getInvocationHandler(cfb.create())).getClient();
    }

    public Endpoint getEndpoint() {
        return producer.getEndpoint();
    }
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.