protected void loadBus(ServletConfig sc) { this.bus = BusFactory.newInstance().createBus(); }
@Override protected void loadBus(ServletConfig servletConfig) { BlueprintContainer container = (BlueprintContainer)servletConfig.getServletContext().getAttribute(CONTAINER_ATTRIBUTE); if (container != null) { Object busComponent = container.getComponentInstance("cxf"); setBus((Bus)busComponent); } else { busCreated = true; setBus(BusFactory.newInstance().createBus()); } }
} else { busCreated = true; setBus(BusFactory.newInstance().createBus());
/** * Create a new BusFactory The class of the BusFactory is determined by looking for the system propery: * org.apache.cxf.bus.factory or by searching the classpath for: * META-INF/services/org.apache.cxf.bus.factory * * @return a new BusFactory to be used to create Bus objects */ public static BusFactory newInstance() { return newInstance(null); }
/** * Create a new BusFactory The class of the BusFactory is determined by looking for the system propery: * org.apache.cxf.bus.factory or by searching the classpath for: * META-INF/services/org.apache.cxf.bus.factory * * @return a new BusFactory to be used to create Bus objects */ public static BusFactory newInstance() { return newInstance(null); }
/** * Create a new BusFactory The class of the BusFactory is determined by looking for the system propery: * org.apache.cxf.bus.factory or by searching the classpath for: * META-INF/services/org.apache.cxf.bus.factory * * @return a new BusFactory to be used to create Bus objects */ public static BusFactory newInstance() { return newInstance(null); }
/** * Create a new BusFactory The class of the BusFactory is determined by looking for the system propery: * org.apache.cxf.bus.factory or by searching the classpath for: * META-INF/services/org.apache.cxf.bus.factory * * @return a new BusFactory to be used to create Bus objects */ public static BusFactory newInstance() { return newInstance(null); }
public void loadBus(ServletConfig servletConfig) { this.bus = BusFactory.newInstance().createBus(); Bus bus = getBus(); HeaderManager headerManager = bus.getExtension(HeaderManager.class);
public JAXWSEnvironment(String defaultPath) { System.setProperty("org.apache.cxf.Logger", "org.apache.cxf.common.logging.Slf4jLogger"); /* Instruct CXF to use CXFBusFactory instead of SpringBusFactory. CXFBusFactory provides ExtensionManagerBus which loads extension based on contents of META-INF/cxf/bus-extensions.txt file. Many CXF modules contain such file. When building shaded jar for dropwizard service, these files have to be merged into single bus-extension.txt file by using AppendingTransformer with Maven shade plugin. */ System.setProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME, "org.apache.cxf.bus.CXFBusFactory"); this.bus = BusFactory.newInstance().createBus(); this.defaultPath = defaultPath.replace("/*", ""); }
@Override protected void loadBus(ServletConfig servletConfig) { BlueprintContainer container = (BlueprintContainer)servletConfig.getServletContext().getAttribute(CONTAINER_ATTRIBUTE); if (container != null) { Object busComponent = container.getComponentInstance("cxf"); setBus((Bus)busComponent); } else { busCreated = true; setBus(BusFactory.newInstance().createBus()); } }
public WSDiscoveryServiceImpl(Bus b) { bus = b == null ? BusFactory.newInstance().createBus() : b; client = new WSDiscoveryClient(); update(bus.getProperties()); } public WSDiscoveryServiceImpl() {
public WSDiscoveryServiceImpl() { bus = BusFactory.newInstance().createBus(); client = new WSDiscoveryClient(); update(bus.getProperties()); } public WSDiscoveryServiceImpl(Bus b, Map<String, Object> props) {
public WSDiscoveryServiceImpl(Bus b) { bus = b == null ? BusFactory.newInstance().createBus() : b; client = new WSDiscoveryClient(); update(bus.getProperties()); } public WSDiscoveryServiceImpl() {
private Bus createNewBus(final UnifiedServiceRefMetaData serviceRefMD) { final Bus bus; Bus threadBus = BusFactory.getThreadDefaultBus(false); bus = threadBus != null ? threadBus : BusFactory.newInstance().createBus(); Configurer configurer = bus.getExtension(Configurer.class); bus.setExtension(new CXFServiceRefStubPropertyConfigurer(serviceRefMD, configurer), Configurer.class); return bus; }
protected void run() { // // Just instantiate the Bus; services will be instantiated // and published automatically through Spring // final BusFactory factory = BusFactory.newInstance(); Bus bus = factory.createBus(); setBus(bus); BusFactory.setDefaultBus(bus); BusFactory.setThreadDefaultBus(bus); }
protected void run() { // // Just instantiate the Bus; services will be instantiated // and published automatically through Spring // final BusFactory factory = BusFactory.newInstance(); Bus bus = factory.createBus(); setBus(bus); BusFactory.setDefaultBus(bus); BusFactory.setThreadDefaultBus(bus); }
@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"); }
@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"); }
@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"); }
@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"); }