use of org.apache.cxf.frontend.ClientProxyFactoryBean in project camel by apache.
the class CamelRouteClient method createCXFClient.
protected static IncidentService createCXFClient() {
// we use CXF to create a client for us as its easier than JAXWS and works
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(IncidentService.class);
factory.setAddress(URL);
return (IncidentService) factory.create();
}
use of org.apache.cxf.frontend.ClientProxyFactoryBean in project camel by apache.
the class Client method getProxy.
public static LoanBrokerWS getProxy(String address) {
// Now we use the simple front API to create the client proxy
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
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();
}
use of org.apache.cxf.frontend.ClientProxyFactoryBean in project camel by apache.
the class CamelCxfBeanInjectTest method createClient.
private SimpleService createClient() {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setAddress(ENDPOINT_ADDRESS);
factory.setServiceClass(SimpleService.class);
factory.setBus(BusFactory.getDefaultBus());
return (SimpleService) factory.create();
}
use of org.apache.cxf.frontend.ClientProxyFactoryBean in project camel by apache.
the class CxfSimpleRouterTest method getCXFClient.
protected HelloService getCXFClient() throws Exception {
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
clientBean.setAddress(getRouterAddress());
clientBean.setServiceClass(HelloService.class);
HelloService client = (HelloService) proxyFactory.create();
return client;
}
use of org.apache.cxf.frontend.ClientProxyFactoryBean in project camel by apache.
the class CxfMixedModeRouterTest method getCXFClient.
protected HelloService getCXFClient() throws Exception {
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
clientBean.setAddress(ROUTER_ADDRESS);
clientBean.setServiceClass(HelloService.class);
clientBean.setBus(BusFactory.newInstance().createBus());
HelloService client = (HelloService) proxyFactory.create();
return client;
}
Aggregations