You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2005/05/16 11:00:36 UTC
svn commit: r170342 -
/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
Author: deepal
Date: Mon May 16 02:00:35 2005
New Revision: 170342
URL: http://svn.apache.org/viewcvs?rev=170342&view=rev
Log:
if the client home is null then read the default file
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java?rev=170342&r1=170341&r2=170342&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java Mon May 16 02:00:35 2005
@@ -214,18 +214,23 @@
public AxisConfiguration loadClient(String clientHome) throws DeploymentException {
- checkClientHome(clientHome);
- if (engineConfigName == null) {
- throw new DeploymentException("path to client.xml can not be NUll");
+ InputStream in = null;
+ if (clientHome != null) {
+ checkClientHome(clientHome);
+ try {
+ File tempfile = new File(engineConfigName);
+ in = new FileInputStream(tempfile);
+ } catch (FileNotFoundException e) {
+ throw new DeploymentException("Exception at deployment", e);
+ }
+ } else {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ in = cl.getResourceAsStream("org/apache/axis/deployment/client.xml");
}
- File tempfile = new File(engineConfigName);
try {
- InputStream in = new FileInputStream(tempfile);
axisConfig = createEngineConfig();
DeploymentParser parser = new DeploymentParser(in, this);
parser.processGlobalConfig(axisGlobal);
- } catch (FileNotFoundException e) {
- throw new DeploymentException("Exception at deployment", e);
} catch (XMLStreamException e) {
throw new DeploymentException(e.getMessage());
}