Package org.apache.cxf.frontend

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


    public void testClientServer() throws Exception {
        ClientFactoryBean cfb = new ClientFactoryBean();
        cfb.setBindingId(ObjectBindingFactory.BINDING_ID);
        cfb.setServiceClass(EchoImpl.class);
        cfb.setAddress("local://Echo");
        Client client = cfb.create();

        ServerFactoryBean sfb = new ServerFactoryBean();
        sfb.setBindingId(ObjectBindingFactory.BINDING_ID);
        sfb.setServiceClass(EchoImpl.class);
        sfb.setAddress("local://Echo");
View Full Code Here


        if (client == null) {
            ClientFactoryBean cfBean = new ClientFactoryBean();
            cfBean.setAddress(getEndpoint().getEndpointUri());
            cfBean.setBus(endpoint.getBus());
            cfBean.setServiceClass(Class.forName(endpoint.getProperty(CxfConstants.SEI)));
            client = cfBean.create();
        }
    }

    @Override
    protected void doStop() throws Exception {
View Full Code Here

            checkName(getServiceName(), "service name");

            ClientFactoryBean factoryBean = createClientFactoryBean();
            // setup client factory bean
            setupClientFactoryBean(factoryBean);
            return factoryBean.create();
        }
    }

    protected void checkName(Object value, String name) {
        if (ObjectHelper.isEmpty(value)) {
View Full Code Here

            checkName(serviceName, "service name");

            ClientFactoryBean factoryBean = createClientFactoryBean();
            // setup client factory bean
            setupClientFactoryBean(factoryBean);
            return factoryBean.create();
        }
    }

    void checkName(Object value, String name) {
        if (ObjectHelper.isEmpty(value)) {
View Full Code Here

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


    /**
 
View Full Code Here

            cls = getServiceClass();
            // create client factory bean
            ClientFactoryBean factoryBean = createClientFactoryBean(cls);
            // setup client factory bean
            setupClientFactoryBean(factoryBean, cls);
            Client client = factoryBean.create();
            // setup the handlers
            setupHandlers(factoryBean, client);
            return client;
        } else {
            // create the client without service class
View Full Code Here

            checkName(serviceName, "service name");

            ClientFactoryBean factoryBean = createClientFactoryBean();
            // setup client factory bean
            setupClientFactoryBean(factoryBean, null);
            return factoryBean.create();
        }
    }

    void checkName(Object value, String name) {
        if (ObjectHelper.isEmpty(value)) {
View Full Code Here

    public void testClient() throws Exception {
        ClientFactoryBean cfb = new ClientFactoryBean();
        cfb.setBindingId(ObjectBindingFactory.BINDING_ID);
        cfb.setServiceClass(EchoImpl.class);
        cfb.setAddress("local://Echo");
        Client client = cfb.create();

        final List<Object> content = new ArrayList<Object>();
        content.add("Hello");

        final Destination d = getLocalDestination("local://Echo");
View Full Code Here

    public void testClientServer() throws Exception {
        ClientFactoryBean cfb = new ClientFactoryBean();
        cfb.setBindingId(ObjectBindingFactory.BINDING_ID);
        cfb.setServiceClass(EchoImpl.class);
        cfb.setAddress("local://Echo");
        Client client = cfb.create();

        ServerFactoryBean sfb = new ServerFactoryBean();
        sfb.setBindingId(ObjectBindingFactory.BINDING_ID);
        sfb.setServiceClass(EchoImpl.class);
        sfb.setAddress("local://Echo");
View Full Code Here

            cls = getServiceClass();
            // create client factory bean
            ClientFactoryBean factoryBean = createClientFactoryBean(cls);
            // setup client factory bean
            setupClientFactoryBean(factoryBean, cls);
            Client client = factoryBean.create();
            // setup the handlers
            setupHandlers(factoryBean, client);
            return client;
        } else {
            // create the client without service class
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.