Class LogHandler

java.lang.Object
org.apache.axis.handlers.BasicHandler
org.apache.axis.handlers.LogHandler
All Implemented Interfaces:
Serializable, Handler

public class LogHandler extends BasicHandler
A simple Handler which logs the request and response messages to either the console or a specified file (default "axis.log"). To use this, deploy it either in both the request and response flows (global, service, or transport) or in just the response flow. If deployed in both places, you'll also get an elapsed time indication, which can be handy for debugging.
Author:
Doug Davis (dug@us.ibm.com), Glen Daniels (gdaniels@apache.org)
See Also:
  • Field Details

    • log

      protected static org.apache.commons.logging.Log log
  • Constructor Details

    • LogHandler

      public LogHandler()
  • Method Details

    • init

      public void init()
      Description copied from class: BasicHandler
      Stubbed-out methods. Override in your child class to implement any real behavior. Note that there is NOT a stub for invoke(), since we require any Handler derivative to implement that.
      Specified by:
      init in interface Handler
      Overrides:
      init in class BasicHandler
    • invoke

      public void invoke(MessageContext msgContext) throws AxisFault
      Description copied from interface: Handler
      Invoke is called to do the actual work of the Handler object. If there is a fault during the processing of this method it is invoke's job to catch the exception and undo any partial work that has been completed. Once we leave 'invoke' if a fault is thrown, this classes 'onFault' method will be called. Invoke should rethrow any exceptions it catches, wrapped in an AxisFault.
      Parameters:
      msgContext - the MessageContext to process with this Handler.
      Throws:
      AxisFault - if the handler encounters an error
    • onFault

      public void onFault(MessageContext msgContext)
      Description copied from interface: Handler
      Called when a subsequent handler throws a fault.
      Specified by:
      onFault in interface Handler
      Overrides:
      onFault in class BasicHandler
      Parameters:
      msgContext - the MessageContext to process the fault to