axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/handlers/soap SOAPService.java
Date Fri, 03 Aug 2001 19:12:59 GMT
rubys       01/08/03 12:12:59

  Modified:    java/src/org/apache/axis MessageContext.java
                        SimpleTargetedChain.java
               java/src/org/apache/axis/client AxisClient.java
                        ServiceClient.java
               java/src/org/apache/axis/handlers LogHandler.java
               java/src/org/apache/axis/handlers/soap SOAPService.java
  Log:
  Enable determination of whether or not we are past the pivot point
  determinable on the client too.  Also reset it between requests, and
  use this information to tailor the log.
  
  Revision  Changes    Path
  1.48      +8 -0      xml-axis/java/src/org/apache/axis/MessageContext.java
  
  Index: MessageContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- MessageContext.java	2001/08/02 16:50:02	1.47
  +++ MessageContext.java	2001/08/03 19:12:59	1.48
  @@ -275,6 +275,14 @@
       }
       
       /**
  +     * Determin when we've past the pivot
  +     */
  +    public boolean getPastPivot()
  +    {
  +        return havePassedPivot;
  +    }
  +
  +    /**
        * Indicate when we've past the pivot
        */
       public void setPastPivot(boolean pastPivot)
  
  
  
  1.17      +1 -0      xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java
  
  Index: SimpleTargetedChain.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SimpleTargetedChain.java	2001/07/12 15:02:59	1.16
  +++ SimpleTargetedChain.java	2001/08/03 19:12:59	1.17
  @@ -103,6 +103,7 @@
                   requestHandler.undo( msgContext );
               throw (AxisFault) e ;
           }
  +        msgContext.setPastPivot(true);
           try {
               if ( responseHandler != null )
                   responseHandler.invoke( msgContext );
  
  
  
  1.21      +3 -0      xml-axis/java/src/org/apache/axis/client/AxisClient.java
  
  Index: AxisClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/AxisClient.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AxisClient.java	2001/07/30 02:29:28	1.20
  +++ AxisClient.java	2001/08/03 19:12:59	1.21
  @@ -135,6 +135,7 @@
                   // When do we call init/cleanup??
                   
                   SimpleTargetedChain service = null ;
  +                msgContext.setPastPivot(false); 
                   
                   /* Process the Service Specific Request Chain */
                   /**********************************************/
  @@ -163,6 +164,8 @@
                   HandlerRegistry tr = getTransportRegistry();
                   if ( hName != null && (h = tr.find( hName )) != null )
                       h.invoke(msgContext);
  +                else
  +                    msgContext.setPastPivot(true); 
                                   
                   /* Process the Global Response Chain */
                   /***********************************/
  
  
  
  1.36      +1 -0      xml-axis/java/src/org/apache/axis/client/ServiceClient.java
  
  Index: ServiceClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/ServiceClient.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- ServiceClient.java	2001/08/03 17:17:06	1.35
  +++ ServiceClient.java	2001/08/03 19:12:59	1.36
  @@ -437,6 +437,7 @@
           if (uri != null) reqEnv.setEncodingStyleURI(uri);
           
           msgContext.setRequestMessage(reqMsg);
  +        msgContext.setResponseMessage(resMsg);
           msgContext.setServiceDescription(this.serviceDesc);
           
           reqEnv.addBodyElement(body);
  
  
  
  1.13      +24 -20    xml-axis/java/src/org/apache/axis/handlers/LogHandler.java
  
  Index: LogHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/LogHandler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LogHandler.java	2001/07/12 15:03:45	1.12
  +++ LogHandler.java	2001/08/03 19:12:59	1.13
  @@ -67,28 +67,32 @@
    * @author Doug Davis (dug@us.ibm.com)
    */
   public class LogHandler extends BasicHandler {
  +
  +    long start = 0;
  +
       public void invoke(MessageContext msgContext) throws AxisFault {
           Debug.Print( 1, "Enter: LogHandler::invoke" );
  -        try {
  -            FileWriter  fw   = new FileWriter( "axis.log", true );
  -            PrintWriter pw   = new PrintWriter( fw );
  -
  -            Message inMsg = msgContext.getRequestMessage();
  -            Message outMsg = msgContext.getResponseMessage();
  -            
  -            pw.println( "=======================================================" );
  -            pw.println( "= " + ( new Time(System.currentTimeMillis()) ).toString() );
  -            pw.println( "= InMsg: " + inMsg );
  -            pw.println( "= InMsg: " + (inMsg == null ? "-" : inMsg.getAsString()));
  -            pw.println( "= OutMsg: " + outMsg );
  -            pw.println( "= OutMsg: " + (outMsg == null ? "-" : outMsg.getAsString()));
  -            pw.println( "=======================================================" );
  -            
  -            pw.close();
  -        }
  -        catch( Exception e ) {
  -            Debug.Print( 1, e );
  -            throw new AxisFault( e );
  +        if (msgContext.getPastPivot() == false) {
  +           start = System.currentTimeMillis();
  +        } else {
  +            try {
  +                FileWriter  fw   = new FileWriter( "axis.log", true );
  +                PrintWriter pw   = new PrintWriter( fw );
  +    
  +                Message inMsg = msgContext.getRequestMessage();
  +                Message outMsg = msgContext.getResponseMessage();
  +                
  +                pw.println( "=======================================================" );
  +                pw.println( "= Elapsed: " + (System.currentTimeMillis() - start)) + " millseconds";
  +                pw.println( "= InMsg: " + (inMsg == null ? "null" : inMsg.getAsString()));
  +                pw.println( "= OutMsg: " + (outMsg == null ? "null" : outMsg.getAsString()));
  +                pw.println( "=======================================================" );
  +                
  +                pw.close();
  +            } catch( Exception e ) {
  +                Debug.Print( 1, e );
  +                throw new AxisFault( e );
  +            }
           }
           Debug.Print( 1, "Exit: LogHandler::invoke" );
       }
  
  
  
  1.18      +2 -0      xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java
  
  Index: SOAPService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SOAPService.java	2001/07/31 16:18:06	1.17
  +++ SOAPService.java	2001/08/03 19:12:59	1.18
  @@ -161,6 +161,8 @@
                   msgContext.getTransportName() + ").",
                   null, null);
           
  +        msgContext.setPastPivot(false);
  +
           Handler h = getRequestHandler() ;
           if ( h != null ) {
               Debug.Print( 2, "Invoking request chain" );
  
  
  

Mime
View raw message