I suspect a prompt reply on this topic has not come because it's been discussed so much in the past - a search should reveal lots of good posts on it. But since I have gotten so much from this community and need to keep my karma up, I'll summarize what I've collected:
Axis has built in logging. By default axis runs without any visible log client side. To generate log statements, modify log4j.properties and run with log4j.jar on your classpath to get the log. This is hinted at in the reference.html document, I believe the following is true: The axis.jar file contains a log4j.properties file. There may be different options for modifying it, I simply modified it and replaced it back in the axis.jar file. While it may work to place a reference to the properties file ahead of the reference to axis.jar in your classpath, I wouldn't recommend that, as you expose yourself to unnecessary confusion. Snippet from axis Log4j.properties with additional comments: -------------------------------------- # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE # Use the following line instead to activate logging at the # info level to the logfile. #log4j.rootCategory=INFO, CONSOLE, LOGFILE To get started experimenting with logging, you'll want to do two things - add LOGFILE to the log4j.rootcategory, and change the category from INFO to DEBUG. And I think you also have to change the line: log4j.appender.LOGFILE.Threshold=INFO to: log4j.appender.LOGFILE.Threshold=DEBUG This lowers the threshold of logging for the LOGFILE. At least with 1.0 and I think 1.1, nothing is logged by Axis at the INFO level. I could be wrong, but turning on debug produces REAMS of statements. Each SOAP message is logged at least 5 times, for example. You may have to search your system to see where its writing axis.jar after the change and a test run. I don't recall whether that was classpath driven or what. If you add debug statements to your code (say you've written a serviceImpl class) make sure you update those classes in the webapps directory on tomcat, and restart before you expect to see logging. Sound simple but more than once I've heard that forehead slap on this list. My (limited) experience suggests that there is no intermediate level of logging from axis. It's all the debug verbosity or nothing. To get around that, we followed another suggestion and wrote our own client handler to log our web service client app activity. Simple handler for logging soap messages: (props to Tom Jordahl - Macromedia Server Development ----------------------------------------- Here is a reasonable handler that prints the SOAP messages. Configure it like this in client-config.wsdd: ---------------------- <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <handler name="log" type="java:package.name.here.SOAPMonitor"/> <globalConfiguration> <requestFlow> <handler type="log"/> </requestFlow> <responseFlow> <handler type="log"/> </responseFlow> </globalConfiguration> <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/> <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/> </deployment> ----------------------------------- import org.apache.axis.*; import org.apache.axis.handlers.BasicHandler; public class SOAPMonitor extends BasicHandler { public void invoke(MessageContext msgContext) throws AxisFault { if (msgContext.getPastPivot()) { Message inMsg = msgContext.getRequestMessage(); Message outMsg = msgContext.getResponseMessage(); if (inMsg != null) { System.out.println(); System.out.println(":::SOAP Request:::"); System.out.println(); System.out.println(inMsg.getSOAPPartAsString()); } if (outMsg != null) { System.out.println(); System.out.println(":::SOAP Response:::"); System.out.println(); System.out.println(outMsg.getSOAPPartAsString()); System.out.println(); } } } public void undo(MessageContext msgContext) { } } Peter **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. ****************************************************************************