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 di...@apache.org on 2001/10/26 18:09:37 UTC

cvs commit: xml-axis/java/src/org/apache/axis/utils Admin.java AxisClassLoader.java

dims        01/10/26 09:09:37

  Modified:    java     build.xml
               java/src/org/apache/axis/handlers/http HTTPAuthHandler.java
                        URLMapper.java
               java/src/org/apache/axis/transport/http AxisServlet.java
                        HTTPConstants.java
                        NonBlockingBufferedInputStream.java
               java/src/org/apache/axis/utils Admin.java
                        AxisClassLoader.java
  Log:
  - Fixes to enable "functional-tests" to be run even in the absence of servlet jar.
  
  Revision  Changes    Path
  1.71      +3 -2      xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- build.xml	2001/10/26 14:55:23	1.70
  +++ build.xml	2001/10/26 16:09:36	1.71
  @@ -159,8 +159,9 @@
         classpathref="classpath">
         <exclude name="**/old/**/*" />
         <exclude name="**/bak/**"/>
  -      <exclude name="org/apache/axis/handlers/http/*" unless="servlet.present"/>
  -      <exclude name="org/apache/axis/transport/http/*" unless="servlet.present"/>
  +      <exclude name="org/apache/axis/transport/http/AdminServlet.java" unless="servlet.present"/>
  +      <exclude name="org/apache/axis/transport/http/AxisHttpSession.java" unless="servlet.present"/>
  +      <exclude name="org/apache/axis/transport/http/AxisServlet.java" unless="servlet.present"/>
         <exclude name="org/apache/axis/security/servlet/*" unless="servlet.present"/>
         <exclude name="**/*TestSuite.java" unless="junit.present"/>
       </javac>
  
  
  
  1.6       +1 -6      xml-axis/java/src/org/apache/axis/handlers/http/HTTPAuthHandler.java
  
  Index: HTTPAuthHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/HTTPAuthHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HTTPAuthHandler.java	2001/10/03 15:30:05	1.5
  +++ HTTPAuthHandler.java	2001/10/26 16:09:36	1.6
  @@ -61,8 +61,6 @@
   import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.log4j.Category;
   
  -import javax.servlet.http.HttpServletRequest;
  -
   /** An <code>HTTPAuthHandler</code> simply sets the context's username
    * and password properties from the HTTP auth headers.
    * 
  @@ -78,12 +76,9 @@
       {
           category.debug("Enter: HTTPAuthHandler::invoke" );
           
  -        HttpServletRequest req = (HttpServletRequest)msgContext.getProperty(
  -                                      HTTPConstants.MC_HTTP_SERVLETREQUEST);
  -        
           /* Process the Basic Auth stuff in the headers */
           /***********************************************/
  -        String tmp = (String)req.getHeader(HTTPConstants.HEADER_AUTHORIZATION);
  +        String tmp = (String)msgContext.getProperty(HTTPConstants.HEADER_AUTHORIZATION);
           if ( tmp != null ) tmp = tmp.trim();
           if ( tmp != null && tmp.startsWith("Basic ") ) {
               String user=null ;
  
  
  
  1.9       +5 -12     xml-axis/java/src/org/apache/axis/handlers/http/URLMapper.java
  
  Index: URLMapper.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/http/URLMapper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- URLMapper.java	2001/10/03 15:30:05	1.8
  +++ URLMapper.java	2001/10/26 16:09:36	1.9
  @@ -60,8 +60,6 @@
   import org.apache.axis.transport.http.HTTPConstants;
   import org.apache.log4j.Category;
   
  -import javax.servlet.http.HttpServletRequest;
  -
   /** An <code>URLMapper</code> attempts to use the extra path info
    * of this request as the service name.
    *
  @@ -79,17 +77,12 @@
           /** If there's already a targetService then just return.
            */
           if ( msgContext.getServiceHandler() == null ) {
  -            HttpServletRequest req = (HttpServletRequest) msgContext.getProperty(
  -                                              HTTPConstants.MC_HTTP_SERVLETREQUEST);
  -
  -            if (req != null) {
  -                // Assumes "/" + servicename
  -                String path = req.getPathInfo();
  -                if ((path != null) && (path.length() > 1)) {
  -                    path = path.substring(1);
  +            // Assumes "/" + servicename
  +            String path = (String)msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO);
  +            if ((path != null) && (path.length() > 1)) {
  +                path = path.substring(1);
   
  -                    msgContext.setTargetService( path );
  -                }
  +                msgContext.setTargetService( path );
               }
           }
   
  
  
  
  1.53      +5 -0      xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- AxisServlet.java	2001/10/26 14:55:23	1.52
  +++ AxisServlet.java	2001/10/26 16:09:37	1.53
  @@ -161,6 +161,8 @@
               msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, req );
               msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, res );
               msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETLOCATION, getServletContext().getRealPath("/WEB-INF") );
  +            msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO, req.getPathInfo() );
  +            msgContext.setProperty(HTTPConstants.HEADER_AUTHORIZATION, req.getHeader(HTTPConstants.HEADER_AUTHORIZATION) );
               msgContext.setProperty(Constants.MC_REMOTE_ADDR, req.getRemoteAddr());
   
               try {
  @@ -329,6 +331,9 @@
           msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLET, this );
           msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, req );
           msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, res );
  +        msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETLOCATION, getServletContext().getRealPath("/WEB-INF") );
  +        msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO, req.getPathInfo() );
  +        msgContext.setProperty(HTTPConstants.HEADER_AUTHORIZATION, req.getHeader(HTTPConstants.HEADER_AUTHORIZATION) );
           msgContext.setProperty(Constants.MC_REMOTE_ADDR, req.getRemoteAddr());
   
           if (securityProvider != null)
  
  
  
  1.9       +1 -2      xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java
  
  Index: HTTPConstants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPConstants.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HTTPConstants.java	2001/10/26 14:55:23	1.8
  +++ HTTPConstants.java	2001/10/26 16:09:37	1.9
  @@ -109,7 +109,6 @@
       /** HttpServletResponse
        */
       public static String MC_HTTP_SERVLETRESPONSE= "transport.http.servletResponse";
  -    /** HttpServletResponse
  -     */
       public static String MC_HTTP_SERVLETLOCATION= "transport.http.servletLocation";
  +    public static String MC_HTTP_SERVLETPATHINFO= "transport.http.servletPathInfo";
   }
  
  
  
  1.5       +1 -1      xml-axis/java/src/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java
  
  Index: NonBlockingBufferedInputStream.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/NonBlockingBufferedInputStream.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NonBlockingBufferedInputStream.java	2001/10/18 14:36:59	1.4
  +++ NonBlockingBufferedInputStream.java	2001/10/26 16:09:37	1.5
  @@ -1,4 +1,4 @@
  -package org.apache.axis.transport.http ;
  +package org.apache.axis.transport.http;
   
   import java.io.IOException;
   import java.io.InputStream; 
  
  
  
  1.74      +1 -1      xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Admin.java	2001/10/22 14:00:11	1.73
  +++ Admin.java	2001/10/26 16:09:37	1.74
  @@ -724,7 +724,7 @@
               getOptions( elem, h );
               engine.deployHandler( name, h );
           } catch (ClassNotFoundException cnfe) {
  -            throw new AxisFault(cnfe);
  +            //throw new AxisFault(cnfe);
           } catch (InstantiationException ie) {
                 throw new AxisFault(ie);
           } catch (IllegalAccessException iae) {
  
  
  
  1.14      +1 -1      xml-axis/java/src/org/apache/axis/utils/AxisClassLoader.java
  
  Index: AxisClassLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/AxisClassLoader.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- AxisClassLoader.java	2001/10/03 15:30:07	1.13
  +++ AxisClassLoader.java	2001/10/26 16:09:37	1.14
  @@ -147,7 +147,7 @@
               if ( obj != null )
                   return( ((JavaClass)obj).getJavaClass() );
           }
  -
  +    
           Class cls = super.loadClass( name );
           registerClass( name, cls );
           return cls;