Hi Joana,
We had a long discussion [1] about this in the axis2-dev list
and we decided to go on like this until dynamic phase support is
implemented in Axis2. Once dynamic phase support is implemented, we
won't have to go though all these hassle. I have sent a mail [2] about
this to rampart-dev sometime back.
Are you getting the exception in the client side ? If you don't
specify an axis2.xml when creating a configuration context, Axis2 uses
a file called axis2_default.xml in the Axis2 kernel and in Axis2 1.3 ,
Security Phase is not there in the OutFaultFlow. So we have to pass a
modified a axis2.xml when creating the configuration context.
thanks,
/nandana
[1] - http://marc.info/?t=119746279500013&r=1&w=2
[2] -
http://mail-archives.apache.org/mod_mbox/ws-rampart-dev/200801.mbox/browser
[3] -
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/axis2_default.xml?view=log
On Tue, Feb 19, 2008 at 10:07 PM, Joana M. F. Trindade
<[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I thought adding the Security phase to OutFaultFlow would solve the issue,
> but it did not. I am still getting the PhaseException, even though the
> Security phase is now defined in my axis2.xml config file. Please let me
> know what I am doing wrong. Here are the phases defined in
> $AXIS2_HOME/WEB-INF/conf/axis2.xml:
>
> <phaseOrder type="InFlow">
> <!-- System predefined phases -->
> <phase name="Transport">
> <handler name="RequestURIBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
> <order phase="Transport"/>
> </handler>
> <handler name="SOAPActionBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
> <order phase="Transport"/>
> </handler>
> </phase>
> <phase name="Addressing">
> <handler name="AddressingBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.AddressingBasedDispatcher">
> <order phase="Addressing"/>
> </handler>
> </phase>
> <phase name="Security"/>
> <phase name="PreDispatch"/>
> <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase
> ">
> <handler name="RequestURIBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
> <handler name="SOAPActionBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
> <handler name="RequestURIOperationDispatcher"
> class="
> org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
> <handler name="SOAPMessageBodyBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
>
> <handler name="HTTPLocationBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
> </phase>
> <phase name="RMPhase"/>
> <!-- System predefined phases -->
> <!-- After Postdispatch phase module author or service author can
> add any phase he want -->
> <phase name="OperationInPhase"/>
> <phase name="soapmonitorPhase"/>
> </phaseOrder>
> <phaseOrder type="OutFlow">
> <!-- user can add his own phases to this area -->
> <phase name="soapmonitorPhase"/>
> <phase name="OperationOutPhase"/>
> <!--system predefined phase-->
> <!--these phase will run irrespective of the service-->
> <phase name="RMPhase"/>
> <phase name="PolicyDetermination"/>
> <phase name="MessageOut"/>
> <phase name="Security"/>
> </phaseOrder>
> <phaseOrder type="InFaultFlow">
> <phase name="Addressing">
> <handler name="AddressingBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.AddressingBasedDispatcher">
> <order phase="Addressing"/>
> </handler>
> </phase>
> <phase name="Security"/>
> <phase name="PreDispatch"/>
> <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase
> ">
> <handler name="RequestURIBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
> <handler name="SOAPActionBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
> <handler name="RequestURIOperationDispatcher"
> class="
> org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
> <handler name="SOAPMessageBodyBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
>
> <handler name="HTTPLocationBasedDispatcher"
> class="
> org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
> </phase>
> <phase name="RMPhase"/>
> <!-- user can add his own phases to this area -->
> <phase name="OperationInFaultPhase"/>
> <phase name="soapmonitorPhase"/>
> </phaseOrder>
> <phaseOrder type="OutFaultFlow">
> <!-- user can add his own phases to this area -->
> <phase name="soapmonitorPhase"/>
> <phase name="OperationOutFaultPhase"/>
> <!--system predefined phase-->
> <phase name="RMPhase"/>
> <phase name="PolicyDetermination"/>
> <phase name="MessageOut"/>
>
> <!-- Joana, 19.02.2008, added for rampart -->
> <phase name="Security"/>
> </phaseOrder>
>
>
> Thanks and Regards,
> Joana
>
>
>
> On Feb 19, 2008 3:08 PM, Joana M. F. Trindade <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> >
> > There is a incompatibility issue between the rampart trunk version and
> > Axis2 1.3 binary distribution. In this distribution, the Security phase is
> > only enabled on the Inflow, Outflow, and InFaultFlow phase orders. Rampart
> > trunk version adds a handler to the Security phase on OutFaultFlow, as can
> > be seen in the module.xml from rampart-SNAPSHOT.mar:
> >
> > <OutFaultFlow>
> > <handler name="PolicyBasedSecurityOutHandler" class="
> > org.apache.rampart.handler.RampartSender">
> > <order phase="Security" phaseLast="true" />
> > </handler>
> > </OutFaultFlow>
> >
> > This causes a PhaseException [1] in the Axis2 engine. In order to fix
> > this, one has to manually add the Security phase to the OutFaultFlow in
> > axis2.xml ($AXIS2_HOME/WEB-INF/conf). I'm not part of the Axis2 mailing
> > lists, but perhaps it would be interesting to let them know about it, and
> > enable the Security phase by default in OutFaultFlow.
> >
> > Thanks and regards,
> > Joana
> >
> > [1] - org.apache.axis2.phaseresolver.PhaseException: Did not find the
> > desired phase 'Security' while deploying handler
> > 'PolicyBasedSecurityOutHandler'.
> >
> > --
> > Student Intern
> > SAP Research - Security & Trust
> > SAP Labs France
> >
> > 805 Avenue du Dr. Maurice Donat
> > 06250 Mougins
> > T +33/492286319
> > F +33/492286201
> > Personal Homepage:
> http://www.inf.ufrgs.br/~jmftrindade<http://www.inf.ufrgs.br/%7Ejmftrindade>
>
>
>
>
>
>
> --
> Student Intern
> SAP Research - Security & Trust
> SAP Labs France
>
> 805 Avenue du Dr. Maurice Donat
> 06250 Mougins
> T +33/492286319
> F +33/492286201
> Personal Homepage: http://www.inf.ufrgs.br/~jmftrindade
>
http://nandana83.blogspot.com/
http://nandanasm.wordpress.com/