⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soapservicefinder.java

📁 提供ESB 应用mule源代码 提供ESB 应用mule源代码
💻 JAVA
字号:
/* * $Id: SoapServiceFinder.java 10489 2008-01-23 17:53:38Z dfeist $ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */package org.mule.transport.soap;import org.mule.api.registry.ServiceDescriptor;import org.mule.api.registry.ServiceException;import org.mule.api.registry.ServiceFinder;import org.mule.transport.soap.i18n.SoapMessages;import org.mule.util.ClassUtils;import org.mule.util.PropertiesUtils;import java.util.Iterator;import java.util.Map;import java.util.Properties;import java.util.TreeMap;/** * <code>SoapServiceFinder</code> finds a the connector service to use by checking * the classpath for jars required for each of the soap connector implementations */public class SoapServiceFinder implements ServiceFinder{    /**     * @deprecated We can use a more intelligent strategy for locating the service using the OSGi registry.     */    // //@Override    public String findService(String service, ServiceDescriptor descriptor, Properties props) throws ServiceException    {        Map finders = new TreeMap();        PropertiesUtils.getPropertiesWithPrefix(props, "finder.class", finders);        StringBuffer buf = new StringBuffer();        for (Iterator iterator = finders.entrySet().iterator(); iterator.hasNext();)        {            Map.Entry entry = (Map.Entry)iterator.next();            try            {                ClassUtils.loadClass(entry.getValue().toString(), getClass());                return getProtocolFromKey(entry.getKey().toString());            }            catch (ClassNotFoundException e1)            {                buf.append(entry.getValue().toString()).append("(").append(entry.getKey().toString()).append(                    ")").append(", ");            }        }        throw new ServiceException(SoapMessages.couldNotFindSoapProvider(buf.toString()));    }    protected String getProtocolFromKey(String key)    {        return key.substring(key.lastIndexOf('.') + 1);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -