axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kasi, Anand" <>
Subject RE: printing out SOAP messages to axis.log
Date Wed, 16 Nov 2005 01:09:55 GMT
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();"SOAP Request  :"+ request.getSOAPPartAsString());
  //Log the response
  Message response = msg.getResponseMessage();"SOAP Response  :" + response.getSOAPPartAsString());


From: Nikita Tovstoles [mailto:Nikita.Tovstoles@Sun.COM]
Sent: Tue 11/15/2005 6:53 PM
Subject: printing out SOAP messages to axis.log


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
# A1 is set to be a ConsoleAppender.
# log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n


View raw message