1. Add a new phase [NoSecurity] in global axis2.xml under OutFlow - just before the Security phase
2. Create a module [say, nosecuity] with handler having the following logic.
<phaseOrder type="OutFlow">
<phase name="soapmonitorPhase"/>
<phase name="OperationOutPhase"/>
<phase name="RMPhase"/>
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
<phase name="NoSecurity"/>
<phase name="Security"/>
</phaseOrder>
You can download the eclipse project for this module from here.
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
msgContext.setCurrentHandlerIndex(msgContext.getCurrentHandlerIndex() + 2);
return InvocationResponse.CONTINUE;
}
3. Engage this module to the service you want to remove security frome OutFlow.
<module ref="nosecurity" />
3 comments:
Please, attach nosecurity.mar file.
Thanks for this, I had removed the infow section from my module.xml in the Rampart.mar file, but this looks like the better option.
Alan, I looked at the solution in Stack Overflow. HOw did you edit .mar file??
Post a Comment