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 Richard Sitze <rs...@us.ibm.com> on 2002/10/01 17:17:36 UTC

RE: Handling of server config from EngineConfigurationFactoryServ let

This is a known problem with RC1.  Please open a Bugzilla defect if you 
continue to have problems with any recent nightly build, or RC2.

*******************************************
Richard A. Sitze
IBM WebSphere WebServices Development




Naresh Bhatia <nb...@sapient.com>
09/30/2002 12:35 PM
Please respond to axis-dev
 
        To:     "'axis-dev@xml.apache.org'" <ax...@xml.apache.org>
        cc: 
        Subject:        RE: Handling of server config from 
EngineConfigurationFactoryServ  let

 


I am seeing another problem with Weblogic 6.1 and Axis 1.0 RC1. I wonder 
if it is related to the one described in this thread. When I invoke 
AdminClient to deploy a WSDD file, it prints the following error message:
    - Problem with servlet engine config file: 
C:\DonutStore\public_html\axis/WEB-INF/server-config.wsdd 
That's okay because 
EngineConfigurationFactoryServlet.getServerEngineConfig() tries to open 
server-config.wsdd at the above location where it does not exist. However, 
this file is eventually created at C:\bea\wlserver6 which is where 
Weblogic resides (instead of WEB-INF)! It appears that AdminServlet cannot 
properly determine the location of the application's WEB-INF directory.
Naresh 
-----Original Message----- 
From: Richard Sitze [mailto:rsitze@us.ibm.com] 
Sent: Monday, September 09, 2002 5:00 PM 
To: axis-dev@xml.apache.org 
Subject: Re: Handling of server config from 
EngineConfigurationFactoryServlet 

OK, let me know if I *HAVEN'T* fixed your problem. 
<ras> 
******************************************* 
Richard A. Sitze 




Richard Sitze/Austin/IBM@IBMUS 
09/09/2002 02:59 PM 
Please respond to axis-dev 
  
        To:     axis-dev@xml.apache.org 
        cc: 
        Subject:        Re: Handling of server config from 
EngineConfigurationFactoryServlet 
  

OK.  Fundamental problem (from my perspective).  For a 'predeployed' 
service, I may not WANT the default behavior to dynamically save the 
services (no admin).  The proper wsdd should already be there. 
While I changed this behavior recently (bad bad me)...  You DO have a 
valid point.  So, there is a potential for TWO different behaviours. Sound 

like another candidate for a separate jar file: 
1.  Specifies META-INF/services/org.apache.axis.EngineConfigurationFactory 

file 
2.  File (1) containing one line that names the class implementing the 
behaviour you desire. 
3.  Drop it in your classpath. 
However, for the sake of consistent/expected behavior for the 1.0 release, 

I'm adding the behaviour back as-it-was. 
<ras> 

******************************************* 
Richard A. Sitze 
IBM WebSphere WebServices Development 



VASQUEZ_JASON@LILLY.COM 
09/06/2002 11:02 AM 
Please respond to axis-dev 
  
        To:     axis-dev@xml.apache.org 
        cc: 
        Subject:        Handling of server config from 
EngineConfigurationFactoryServlet 
  

Hi all, 
I'm pretty new to this project, but I have run accross a problem where the 


default server-config.wsdd is not handled as would be expected (at least 
by a newbie like me!).  Using the AdminClient, updates never occur, 
because FileProvider is called with it's InputStream constructor instead 
of a filename based constructor.  (Maybe this is on purpose for security 
reasons? Then why do we care about the remote administration option?) 
I've patched up EngineConfigurationFactoryServlet so that 
getServerEngineConfig(ServletContext ctx) seems to be behave a bit more 
nicely.  I've attached a patch to the latest CVS sources, I'd appreciate 
some feedback as to whether or not I'm way off track with this! 
Thanks, 
Jason 
The patch: 
Index: EngineConfigurationFactoryServlet.java 
=================================================================== 
RCS file: 
/home/cvspublic/xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryServlet.java,v 

retrieving revision 1.7 
diff -c -r1.7 EngineConfigurationFactoryServlet.java 
*** EngineConfigurationFactoryServlet.java      30 Aug 2002 19:13:05 -0000 


     1.7 
--- EngineConfigurationFactoryServlet.java      6 Sep 2002 16:00:49 -0000 
*************** 
*** 55,63 **** 
--- 55,67 ---- 
  package org.apache.axis.configuration; 
+ import java.io.File; 
  import java.io.IOException; 
  import java.io.InputStream; 
+ import java.net.MalformedURLException; 
+ import java.net.URL; 
+ 
  import javax.servlet.ServletContext; 
  import org.apache.axis.EngineConfiguration; 
*************** 
*** 146,167 **** 
           * snooped by a browser) 
           */ 
          String name = "/WEB-INF/"+ SERVER_CONFIG_FILE; 
!         InputStream is = ctx.getResourceAsStream(name); 
!         FileProvider config; 
!         if (is == null) { 
              String rootPath = ctx.getRealPath("/"); 
              if (rootPath != null) { 
                  name = rootPath + name; 
              } 
!             log.error(JavaUtils.getMessage("servletEngineWebInfError01", 

                                             name)); 
-             config = null; 
-         } else { 
-             // FileProvider assumes responsibility for 'is'. 
-             config = new FileProvider(is); 
          } 
!         return config; 
      } 
  } 
--- 150,179 ---- 
           * snooped by a browser) 
           */ 
          String name = "/WEB-INF/"+ SERVER_CONFIG_FILE; 
!         URL configUrl = null; 
!               try { 
!                       configUrl = ctx.getResource(name); 
!               } catch (MalformedURLException e) { } 
! 
!               FileProvider config = null; 
!               if (configUrl != null) { 
!                       config = new 
FileProvider(configUrl.getFile().toString()); 
!               } else { 
              String rootPath = ctx.getRealPath("/"); 
              if (rootPath != null) { 
                  name = rootPath + name; 
+                               File f = new File(name); 
+                               if (f.exists()) { 
+                                       config = new 
FileProvider(f.toString()); 
+                               } 
              } 
! 
!                       if (config == null) //if it's still null now 
! log.error(JavaUtils.getMessage("servletEngineWebInfError01", 
                                             name)); 
          } 
!               return config; 
      } 
  }