Package org.apache.cxf.frontend

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


                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


        if (wsdlLocation != null)
        {
            cpf.setWsdlURL(wsdlLocation);
        }

        Client client = cpf.create();

        Binding binding = client.getEndpoint().getBinding();
        CxfUtils.removeInterceptor(binding.getOutInterceptors(), WrappedOutInterceptor.class.getName());
        CxfUtils.removeInterceptor(binding.getInInterceptors(), Soap11FaultInInterceptor.class.getName());
        CxfUtils.removeInterceptor(binding.getInInterceptors(), Soap12FaultInInterceptor.class.getName());
View Full Code Here

        if(soapVersion != null)
        {
            cpf.setBindingId(CxfUtils.getBindingIdForSoapVersion(soapVersion));
        }

        return cpf.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

        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);
        assertEquals(extraClass[1], GreetMeOneWay.class);
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

        pf.setServiceClass(WS1.class);
        pf.getServiceFactory().setProperties(props);
        pf.setAddress("local://WS1");
        pf.setProperties(props);
        ClientFactoryBean cfb = pf.getClientFactoryBean();
        cfb.create();

        AegisDatabinding db = (AegisDatabinding)cfb.getServiceFactory().getDataBinding();
        AegisContext context = db.getAegisContext();
        assertTrue(context.isWriteXsiTypes());
        assertFalse(context.isReadXsiTypes());
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.