WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

examples.webservices.handler.log
Class LogHandler

java.lang.Object
  |
  +--examples.webservices.handler.log.LogHandler
All Implemented Interfaces:
javax.xml.rpc.handler.Handler

public final class LogHandler
extends java.lang.Object
implements javax.xml.rpc.handler.Handler

Class that implements a handler in the handler chain, used to access the SOAP request and response message.

The class implements the javax.xml.rpc.handler.Handler interface. The class simply prints the SOAP request and response messages to a log file before the messages are processed by the backend component.

Author:
Copyright (c) 2002 by BEA Systems. All Rights Reserved.

Constructor Summary
LogHandler()
           
 
Method Summary
 void destroy()
          Destroys the Handler instance.
 javax.xml.namespace.QName[] getHeaders()
           
 boolean handleFault(javax.xml.rpc.handler.MessageContext mc)
          Specifies that a message be logged to the log file if a SOAP fault is thrown by the Handler instance.
 boolean handleRequest(javax.xml.rpc.handler.MessageContext mc)
          Specifies that the SOAP request message be logged to a log file before the message is sent to the Java class backend component
 boolean handleResponse(javax.xml.rpc.handler.MessageContext mc)
          Specifies that the SOAP response message be logged to a log file before the message is sent back to the client application that invoked the Web service.
 void init(javax.xml.rpc.handler.HandlerInfo hi)
          Initializes the instance of the handler.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogHandler

public LogHandler()
Method Detail

destroy

public void destroy()
Destroys the Handler instance.
Specified by:
destroy in interface javax.xml.rpc.handler.Handler

getHeaders

public javax.xml.namespace.QName[] getHeaders()
Specified by:
getHeaders in interface javax.xml.rpc.handler.Handler

handleFault

public boolean handleFault(javax.xml.rpc.handler.MessageContext mc)
Specifies that a message be logged to the log file if a SOAP fault is thrown by the Handler instance.
Specified by:
handleFault in interface javax.xml.rpc.handler.Handler

handleRequest

public boolean handleRequest(javax.xml.rpc.handler.MessageContext mc)
Specifies that the SOAP request message be logged to a log file before the message is sent to the Java class backend component
Specified by:
handleRequest in interface javax.xml.rpc.handler.Handler

handleResponse

public boolean handleResponse(javax.xml.rpc.handler.MessageContext mc)
Specifies that the SOAP response message be logged to a log file before the message is sent back to the client application that invoked the Web service.
Specified by:
handleResponse in interface javax.xml.rpc.handler.Handler

init

public void init(javax.xml.rpc.handler.HandlerInfo hi)
Initializes the instance of the handler. Creates a nonCatalogLogger to log messages to.
Specified by:
init in interface javax.xml.rpc.handler.Handler

Documentation is available at
http://e-docs.bea.com/wls/docs70

Copyright © 2002 BEA Systems, Inc. All Rights Reserved.