axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils AxisClassLoader.java
Date Wed, 11 Apr 2001 02:00:01 GMT
dug         01/04/10 19:00:01

  Modified:    java/src/org/apache/axis Message.java
               java/src/org/apache/axis/transport/http AxisServlet.java
               java/src/org/apache/axis/utils AxisClassLoader.java
  Log:
  Removed client need for servlet.jar and made the classloader
  use the same classloader that loaded everything else, instead
  of the system class loader (issues noticed by Sam Ruby).
  
  Revision  Changes    Path
  1.17      +1 -31     xml-axis/java/src/org/apache/axis/Message.java
  
  Index: Message.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Message.java	2001/03/31 00:53:08	1.16
  +++ Message.java	2001/04/11 01:59:57	1.17
  @@ -56,8 +56,6 @@
   package org.apache.axis ;
   
   import java.io.* ;
  -import javax.servlet.* ;
  -import javax.servlet.http.* ;
   
   import org.w3c.dom.* ;
   
  @@ -148,20 +146,6 @@
         return( null );
       }
   
  -    if ( currentForm.equals("ServletRequest") ) {
  -      try {
  -        HttpServletRequest req = (HttpServletRequest) currentMessage ;
  -        byte[] buf = new byte[req.getContentLength()];
  -        req.getInputStream().read( buf );
  -        setCurrentMessage( buf, "Bytes" );
  -        Debug.Print( 2, "Exit: Message::getAsBytes" );
  -        return( (byte[]) currentMessage );
  -      }
  -      catch( Exception e ) {
  -        e.printStackTrace( System.err );
  -      }
  -    }
  -
       if ( currentForm.equals("Document") ||
            currentForm.equals("SOAPEnvelope") ||
            currentForm.equals("AxisFault") )
  @@ -185,8 +169,7 @@
         return( (String) currentMessage );
       }
   
  -    if ( currentForm.equals("InputStream") || 
  -         currentForm.equals("ServletRequest")) {
  +    if ( currentForm.equals("InputStream") ) {
         getAsBytes();
         // Fall thru to "Bytes"
       }
  @@ -221,19 +204,6 @@
       try {
         if ( currentForm.equals("InputStream") )
           inp = (InputStream) currentMessage ;
  -      else if ( currentForm.equals("ServletRequest") ) {
  -        HttpServletRequest req = (HttpServletRequest)currentMessage;
  -        inp = req.getInputStream();
  -        
  -        // int contentLength = req.getContentLength();
  -        // Reader requestReader = req.getReader ();
  -        // char[] payload       = new char[contentLength];
  -        // int    offset        = 0;
  -        // while (offset < contentLength) {
  -           // offset+=requestReader.read(payload,offset,contentLength-offset);
  -        // }
  -        // reader = new CharArrayReader(payload);
  -      }
         else if ( currentForm.equals("String") )  {
           // Reader reader = new StringReader( (String) currentMessage );
           ByteArrayInputStream bais =  null ;
  
  
  
  1.11      +2 -1      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AxisServlet.java	2001/03/30 19:26:15	1.10
  +++ AxisServlet.java	2001/04/11 01:59:59	1.11
  @@ -108,7 +108,8 @@
       /* even need to be parsed.                                         */
       /*******************************************************************/
       MessageContext    msgContext = new MessageContext();
  -    Message           msg        = new Message( req, "ServletRequest" );
  +    InputStream       inp        = req.getInputStream();
  +    Message           msg        = new Message( inp, "InputStream" );
   
       /* Set the request(incoming) message field in the context */
       /**********************************************************/
  
  
  
  1.3       +2 -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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AxisClassLoader.java	2001/02/20 23:12:25	1.2
  +++ AxisClassLoader.java	2001/04/11 02:00:00	1.3
  @@ -117,6 +117,7 @@
           return( (Class) obj );
       }
   
  -    return( findSystemClass(name) );
  +    ClassLoader cl = this.getClass().getClassLoader();
  +    return( cl.loadClass( name ) );
     }
   };
  
  
  

Mime
View raw message