Hi all,

Is not it allowed to define custom modules within axis2.xml, instead of
calling engageModule () method of ServiceClient? Since I can add
security and addressing without any problem, I think it is allowed.
But, I'm facing with and interesting (?) situation.

I tried to run ClientSideModuleEngagement by adding  <module
ref="LoggingModule"/> line to its axis2.xml. Then commented out
following line:

   serviceClient.engageModule(new QName("LoggingModule"));

When I ran the sample it gave me the following output:

--------------------------------------------
- Deploying module : addressing-0.95
- Deploying module : security-0.95
- Deploying module : LoggingModule
- Invalid phases please recheck axis2.xml loggingPhase for the handler
InFlowLogHandler
--------------------------------------------

I don't get "Invalid phases..." warning with the original code.

Am I missing something?

Thanks in advance.

Ali Sadik Kumlali

P.S.: Here is my phase definitions found in axis2.xml

    <phaseOrder type="inflow">
        <!--  System pre defined phases       -->
        <phase name="TransportIn"/>
        <phase name="PreDispatch"/>
        <phase name="Dispatch"
class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                    
class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPActionBasedDispatcher"
                    
class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="AddressingBasedDispatcher"
                    
class="org.apache.axis2.engine.AddressingBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPMessageBodyBasedDispatcher"
                    
class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
            <handler name="InstanceDispatcher"
                    
class="org.apache.axis2.engine.InstanceDispatcher">
                <order phase="PostDispatch"/>
            </handler>
        </phase>
        <!--  System pre defined phases       -->
        <!--   After Postdispatch phase module author or or service
author can add any phase he want      -->
        <phase name="loggingPhase"/>
        <phase name="OperationInPhase"/>
    </phaseOrder>
    <phaseOrder type="outflow">
        <!--      user can add his own phases to this area  -->
        <phase name="OperationOutPhase"/>
        <!--system predefined phase-->
        <!--these phase will run irrespective of the service-->
        <phase name="loggingPhase"/>
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
    </phaseOrder>
    <phaseOrder type="INfaultflow">
        <!--      user can add his own phases to this area  -->
        <phase name="loggingPhase"/>
        <phase name="OperationInFaultPhase"/>
    </phaseOrder>
    <phaseOrder type="Outfaultflow">
        <!--      user can add his own phases to this area  -->
        <phase name="loggingPhase"/>
        <phase name="OperationOutFaultPhase"/>
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
    </phaseOrder>
    ...
    -----------------------------------------



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to