Log axis2 client requests and responses

For Axis2-client side logging for SOAP messages, just use the following JVM arguments while running your standalone client or include this VM args in your Appln. Server start script,

JAVA_OPTS=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug

C:\java %JAVA_OPTS% YourClientAppln.java

Cheers, Sankar


If you add the below lines to your log4j.properties file, you will need not to pass any VM or JVM parameters.

#Axis2
log4j.appender.AxisLogFile=org.apache.log4j.RollingFileAppender
log4j.appender.AxisLogFile.File=${catalina.base}/logs/Axis-client.log
log4j.appender.AxisLogFile.layout=org.apache.log4j.PatternLayout
log4j.appender.AxisLogFile.layout.ConversionPattern=%d{ISO8601} [%X{UUID}] %5p %t %c{1} - %m%n
log4j.logger.httpclient.wire=DEBUG,AxisLogFile