Description
I created a Phase which overrides the checkPreconditions and checkPostconditions methods in the Phase class.
If I add this Phase to the input flow in the axis2.xml file, it passes through the mentioned methods.
But if I add the same Phase to the output flow, it doesn't pass through these methods.
In both cases, I use a global Phase.
From what I saw in the kernel jar, there's a problem in the PhasesInfo.class.
The getGlobalOutPhaseList() method, when adding a new phase to the output flow list, it calls the method copyPhase(phase), which recreates the phase by adding the name, description and handlers. But by doing so, the initial Phase is cast down from the class I defined (for example MyPhase extends Phase) to a simple Phase and the checkPreconditions and checkPostconditions methods are no longer available. Therefore, in this case, it pases through the checkPrecondition method which is in the Phase class.
For the input flow, the method getGlobalInFlow() in PhasesInfo doesn't call the copyPhase method, and the original phase remains how it was.