use of org.apache.cxf.BusFactory in project camel by apache.
the class CxfEndpointUtils method createBus.
/**
* Create a CXF bus with either BusFactory or SpringBusFactory if Camel Context
* is SpringCamelContext. In the latter case, this method updates the bus
* configuration with the applicationContext which SpringCamelContext holds
*
* @param context - the Camel Context
*/
public static Bus createBus(CamelContext context) {
BusFactory busFactory = BusFactory.newInstance();
if (context instanceof SpringCamelContext) {
SpringCamelContext springCamelContext = (SpringCamelContext) context;
ApplicationContext applicationContext = springCamelContext.getApplicationContext();
busFactory = new SpringBusFactory(applicationContext);
}
return busFactory.createBus();
}
use of org.apache.cxf.BusFactory in project ddf by codice.
the class AbstractStsRealm method getBus.
/**
* Helper method to setup STS Client.
*/
protected Bus getBus() {
BusFactory bf = new CXFBusFactory();
Bus setBus = bf.createBus();
SpringBusFactory.setDefaultBus(setBus);
SpringBusFactory.setThreadDefaultBus(setBus);
return setBus;
}
use of org.apache.cxf.BusFactory in project cxf by apache.
the class UndertowBasicAuthTest method testGetWSDL.
@org.junit.Test
public void testGetWSDL() throws Exception {
BusFactory bf = BusFactory.newInstance();
Bus bus = bf.createBus();
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
factory.createClient(ADDRESS + "?wsdl");
}
use of org.apache.cxf.BusFactory in project cxf by apache.
the class UndertowDigestAuthTest method testGetWSDL.
@Test
public void testGetWSDL() throws Exception {
BusFactory bf = BusFactory.newInstance();
Bus bus = bf.createBus();
bus.getInInterceptors().add(new LoggingInInterceptor());
bus.getOutInterceptors().add(new LoggingOutInterceptor());
MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
factory.createClient(ADDRESS + "?wsdl");
}
use of org.apache.cxf.BusFactory in project cxf by apache.
the class BusExtensionLoadingTest method testDefaultBusConstruction.
/**
* Test for checking the ExtensionManagerBus is built using the TCCL by default
*
* @throws Exception
*/
@Test
public void testDefaultBusConstruction() throws Exception {
BusFactory factory = new CXFBusFactory();
Bus bus = factory.createBus();
assertNotNullExtensions(bus);
bus.shutdown(true);
}
Aggregations