programming-examples/java/XML/Trace message handler.java

30 lines
891 B
Java
Raw Normal View History

2019-11-15 12:59:38 +01:00
Trace message handler
package com.ack.webservices.soap.examples.lifestory;
import org.apache.axis.AxisFault;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
import org.apache.axis.handlers.BasicHandler;
public class TraceMessageHandler extends BasicHandler {
public void invoke( MessageContext msgContext ) throws AxisFault {
try {
System.out.println( "\n=========== trace message on " +
java.util.Calendar.getInstance().getTime()
+ " =====================" );
Message msg = msgContext.getCurrentMessage();
msg.writeTo( System.out );
System.out.println( "\n=================================================" );
}
catch( Exception e ) {
throw AxisFault.makeFault( e );
}
}
public void undo( MessageContext msgContext ) {
}
}