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/transport/http AxisServlet.java
Date Mon, 17 Jun 2002 18:55:04 GMT
dims        2002/06/17 11:55:04

  Modified:    java     build.xml
               java/src/org/apache/axis AxisFault.java
               java/src/org/apache/axis/transport/http AxisServlet.java
  Log:
  - activation.jar is now a required library due to SAAJ API (which in turn is required by
JAXRPC API)
  - Extract getHttpServletResponseStatus from AxisFault to eliminate dependency on javax.servlet.http.HttpServletResponse.
  
  Revision  Changes    Path
  1.149     +1 -1      xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.148
  retrieving revision 1.149
  diff -u -r1.148 -r1.149
  --- build.xml	13 Jun 2002 18:22:40 -0000	1.148
  +++ build.xml	17 Jun 2002 18:55:04 -0000	1.149
  @@ -226,12 +226,12 @@
       <echo message="commons-logging.present=${commons-logging.present}" />
       <echo message="log4j.present=${log4j.present}" />
       <echo message="tt-bytecode.present=${tt-bytecode.present}" />
  +    <echo message="activation.present=${activation.present}" />
       <echo message=""/>
       <echo message="--- Optional Libraries ---" />
       <echo message="servlet.present=${servlet.present}" />
       <echo message="regexp.present=${regexp.present}" />
       <echo message="junit.present=${junit.present}" />
  -    <echo message="activation.present=${activation.present}" />
       <echo message="mailapi.present=${mailapi.present}" />
       <echo message="attachments.present=${attachments.present}" />
       <echo message="security.present=${security.present}" />
  
  
  
  1.47      +0 -9      xml-axis/java/src/org/apache/axis/AxisFault.java
  
  Index: AxisFault.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- AxisFault.java	11 Jun 2002 14:53:51 -0000	1.46
  +++ AxisFault.java	17 Jun 2002 18:55:04 -0000	1.47
  @@ -74,7 +74,6 @@
   import java.util.Vector;
   
   import javax.xml.namespace.QName;
  -import javax.servlet.http.HttpServletResponse;
   
   /**
    * An exception which maps cleanly to a SOAP fault.
  @@ -297,14 +296,6 @@
           return result;
       }
       
  -    public int getHttpServletResponseStatus() {
  -        // Should really be doing this with explicit AxisFault
  -        // subclasses... --Glen
  -        return getFaultCode().getLocalPart().equals("Server.Unauthorized")
  -                ? HttpServletResponse.SC_UNAUTHORIZED
  -                : HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
  -    }
  -
       public void output(SerializationContext context) throws Exception {
   
           SOAPEnvelope envelope = new SOAPEnvelope();
  
  
  
  1.114     +16 -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.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- AxisServlet.java	17 Jun 2002 00:33:49 -0000	1.113
  +++ AxisServlet.java	17 Jun 2002 18:55:04 -0000	1.114
  @@ -575,7 +575,7 @@
                   log.error(JavaUtils.getMessage("exception00"), e);
                   // It's been suggested that a lack of SOAPAction
                   // should produce some other error code (in the 400s)...
  -                res.setStatus(e.getHttpServletResponseStatus());
  +                res.setStatus(getHttpServletResponseStatus(e));
                   responseMsg =
                       generateFaultResponse(msgContext.getRequestMessage(), e);
               } catch (Exception e) {
  @@ -601,6 +601,21 @@
           }
       }
       
  +    /**
  +     * Extract information from AxisFault and map it to a HTTP Status code.
  +     * 
  +     * @param af Axis Fault
  +     * @return HTTP Status code.
  +     */
  +    private int getHttpServletResponseStatus(AxisFault af) {
  +        // Should really be doing this with explicit AxisFault
  +        // subclasses... --Glen
  +        return af.getFaultCode().getLocalPart().equals("Server.Unauthorized")
  +                ? HttpServletResponse.SC_UNAUTHORIZED
  +                : HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
  +    }
  +
  +
       /**
        * Should never generate an exception, but if it does
        * we want to be able to see evidence of it for tracing purpose
  
  
  

Mime
View raw message