• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AegisDatabinding类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.cxf.aegis.databinding.AegisDatabinding的典型用法代码示例。如果您正苦于以下问题:Java AegisDatabinding类的具体用法?Java AegisDatabinding怎么用?Java AegisDatabinding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AegisDatabinding类属于org.apache.cxf.aegis.databinding包,在下文中一共展示了AegisDatabinding类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createSoapClient

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
public <T> T createSoapClient(Class<T> serviceClass, URL endpoint, String namespace)
{
	ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
	Bus bus = new ExtensionManagerBus(null, null, Bus.class.getClassLoader());
	factory.setBus(bus);
	factory.setServiceClass(serviceClass);
	factory.setServiceName(new QName(namespace, serviceClass.getSimpleName()));
	factory.setAddress(endpoint.toString());
	factory.getServiceFactory().getServiceConfigurations().add(0, new XFireCompatabilityConfiguration());
	factory.setDataBinding(new AegisDatabinding());
	@SuppressWarnings("unchecked")
	T soapClient = (T) factory.create();
	Client client = ClientProxy.getClient(soapClient);
	client.getRequestContext().put(Message.MAINTAIN_SESSION, true);
	HTTPClientPolicy policy = new HTTPClientPolicy();
	policy.setReceiveTimeout(600000);
	policy.setAllowChunking(false);
	HTTPConduit conduit = (HTTPConduit) client.getConduit();
	conduit.setClient(policy);
	return soapClient;
}
 
开发者ID:equella,项目名称:Equella,代码行数:22,代码来源:SoapClientFactory.java


示例2: createSoap

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public <T> T createSoap(Class<T> serviceClass, URL endpoint, String namespace, Object previousSession)
{
	ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
	factory.setServiceClass(serviceClass);
	factory.setServiceName(new QName(namespace, serviceClass.getSimpleName()));
	factory.setAddress(endpoint.toString());
	List<AbstractServiceConfiguration> configs = factory.getServiceFactory().getServiceConfigurations();
	configs.add(0, new XFireReturnTypeConfig());
	factory.setDataBinding(new AegisDatabinding());
	T service = (T) factory.create();
	Client client = ClientProxy.getClient(service);
	client.getRequestContext().put(Message.MAINTAIN_SESSION, true);
	HTTPClientPolicy policy = new HTTPClientPolicy();
	policy.setReceiveTimeout(600000);
	policy.setAllowChunking(false);
	HTTPConduit conduit = (HTTPConduit) client.getConduit();
	conduit.setClient(policy);
	if( previousSession != null )
	{
		copyCookiesInt(conduit, previousSession);
	}
	return service;
}
 
开发者ID:equella,项目名称:Equella,代码行数:25,代码来源:SoapHelper.java


示例3: addService

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
/**
* Creates a webservice endpoint for an interface/implementation pair based on their fullnames<p>
* Classes and Interfaces to be used as webservice should be made available in the pom.xml
* 
* @param	serviceInterface  		The interface fullname of the webservice to be added
* @param	serviceImplementation	The implementation class fullname of the webservice to be added
* @throws Exception 
* @see		WebServiceServlet, ServerFactoryBean
*/
  public void addService(String serviceInterface, String serviceImplementation) throws Exception
  {
  	String serviceName = extractServiceName(serviceInterface);
      ServerFactoryBean svrFactory = new ServerFactoryBean();
  	try {
  		if(bus != null) {
  			svrFactory.setBus(bus);
  		}
	svrFactory.setServiceClass(Class.forName(serviceInterface));
	svrFactory.setAddress(baseAddress + serviceName);
	svrFactory.setServiceBean(Class.forName(serviceImplementation).newInstance());
       svrFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
       svrFactory.create();
       System.out.println(svrFactory.getServiceFactory().getEndpointInfo().getAddress());

} catch (Exception e) {
	logger.error("Error adding webservices with interface : " + serviceInterface  + " and implementation : " + serviceImplementation, e);
	throw e;
} 
  }
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:30,代码来源:GenericWebServiceServer.java


示例4: setUp

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
@Before
public void setUp() {
	JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
	Map<String, Object> props = new HashMap<String, Object>();
	
	List<String> list = new ArrayList<String>();
	list.add(People.class.getName());
	list.add(Boy.class.getName());
	list.add(Person.class.getName());
	props.put("writeXsiType", Boolean.TRUE);
	props.put("overrideTypesList", list);
	
	factory.getServiceFactory().setProperties(props);
	factory.setDataBinding(new AegisDatabinding());
	
	factory.setAddress(ENDPOINT);
	personService = (PersonServiceWithBaseClass)factory.create(PersonServiceWithBaseClass.class);
	
	// bind the outbound interceptor to the client proxy
	Client proxy = ClientProxy.getClient(personService);
	proxy.getOutInterceptors().add(new SystemTokenClientInterceptor(SYSTEM_NIC, SYSTEM_NIC_PW));  
}
 
开发者ID:brightzheng100,项目名称:learning-spring-cxf,代码行数:23,代码来源:PersonWebServiceWithBaseClassTest.java


