How to enable logging for the Apache Axis SOAP client
When troubleshooting SOAP communication and messaging problems, it may be helpful to turn on Log4J (Logging for Java) logging for the Apache Axis SOAP client.
For example, when you are configuring authentication for a SOAP connector, Log4J may provide valuable information.
Update: Use the instructions in the Suggested Approach for V5.1 to V5.3.
For V5.4, a simpler approach is available:
1. Add the following to the
2. Stop and restart the system.
To turn on Log4J logging, you need to edit two logging configuration files:
These files reside in
Follow the steps below to edit these configuration files and turn on Log4J logging:
- Create a backup copy of
- Expand the original
praxis-*.jarto a temporary working directory.
- In the temporary working directory, locate
commons-logging.propertiesin a text editor and uncomment the last line in the file to enable Log4Jlogging:
# Uncomment the next line to disable all logging.
# Uncomment the next line to enable the simple log based logging
# Uncomment the next line to enable log4j based logging
- Open the
log4j.propetiesfile in a text editor and set the desired logging level for the
CONSOLEappender. Valid logging levels are:
DEBUGare used for troubleshooting purposes. The following example shows debug logging turned on at the root level and each of the appender levels. However, only the
CONSOLEappender (the second line of the file) is enabled.
- To enable the
LOGFILEappender, uncomment the third line of the file:
# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=DEBUG, CONSOLE, LOGFILE
# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE.layout.ConversionPattern= %d (%c) %-5p - %m%n
# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE.layout.ConversionPattern= %d [%t] (%c) %-5p - %m%n
This example also shows that
ConversionPattern settings were modified. This setting provides datetime information and slightly reformats the logging output. (These changes are not necessary, but may be desirable.).
- After you update and save the
log4j.propertiesfiles, use a Java jar command to repackage the
praxis-1.2.1.jarfile. If this file is in a temporary directory, use a command like the following:
jar –uvf praxis-1.2.1.jar .\*
praxis-1.2.1.jarwith the Process Commander distribution EAR or WAR file.
- Redeploy the application to the server.
IMPORTANT: Although Process Commander, like Apache AXIS, uses Log4J facilities for logging, the Log4J distribution that is distributed with Process Commander is customized and repacked. It is not a standard distribution.
For this reason, to support AXIS logging you must download and install the standard Log4J distribution from the Apache Software Foundation, and add it as an external library to your application server configuration. To download the current stable version of Apache Log4J, visit http://logging.apache.org/log4j/.
For information on how to add external libraries to a V5.x system, see About the Process Commander Class Paths .