本文整理汇总了Java中org.apache.cxf.bus.CXFBusFactory类的典型用法代码示例。如果您正苦于以下问题:Java CXFBusFactory类的具体用法?Java CXFBusFactory怎么用?Java CXFBusFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CXFBusFactory类属于org.apache.cxf.bus包,在下文中一共展示了CXFBusFactory类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setup
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
@Before
public void setup() {
final Bus bus = CXFBusFactory.getThreadDefaultBus();
JaxWsServerFactoryBean jaxWsServer = createJaxWsServer();
jaxWsServer.getFeatures().add(new LoggingFeature());
jaxWsServer.getFeatures().add(new TraceeCxfFeature(serverBackend, Profile.DEFAULT));
server = jaxWsServer.create();
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.setServiceClass(HelloWorldTestService.class);
factoryBean.setAddress(endpointAddress);
factoryBean.getHandlers().add(new TraceeClientHandler(clientBackend));
factoryBean.setBus(bus);
helloWorldPort = factoryBean.create(HelloWorldTestService.class);
}
开发者ID:tracee,项目名称:tracee,代码行数:19,代码来源:JaxwsClientToCxfServerIT.java
示例2: setup
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
@Before
public void setup() {
JaxWsServerFactoryBean jaxWsServer = createJaxWsServer();
jaxWsServer.getHandlers().add(new TraceeServerHandler(serverBackend, new SoapHeaderTransport()));
server = jaxWsServer.create();
JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
factoryBean.setServiceClass(HelloWorldTestService.class);
factoryBean.setAddress(endpointAddress);
factoryBean.getHandlers().add(new TraceeClientHandler(clientBackend));
factoryBean.setBus(CXFBusFactory.getDefaultBus());
helloWorldPort = factoryBean.create(HelloWorldTestService.class);
}
开发者ID:tracee,项目名称:tracee,代码行数:17,代码来源:JaxwsClientToJaxwsServerIT.java
示例3: setUpBus
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
private void setUpBus() {
Bus bus = CXFBusFactory.getDefaultBus();
ClientOnlyHTTPTransportFactory httpTransport = new ClientOnlyHTTPTransportFactory();
// httpTransport = new ServletTransportFactory();
httpTransport.setBus(bus);
List<String> transportIds = Arrays.asList(new String[] {
"http://schemas.xmlsoap.org/wsdl/soap/http", "http://schemas.xmlsoap.org/soap/http",
"http://www.w3.org/2003/05/soap/bindings/HTTP/", "http://schemas.xmlsoap.org/wsdl/http/",
"http://cxf.apache.org/transports/http/configuration", "http://cxf.apache.org/bindings/xformat", });
httpTransport.setTransportIds(transportIds);
httpTransport.registerWithBindingManager();
// httpTransport.register();
}
开发者ID:Fosstrak,项目名称:fosstrak-epcis,代码行数:14,代码来源:QueryControlClient.java
示例4: createJaxWsServer
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
protected JaxWsServerFactoryBean createJaxWsServer() {
JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
serverFactoryBean.setServiceClass(HelloWorldTestServiceImpl.class);
serverFactoryBean.setAddress(endpointAddress);
serverFactoryBean.setServiceBean(new HelloWorldTestServiceImpl(serverBackend));
serverFactoryBean.setBus(CXFBusFactory.getDefaultBus());
return serverFactoryBean;
}
开发者ID:tracee,项目名称:tracee,代码行数:9,代码来源:AbstractConnectionITHelper.java
示例5: setup
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
@Before
public void setup() {
JaxWsServerFactoryBean jaxWsServer = createJaxWsServer();
jaxWsServer.getFeatures().add(new LoggingFeature());
jaxWsServer.getFeatures().add(new TraceeCxfFeature(serverBackend, Profile.DEFAULT));
server = jaxWsServer.create();
final ClientProxyFactoryBean factoryBean = new ClientProxyFactoryBean();
factoryBean.getFeatures().add(new LoggingFeature());
factoryBean.getFeatures().add(new TraceeCxfFeature(clientBackend, Profile.DEFAULT));
factoryBean.setServiceClass(HelloWorldTestService.class);
factoryBean.setBus(CXFBusFactory.getDefaultBus());
factoryBean.setAddress(endpointAddress);
helloWorldPort = (HelloWorldTestService) factoryBean.create();
}
开发者ID:tracee,项目名称:tracee,代码行数:16,代码来源:CxfClientToCxfServerIT.java
示例6: initDefaultBus
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
private static Bus initDefaultBus() {
final ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(CxfUtil.class.getClassLoader());
try { // create the bus reusing cxf logic but skipping factory lookup
final Bus bus = BusFactory.newInstance(CXFBusFactory.class.getName()).createBus();
bus.setId(SystemInstance.get().getProperty("openejb.cxf.bus.id", "openejb.cxf.bus"));
final BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
bindingFactoryMap = (Map<String, BindingFactory>) Reflections.get(bfm, "bindingFactories");
bus.setExtension(new OpenEJBHttpDestinationFactory(), HttpDestinationFactory.class);
// ensure client proxies can use app classes
CXFBusFactory.setDefaultBus(Bus.class.cast(Proxy.newProxyInstance(CxfUtil.class.getClassLoader(), new Class<?>[]{Bus.class}, new ClientAwareBusHandler())));
bus.setProperty(ClassUnwrapper.class.getName(), new ClassUnwrapper() {
@Override
public Class<?> getRealClass(final Object o) {
final Class<?> aClass = o.getClass();
Class<?> c = aClass;
while (c.getName().contains("$$")) {
c = c.getSuperclass();
}
return c == Object.class ? aClass : c;
}
});
SystemInstance.get().addObserver(new LifecycleManager());
initAuthenticators();
return bus; // we keep as internal the real bus and just expose to cxf the client aware bus to be able to cast it easily
} finally {
Thread.currentThread().setContextClassLoader(cl);
}
}
开发者ID:apache,项目名称:tomee,代码行数:37,代码来源:CxfUtil.java
示例7: addingService
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
@Override
public Object addingService(
ServiceReference<ServletContextHelper> reference) {
String contextPath = (String)reference.getProperty(
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH);
CXFNonSpringServlet cxfNonSpringServlet = new CXFNonSpringServlet();
CXFBusFactory cxfBusFactory =
(CXFBusFactory) CXFBusFactory.newInstance(
CXFBusFactory.class.getName());
Bus bus = cxfBusFactory.createBus();
Dictionary<String, Object> properties = new Hashtable<>();
properties.put(
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT,
"(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=" +
HttpWhiteboardConstants.HTTP_WHITEBOARD_DEFAULT_CONTEXT_NAME + ")");
properties.put(
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/*");
properties.put(Constants.SERVICE_RANKING, -1);
cxfNonSpringServlet.setBus(bus);
_servletServiceRegistration = _bundleContext.registerService(
Servlet.class, cxfNonSpringServlet, properties);
properties = new Hashtable<>();
properties.put(
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH,
contextPath);
_busServiceRegistration = _bundleContext.registerService(
Bus.class, bus, properties);
return new Object();
}
开发者ID:csierra,项目名称:osgi-jaxrs-extracted,代码行数:42,代码来源:ServicesRegistrator.java
示例8: newInstance
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
public static DynamicClient newInstance() {
Bus bus = CXFBusFactory.getThreadDefaultBus();
return new DynamicClient(bus);
}
开发者ID:garethahealy,项目名称:jboss-fuse-examples,代码行数:5,代码来源:DynamicClient.java
示例9: newInstance
import org.apache.cxf.bus.CXFBusFactory; //导入依赖的package包/类
/**
* Create a new instance using a default <tt>Bus</tt>.
*
* @return the new instance
* @see CXFBusFactory#getDefaultBus()
*/
public static CxfplusDynamicClientFactory newInstance() {
Bus bus = CXFBusFactory.getThreadDefaultBus();
return new CxfplusDynamicClientFactory(bus);
}
开发者ID:GeeQuery,项目名称:cxf-plus,代码行数:11,代码来源:CxfplusDynamicClientFactory.java
注:本文中的org.apache.cxf.bus.CXFBusFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论