示例5: getNewClient

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
protected SoapHarvesterService getNewClient(String url, String sharedId, String sharedValue, String username)
{
	try
	{
		final URL endpointUrl = new URL(new URL(url), HARVESTER_ENDPOINT);

		ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
		Bus bus = new ExtensionManagerBus(null, null, Bus.class.getClassLoader());
		factory.setBus(bus);
		factory.setServiceClass(SoapHarvesterService.class);
		factory.setServiceName(
			new QName("http://soap.harvester.core.tle.com", SoapHarvesterService.class.getSimpleName()));
		factory.setAddress(endpointUrl.toString());
		factory.setDataBinding(new AegisDatabinding());
		List<AbstractServiceConfiguration> configs = factory.getServiceFactory().getServiceConfigurations();
		configs.add(0, new XFireReturnTypeConfig());
		SoapHarvesterService soapClient = (SoapHarvesterService) factory.create();
		Client client = ClientProxy.getClient(soapClient);
		client.getRequestContext().put(Message.MAINTAIN_SESSION, true);
		HTTPClientPolicy policy = new HTTPClientPolicy();
		policy.setReceiveTimeout(600000);
		policy.setAllowChunking(false);
		HTTPConduit conduit = (HTTPConduit) client.getConduit();
		// Works?
		// conduit.getTlsClientParameters().setSSLSocketFactory(BlindSSLSocketFactory.getDefaultSSL());
		conduit.setClient(policy);

		soapClient.loginWithToken(TokenGenerator.createSecureToken(username, sharedId, sharedValue, null));
		return soapClient;
	}
	catch( Exception x )
	{
		LOGGER.error("Error connecting to remote EQUELLA server", x);
		throw new RuntimeException(
			CurrentLocale.get("com.tle.core.remoterepo.equella.error.communication", x.getMessage()));
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:38,代码来源:EquellaRepoServiceImpl.java


示例6: setUp

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
@Before
  public void setUp() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
  	factory.getServiceFactory().setDataBinding(new AegisDatabinding());
  	factory.setAddress(ENDPOINT);
  	service = (SayHiService) factory.create(SayHiService.class);  
  }
 
开发者ID:brightzheng100,项目名称:learning-spring-cxf,代码行数:8,代码来源:SayHiWebServiceTest.java


示例7: setup

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
public void setup(Class<?> serviceClass, String wsUrl) {
    ClientFactoryBean factory = new ClientFactoryBean();
    factory.setServiceClass(serviceClass);
    factory.setAddress(wsUrl);
    AegisDatabinding aegisDatabinding = new AegisDatabinding();
    AegisContext aegisCtx = new AegisContext();
    aegisCtx.setReadXsiTypes(true);
    aegisDatabinding.setAegisContext(aegisCtx);
    factory.getServiceFactory().setDataBinding(aegisDatabinding);
    client = factory.create();
}
 
开发者ID:mnip91,项目名称:proactive-component-monitoring,代码行数:12,代码来源:CXFAegisWSCaller.java


示例8: setUp

import org.apache.cxf.aegis.databinding.AegisDatabinding; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Before
   public void setUp() {
   	Map<String, Object> props = new HashMap<String, Object>();
   	List<String> list = new ArrayList<String>();
   	list.add(People.class.getName());
   	list.add(Boy.class.getName());
   	list.add(Person.class.getName());
   	props.put("writeXsiType", Boolean.TRUE);
   	props.put("overrideTypesList", list);
   	
   	//BOY Service
   	JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
   	
   	factory.getServiceFactory().setProperties(props);
   	factory.setDataBinding(new AegisDatabinding());
   	
   	factory.setServiceClass(PersonServiceWithGeneric.class);
   	factory.setAddress(ENDPOINT);
   	boyService = (PersonServiceWithGeneric<Boy, String>) factory.create();  
   	
   	// bind the outbound interceptor to the client proxy
   	Client proxy1 = ClientProxy.getClient(boyService);
   	proxy1.getOutInterceptors().add(new SystemTokenClientInterceptor(SYSTEM_NIC, SYSTEM_NIC_PW));
   	
   	
   	//PERSON Service
   	JaxWsProxyFactoryBean factory2 = new JaxWsProxyFactoryBean();    	
   	factory2.getServiceFactory().setProperties(props);
   	factory2.getServiceFactory().setDataBinding(new AegisDatabinding());
   	
   	factory2.setAddress(ENDPOINT);
   	personService = (PersonServiceWithGeneric<Person, String>)factory2.create(PersonServiceWithGeneric.class);
   	
   	// bind the outbound interceptor to the client proxy
   	Client proxy2 = ClientProxy.getClient(personService);
   	proxy2.getOutInterceptors().add(new SystemTokenClientInterceptor(SYSTEM_NIC, SYSTEM_NIC_PW));
   	
   	
   	//Generic Service?
   	JaxWsProxyFactoryBean factory3 = new JaxWsProxyFactoryBean();    	
   	factory3.getServiceFactory().setProperties(props);
   	factory3.getServiceFactory().setDataBinding(new AegisDatabinding());
   	
   	factory3.setAddress(ENDPOINT);
   	genericService = (PersonServiceWithGeneric<? super Person, String>)factory3.create(PersonServiceWithGeneric.class);
   	
   	// bind the outbound interceptor to the client proxy
   	Client proxy3 = ClientProxy.getClient(genericService);
   	proxy3.getOutInterceptors().add(new SystemTokenClientInterceptor(SYSTEM_NIC, SYSTEM_NIC_PW));
   }
 
开发者ID:brightzheng100,项目名称:learning-spring-cxf,代码行数:52,代码来源:PersonWebServiceWithGenericTest.java



注:本文中的org.apache.cxf.aegis.databinding.AegisDatabinding类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ToHTMLStream类代码示例发布时间:2022-05-23
下一篇:
Java PerspectiveDefinitionImpl类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap