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

📄 axisengine.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    {        setOption(PROP_PASSWORD, pw);        _hasSafePassword = true;        saveConfiguration();    }    /**     * Set the flag that controls if the configuration should be saved.     *     * @param shouldSaveConfig  true if the configuration should be changed,     *              false otherwise     */    public void setShouldSaveConfig(boolean shouldSaveConfig)    {        this.shouldSaveConfig = shouldSaveConfig;    }    // fixme: could someone who knows double-check I've got the semantics of    //   this right?    /**     * Get the <code>Handler</code> for a particular local name.     *     * @param name  the local name of the request type     * @return      the <code>Handler</code> for this request type     * @throws AxisFault     */    public Handler getHandler(String name) throws AxisFault    {        try {            return config.getHandler(new QName(null, name));        } catch (ConfigurationException e) {            throw new AxisFault(e);        }    }    // fixme: could someone who knows double-check I've got the semantics of    //   this right?    /**     * Get the <code>SOAPService</code> for a particular local name.     *     * @param name  the local name of the request type     * @return      the <code>SOAPService</code> for this request type     * @throws AxisFault     */    public SOAPService getService(String name) throws AxisFault    {        try {            return config.getService(new QName(null, name));        } catch (ConfigurationException e) {            try {                return config.getServiceByNamespaceURI(name);            } catch (ConfigurationException e1) {                throw new AxisFault(e);            }        }    }    /**     * Get the <code>Handler</code> that implements the transport for a local     * name.     *     * @param name  the local name to fetch the transport for     * @return  a <code>Handler</code> for this local name     * @throws AxisFault     */    public Handler getTransport(String name) throws AxisFault    {        try {            return config.getTransport(new QName(null, name));        } catch (ConfigurationException e) {            throw new AxisFault(e);        }    }    /**     * Get the <code>TypeMappingRegistry</code> for this axis engine.     *     * @return the <code>TypeMappingRegistry</code> if possible, or null if     *              there is any error resolving it     */    public TypeMappingRegistry getTypeMappingRegistry()    {        TypeMappingRegistry tmr = null;        try {            tmr = config.getTypeMappingRegistry();        } catch (ConfigurationException e) {            log.error(Messages.getMessage("axisConfigurationException00"), e);        }        return tmr;    }    /**     * Get the global request <code>Handler</code>.     *     * @return the <code>Handler</code> used for global requests     * @throws ConfigurationException     */    public Handler getGlobalRequest()        throws ConfigurationException    {        return config.getGlobalRequest();    }    /**     * Get the global respones <code>Handler</code>.     *     * @return the <code>Handler</code> used for global responses     * @throws ConfigurationException     */    public Handler getGlobalResponse()        throws ConfigurationException    {        return config.getGlobalResponse();    }    // fixme: publishing this as ArrayList prevents us moving to another    //   List impl later    /**     * Get a list of actor URIs that hold for the entire engine.     *     * @return an <code>ArrayList</code> of all actor URIs as     *              <code>Strings</code>     */    public ArrayList getActorURIs()    {        return (ArrayList)actorURIs.clone();    }    /**     * Add an actor by uri that will hold for the entire engine.     *     * @param uri  a <code>String</code> giving the uri of the actor to add     */    public void addActorURI(String uri)    {        actorURIs.add(uri);    }    /**     * Remove an actor by uri that will hold for the entire engine.     *     * @param uri  a <code>String</code> giving the uri of the actor to remove     */    public void removeActorURI(String uri)    {        actorURIs.remove(uri);    }    /**     * Client engine access.     * <p>     * An AxisEngine may define another specific AxisEngine to be used     * by newly created Clients.  For instance, a server may     * create an AxisClient and allow deployment to it.  Then     * the server's services may access the AxisClient's deployed     * handlers and transports.     *     * @return an <code>AxisEngine</code> that is the client engine     */    public abstract AxisEngine getClientEngine ();   /**    * Administration and management APIs    *    * These can get called by various admin adapters, such as JMX MBeans,    * our own Admin client, web applications, etc...    *    */    /**     * List of options which should be converted from Strings to Booleans     * automatically. Note that these options are common to all XML     * web services.     */    private static final String [] BOOLEAN_OPTIONS = new String [] {                        PROP_DOMULTIREFS, PROP_SEND_XSI, PROP_XML_DECL,                        PROP_DISABLE_PRETTY_XML,                        PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION    };    /**     * Normalise the engine's options.     * <p>     * Convert boolean options from String to Boolean and default     * any ommitted boolean options to TRUE. Default the admin.     * password.     *     * @param handler  the <code>Handler</code> to normalise; instances of     *              <code>AxisEngine</code> get extra data normalised     */    public static void normaliseOptions(Handler handler) {        // Convert boolean options to Booleans so we don't need to use        // string comparisons.  Default is "true".        for (int i = 0; i < BOOLEAN_OPTIONS.length; i++) {            Object val = handler.getOption(BOOLEAN_OPTIONS[i]);            if (val != null) {                if (val instanceof Boolean)                    continue;                if (JavaUtils.isFalse(val)) {                    handler.setOption(BOOLEAN_OPTIONS[i], Boolean.FALSE);                    continue;                }            } else {                if (!(handler instanceof AxisEngine))                    continue;            }            // If it was null or not "false"...            handler.setOption(BOOLEAN_OPTIONS[i], Boolean.TRUE);        }        // Deal with admin password's default value.        if (handler instanceof AxisEngine) {            AxisEngine engine = (AxisEngine)handler;            if (!engine.setOptionDefault(PROP_PASSWORD,                                         DEFAULT_ADMIN_PASSWORD)) {                engine.setAdminPassword(                        (String)engine.getOption(PROP_PASSWORD));            }        }    }    /**     * (Re-)load the global options from the registry.     *     * @throws ConfigurationException     */    public void refreshGlobalOptions() throws ConfigurationException {        Hashtable globalOptions = config.getGlobalOptions();        if (globalOptions != null)            setOptions(globalOptions);        normaliseOptions(this);        // fixme: If we change actorURIs to List, this copy constructor can        //        go away...        actorURIs = new ArrayList(config.getRoles());    }    /**     * Get the <code>Session</code> object associated with the application     * session.     *     * @return a <code>Session</code> scoped to the application     */    public Session getApplicationSession () {        return session;    }    /**     * Get the <code>ClassCache</code> associated with this engine.     *     * @return the class cache     */    public ClassCache getClassCache() {        return classCache;    }}

⌨️ 快捷键说明

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