@@ -152,19 +152,20 @@ public void setSearchClasspath(boolean searchClasspath) {
152152 public void configureEngine (AxisEngine engine )
153153 throws ConfigurationException {
154154 try {
155- if (getInputStream () == null ) {
155+ InputStream configFileInputStream = getInputStream ();
156+ if (configFileInputStream == null ) {
156157 try {
157- setInputStream ( new FileInputStream (configFile ) );
158+ configFileInputStream = new FileInputStream (configFile );
158159 } catch (Exception e ) {
159160 // Ignore and continue
160161 }
161162 }
162- if (getInputStream () == null && searchClasspath ) {
163+ if (configFileInputStream == null && searchClasspath ) {
163164 // Attempt to load the file from the classpath
164- setInputStream ( ClassUtils .getResourceAsStream (filename , engine .getClass ().getClassLoader () ));
165+ configFileInputStream = ClassUtils .getResourceAsStream (filename , engine .getClass ().getClassLoader ());
165166 }
166167
167- if (getInputStream () == null ) {
168+ if (configFileInputStream == null ) {
168169 // Load the default configuration. This piece of code provides compatibility with Axis 1.4,
169170 // which ends up loading org/apache/axis/(client|server)/(client|server)-config.wsdd if
170171 // (1) filename is (client|server)-config.wsdd;
@@ -184,7 +185,7 @@ public void configureEngine(AxisEngine engine)
184185 deployment = defaultConfig .getDeployment ();
185186 } else {
186187 WSDDDocument doc = new WSDDDocument (XMLUtils .
187- newDocument (getInputStream () ));
188+ newDocument (configFileInputStream ));
188189 deployment = doc .getDeployment ();
189190
190191 deployment .configureEngine (engine );
0 commit comments