XML & Web services: How to use the org.apache.axis.handlers.LogHandler
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?
- Posted by: Daniel U
- Posted on: August 09 2005 05:59 EDT
- How to use the org.apache.axis.handlers.LogHandler by Todd Clarke on August 16 2005 02:36 EDT
- How to use the org.apache.axis.handlers.LogHandler by Daniel U on August 23 2005 14:11 EDT
Check out the following if you are just trying to log the request and response.
<!-- 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"
<handler name="log" type="java:org.apache.axis.handlers.LogHandler"/>
Thanks for your help Todd. Now it's working.
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" />
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.
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.