Discussions

XML & Web services: How to use the org.apache.axis.handlers.LogHandler

  1. How to use the org.apache.axis.handlers.LogHandler (6 messages)

    I'm trying to integrate the LogHandler in my webservice but I can't find page that describes how to configure it. Is there any page that describes this subject in detail?

    Thanks

    Daniel
  2. Check out the following if you are just trying to log the request and response.

    http://www.google.com/support/adwordsapi/bin/answer.py?answer=15137&topic=237

    <!-- Save this file as "client-config.wsdd" in the working directory
    of your Axis client. Axis will load it automatically. The
    configuration here tells Axis to save all incoming and outgoing
    XML into a file named "axis.log"
    -->

    <deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

    <handler name="log" type="java:org.apache.axis.handlers.LogHandler"/>

    <globalConfiguration>
    <requestFlow>
    <handler type="log"/>
    </requestFlow>
    <responseFlow>
    <handler type="log"/>
    </responseFlow>
    </globalConfiguration>

    <transport
    name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>

    </deployment>
  3. Thanks for your help Todd. Now it's working.

    Best regards

    Daniel
  4. Another question about the LogHandler:

    Is it possible to change the filename and the location of the axis.log file? I have tried to specify a parameter named LogHandler.fileName but it's not working.

    <handler name="Log" type="java:org.apache.axis.handlers.LogHandler" >
        
    <parameter name="LogHandler.fileName" value="c:/myaxis.log" />
        
    </handler>

    Best regards

    Daniel
  5. Working directory of axis client?[ Go to top ]

    I've been trying to use this but haven't been successful. Where exactly is the "working directory of the axis client"? I tried placing the client-config.wsdd file in c:\tomcat\webapps\axis\WEB-INF (where server-config.wsdd already is) but that didnt work.

    Thanks
  6. Working directory of axis client?[ Go to top ]

    If declare my LogHandler in server-config.wsdd as:

    <handler name="Log" type="java:org.apache.axis.handlers.LogHandler" />

    the axis.log file is created in C:\WINDOWS\System32 on the server. It would be nice to be able to specify where the log file should be placed.

    Daniel
  7. I use next part in my xml file:

    <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <handler name="Log" type="java:org.apache.axis.handlers.LogHandler" >  
      <parameter name="LogHandler.fileName" value="D://myaxis.log" />  
      <parameter name="LogHandler.writeToConsole" value="false" />
    </handler>
    <globalConfiguration> ....

    The path need to have a double slash in it (D://myaxis.log) and then it would work fine!