Package org.apache.cxf.frontend

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


        ClientFactoryBean cfBean = new ClientFactoryBean();
        cfBean.setAddress("http://localhost/Hello");
        cfBean.setBus(getBus());
        cfBean.setServiceClass(HelloService.class);
       
        Client client = cfBean.create();
        assertNotNull(client);
       
        Service service = client.getEndpoint().getService();
        Map<QName, Endpoint> eps = service.getEndpoints();
        assertEquals(1, eps.size());
View Full Code Here


            props = new HashMap<String, Object>();
        }
        props.put("jaxb.additionalContextClasses",
                  new Class[] {GreetMe.class, GreetMeOneWay.class});
        cfBean.setProperties(props);
        Client client = cfBean.create();
        assertNotNull(client);
        Class<?>[] extraClass = ((JAXBDataBinding)cfBean.getServiceFactory().getDataBinding())
            .getExtraClass();
        assertEquals(extraClass.length, 2);
        assertEquals(extraClass[0], GreetMe.class);
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

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

    }

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

            checkName(portName, "endpoint/port name");
            checkName(serviceName, "service name");
            ClientFactoryBean factoryBean = createClientFactoryBean();
            // setup client factory bean
            setupClientFactoryBean(factoryBean);
            return factoryBean.create();
        }
       
    }
   
    void checkName(Object value, String name) {
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

                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

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.