本文整理匯總了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;
}
示例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;
}