Skip to content

Instantly share code, notes, and snippets.

@0guzhan
Created November 12, 2012 21:39
Show Gist options
  • Save 0guzhan/4062100 to your computer and use it in GitHub Desktop.
Save 0guzhan/4062100 to your computer and use it in GitHub Desktop.
Sample Handler for Apache Axis2 to log incoming soap envelope
package com.blog.oguzhan.axis2.handler;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.handlers.AbstractHandler;
import org.apache.log4j.Logger;
public class SampleHandler extends AbstractHandler{
private Logger logger = Logger.getLogger(SampleHandler.class);
@Override
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
// logging incoming soap envelope
logger.info(msgContext.getEnvelope().toString());
// let the flow of phases continue on execution
return InvocationResponse.CONTINUE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment