hi Ali
please see my inline comments

Ali Sadik Kumlali wrote:

>Hi all,
>
>Is not it allowed to define custom modules within axis2.xml, instead of
>calling engageModule () method of ServiceClient?
>
you can define (engage) custom module in axis2.xml ,btw as far as axis2
is concern all the modules are custom modules to it :) , no matter
whether it is addressing or security.

> 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
>--------------------------------------------
>  
>
you have to add the phase called "loggingPhase" into axis2.xml since
LogingModule try to add a handler into that phase. So just add follwing
entry into
axis2.xml inside
<phaseOrder type="inflow">
<phase name="loggingPhase"/>
</>

>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 
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 


Reply via email to