当前位置: 首页>>代码示例>>Java>>正文


Java Service.setHandlerResolver方法代码示例

本文整理汇总了Java中javax.xml.ws.Service.setHandlerResolver方法的典型用法代码示例。如果您正苦于以下问题:Java Service.setHandlerResolver方法的具体用法?Java Service.setHandlerResolver怎么用?Java Service.setHandlerResolver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.ws.Service的用法示例。


在下文中一共展示了Service.setHandlerResolver方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createJaxWsService

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * Create a JAX-WS Service according to the parameters of this factory.
 * @see #setServiceName
 * @see #setWsdlDocumentUrl
 */
public Service createJaxWsService() {
	Assert.notNull(this.serviceName, "No service name specified");
	Service service;

	if (this.serviceFeatures != null) {
		service = (this.wsdlDocumentUrl != null ?
			Service.create(this.wsdlDocumentUrl, getQName(this.serviceName), this.serviceFeatures) :
			Service.create(getQName(this.serviceName), this.serviceFeatures));
	}
	else {
		service = (this.wsdlDocumentUrl != null ?
				Service.create(this.wsdlDocumentUrl, getQName(this.serviceName)) :
				Service.create(getQName(this.serviceName)));
	}

	if (this.executor != null) {
		service.setExecutor(this.executor);
	}
	if (this.handlerResolver != null) {
		service.setHandlerResolver(this.handlerResolver);
	}

	return service;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:30,代码来源:LocalJaxWsServiceFactory.java

示例2: addVersionInformationToClient

import javax.xml.ws.Service; //导入方法依赖的package包/类
/**
 * This method adds a version SOAP Handler into the handler chain of a web
 * service. The version SOAP Handler is responsible to add a version
 * information in the header of the outbound SOAP message.
 * 
 * @param service
 *            set HandlerResolver for service by invoking service
 *            <code>setHandlerResolver</code> method.
 * @return service with handler chain for handling version information.
 */
public Service addVersionInformationToClient(Service service) {
    service.setHandlerResolver(new HandlerResolver() {
        @SuppressWarnings("rawtypes")
        @Override
        public List<Handler> getHandlerChain(PortInfo portInfo) {
            List<Handler> handlerList = new ArrayList<Handler>();
            handlerList.add(new VersionHandler(version));
            return handlerList;
        }
    });
    return service;
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:23,代码来源:ClientVersionHandler.java


注:本文中的javax.xml.ws.Service.setHandlerResolver方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。