There are different ways to do this. One way is to create your own handler for
logging transactions. Extend the BasicHandler class in Axis. You can get access
to the MessageContext object inside the invoke method. See the following code
snippet.
public void invoke(MessageContext msg) throws AxisFault
{
//Log the request
Message request = msg.getRequestMessage();
logger.info("SOAP Request :"+ request.getSOAPPartAsString());
//Log the response
Message response = msg.getResponseMessage();
logger.info("SOAP Response :" + response.getSOAPPartAsString());
}
Anand________________________________ From: Nikita Tovstoles [mailto:[EMAIL PROTECTED] Sent: Tue 11/15/2005 6:53 PM To: [email protected] Subject: printing out SOAP messages to axis.log Hi, I'd like to print out raw incoming and outgoing SOAP messages. Adding the following to log4j.props file did produce some log output, but not the SOAP xml. What am I missing? log4j.rootLogger=warn, stdout, A1 # show DEBUG for SOAPPart method log4j.logger.org.apache.axis.SOAPPart=DEBUG # A1 is set to be a ConsoleAppender. # log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=/tmp/axis.log # A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n thanks -nikita
<<winmail.dat>>
