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

📄 resolverwsdllocator.java

📁 Xfire文件 用于开发web service 的一个开源工具 很好用的
💻 JAVA
字号:
package org.codehaus.xfire.wsdl11;import java.io.IOException;import java.io.InputStream;import javax.wsdl.xml.WSDLLocator;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.codehaus.xfire.util.Resolver;import org.xml.sax.InputSource;/** * A WSDL resource locator. *  * @author <a href="mailto:dlaprade@gmail.com">Daniel LaPrade</a> *  */public class ResolverWSDLLocator    implements WSDLLocator{    private static final Log LOG = LogFactory.getLog(ResolverWSDLLocator.class.getName());    private String baseURI;    private String lastimport = "";    private InputSource inputsource = null;    public ResolverWSDLLocator(String baseURI, InputSource inputsource)    {        this.inputsource = inputsource;        this.baseURI = baseURI;    }    /*     * (non-Javadoc)     *      * @see javax.wsdl.xml.WSDLLocator#getBaseInputSource()     */    public InputSource getBaseInputSource()    {        return inputsource;    }    /*     * (non-Javadoc)     *      * @see javax.wsdl.xml.WSDLLocator#getBaseURI()     */    public String getBaseURI()    {        return baseURI;    }    /*     * (non-Javadoc)     *      * @see javax.wsdl.xml.WSDLLocator#getImportInputSource(java.lang.String,     *      java.lang.String)     */    public InputSource getImportInputSource(String arg0, String name)    {        Resolver resolver;        InputSource result = null;        // Set the last imported value.        lastimport = name;        try        {            resolver = new Resolver(baseURI, name);            InputStream is = resolver.getInputStream();            if (is != null)                result = new InputSource(resolver.getInputStream());        }        catch (IOException e)        {            LOG.warn("Source: " + name + " failed to find input source with exception: ", e);        }        return result;    }    /*     * (non-Javadoc)     *      * @see javax.wsdl.xml.WSDLLocator#getLatestImportURI()     */    public String getLatestImportURI()    {        return lastimport;    }    public void close() { }}

⌨️ 快捷键说明

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