FileDocCategorySizeDatePackage
DebugHandler.javaAPI DocApache Axis 1.42542Sat Apr 22 18:57:28 BST 2006org.apache.axis.handlers

DebugHandler

public class DebugHandler extends BasicHandler
author
Doug Davis (dug@us.ibm.com)

Fields Summary
protected static Log
log
public static final String
NS_URI_DEBUG
Constructors Summary
Methods Summary
public voidinvoke(org.apache.axis.MessageContext msgContext)

    
          
        log.debug("Enter: DebugHandler::invoke");
        try {
            Message       msg = msgContext.getRequestMessage();

            SOAPEnvelope message = (SOAPEnvelope)msg.getSOAPEnvelope();
            SOAPHeaderElement header = message.
                getHeaderByName(NS_URI_DEBUG, "Debug");

            if (header != null) {
                Integer i = ((Integer)header
                             .getValueAsType(Constants.XSD_INT));
                if (i == null)
                    throw new AxisFault(Messages.getMessage("cantConvert03"));

                int debugVal = i.intValue();
                log.debug(Messages.getMessage("debugLevel00", "" + debugVal) );
                //Debug.setDebugLevel(debugVal);
                header.setProcessed(true);
            }
        }
        catch( Exception e ) {
            log.error( Messages.getMessage("exception00"), e );
            throw AxisFault.makeFault(e);
        }
        log.debug("Exit: DebugHandler::invoke");
    
public voidonFault(org.apache.axis.MessageContext msgContext)

        log.debug("Enter: DebugHandler::onFault");
        log.debug("Exit: DebugHandler::onFault");