You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jason Sweeney (JIRA)" <ax...@ws.apache.org> on 2005/08/23 16:59:08 UTC
[jira] Commented: (AXIS-2190) Configuration file location process different for client and server files
[ http://issues.apache.org/jira/browse/AXIS-2190?page=comments#action_12319723 ]
Jason Sweeney commented on AXIS-2190:
-------------------------------------
There is a small typo in the first part of the patch, the private method should be named "getServletEngineConfig" not "getServerEngineConfig".
> Configuration file location process different for client and server files
> -------------------------------------------------------------------------
>
> Key: AXIS-2190
> URL: http://issues.apache.org/jira/browse/AXIS-2190
> Project: Apache Axis
> Type: Bug
> Components: Basic Architecture
> Versions: 1.2.1
> Environment: Not necessary for the issue
> Reporter: Jason Sweeney
>
> When using the Axis client component within a web application, the client-config.xml file is usually placed in the same location as the server-config.xml file (if a server is also used). As a result, Axis should follow the same process to locate the client configuration file as for the server file (in particular, check the WEB-INF folder of the web application).
> Patch to correct the problem (basically making the server configuration file function generic):
> File: org\apache\axis\configuration\EngineConfigurationFactoryServlet.java
> Replace lines 93 to 120 (getServerEngineConfig() and start of getServerEngineConfig(ServletConfig cfg)) by this code
> ------------------------------------------------------------------------------------------------------------------
> /**
> * Get a default server engine configuration.
> *
> * @return a server EngineConfiguration
> */
> public EngineConfiguration getServerEngineConfig() {
> return getServletEngineConfig(cfg, OPTION_SERVER_CONFIG_FILE, SERVER_CONFIG_FILE);
> }
> /**
> * Get a default client engine configuration.
> *
> * @return a client EngineConfiguration
> */
> public EngineConfiguration getClientEngineConfig() {
> return getServletEngineConfig(cfg, OPTION_CLIENT_CONFIG_FILE, CLIENT_CONFIG_FILE);
> }
> /**
> * Get a default engine configuration in a servlet environment.
> *
> * @param cfg a ServletConfig
> * @param pOptionName configuration file name option
> * @param pConfigFile configuration file name
> * @return an EngineConfiguration
> */
> private static
> EngineConfiguration getServerEngineConfig(
> ServletConfig cfg, String pOptionName, String pConfigFile)
> {
>
> ServletContext ctx = cfg.getServletContext();
>
> // Respect the system property setting for a different config file
> String configFile = cfg.getInitParameter(pOptionName);
> if (configFile == null)
> configFile =
> AxisProperties.getProperty(pOptionName);
> if (configFile == null) {
> configFile = pConfigFile;
> }
> ------------------------------------------------------------------------------------------------------------------
> Replace lines 186 to 188 (at the end of getServerEngineConfig(ServletConfig cfg)) by this code
> ------------------------------------------------------------------------------------------------------------------
> InputStream is =
> ClassUtils.getResourceAsStream(AxisServer.class,
> pConfigFile);
> ------------------------------------------------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira