當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。