Yes I saw on your picture that the handler of the module is invoked!
For me, see enclosed the tomcat console!!
I put also the client which invokes the service. The client has to be special? A special call to invoke the module? Because I don't see that the handler is invoked!
In your case, is the file created? where is it created?

Fabien



----- Original Message ----- From: "Deepal Jayasinghe" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 30, 2006 10:55 AM
Subject: Re: [Axis2]How can I check that a handler is executed?


I deploy your module (without doing any modification) and it work for me
, and I can see the SOAP message in tomcat console (pls see attached file)

Fabien Couble wrote:


These are my configuration files


----- Original Message ----- From: "Deepal Jayasinghe"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 30, 2006 9:46 AM
Subject: Re: [Axis2]How can I check that a handler is executed?


I can not understand this , as you can see once you engage addressing it
will appear in the chain and when some one invoke the service the
handler will get called . As far as Axis2 is concern there is no
difference between your handler and addressing handler.

Where is your phase locate , is it before the dispatch phase or after
the dispatch phase ?

If it is possible send me your logging module archive file alone with
source code , then I can have a look at that.

Fabien Couble wrote:

Hi Deepal,
I did the modification you told me concerning the creation of the file
but nothing has changed!
The file is not created!!
That mean that the handler is not executed!
I really don't understand!!
Can the problem be caused by something else?

Fabien
----- Original Message -----
From: "Deepal Jayasinghe" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 29, 2006 12:33 PM
Subject: Re: [Axis 2]How can I check that a handler is executed?


> there is small problem , you need to modify your code in the invoke
method
> ;
> try {
>            FileWriter fw = new FileWriter("toto.txt");
>            fw.write("Test");
>            fw.flush();
>            fw.close();
>        } catch (IOException e) {
>            System.out.println(e.getStackTrace());
>        }
>
>
> Fabien Couble wrote:
>
>>
>> I tried to create the file in the invoke method. But no result...
>> Actually, a file should have been created in the module directory of
>> Axis2 but nothing appeared!
>
> That is mean your handler is get called , dont worry it is working !!
>
>> This is the code of my handler!!
>>
>> package userguide.loggingmodule;
>>
>> import org.apache.axis2.AxisFault;
>> import org.apache.axis2.context.MessageContext;
>> import org.apache.axis2.engine.Handler;
>> import org.apache.axis2.handlers.AbstractHandler;
>> import org.apache.commons.logging.Log;
>
>> import org.apache.commons.logging.LogFactory;
>> import java.io.*;
>>
>> import javax.xml.namespace.QName;
>>
>> public class LogHandler extends AbstractHandler implements Handler {
>> private static final Log log = LogFactory.getLog(LogHandler.class);
>>    private QName name;
>>
>>    public QName getName() {
>>        return name;
>>    }
>>
>>    public void invoke(MessageContext msgContext) throws AxisFault {
>>     System.out.println("Invoke Method!");
>>
>>     try{
>>      FileWriter fw = new FileWriter("toto.txt");
>>      fw.write("Test");
>>     }catch(IOException  e){
>>      System.out.println(e.getStackTrace());
>>     }
>>
>>
>>        log.info(msgContext.getEnvelope().toString());
>>    }
>>
>>    public void revoke(MessageContext msgContext) {
>>        log.info(msgContext.getEnvelope().toString());
>>    }
>>
>>    public void setName(QName name) {
>>        this.name = name;
>>    }
>>
>> }
>>
>> I don't know what to do!!
>> What do you think about this?
>>
>> Fabien
>>
>>
>>
>>
>>
>> ----- Original Message ----- From: "Deepal Jayasinghe"
>> <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Thursday, June 29, 2006 10:53 AM
>> Subject: Re: [Axis 2]How can I check that a handler is executed?
>>
>>
>>> hmm , as I can see everything is OK .
>>> I think this is smt to do with logging properties, can you
please try
>>> the following
>>> - juts try to create a file inside invoke method of the handler
and see
>>> its working :)
>>> ..
>>>
>>>
>>> Fabien Couble wrote:
>>>
>>>>
>>>> Hi Deepal,
>>>> As you said, I can see my module via the web admin console. The
>>>> phaseName I have added is loggingPhase.
>>>> This is what the web console return me:
>>>> View Operation Specific Chains
>>>> Operation Name : echo
>>>> In Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : InFlowLogHandler
>>>>  b.. Phase Name : OperationInPhase
>>>> In Fault Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : FaultInFlowLogHandler
>>>>  b.. Phase Name : OperationInFaultPhase
>>>> Out Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : OutFlowLogHandler
>>>>  b.. Phase Name : OperationOutPhase
>>>> Out Fault Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : FaultOutFlowLogHandler
>>>>  b.. Phase Name : OperationOutFaultPhase
>>>> Operation Name : ping
>>>> In Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : InFlowLogHandler
>>>>  b.. Phase Name : OperationInPhase
>>>> In Fault Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : FaultInFlowLogHandler
>>>>  b.. Phase Name : OperationInFaultPhase
>>>> Out Flow
>>>>  a.. Phase Name : loggingPhase
>>>>    a.. Handler Name : OutFlowLogHandler
>>>>  b.. Phase Name : OperationOutPhase
>>>> Out Fault Flow
>>>>  a.. Phase Name : loggingPhase


>>>>    a.. Handler Name : FaultOutFlowLogHandler
>>>>  b.. Phase Name : OperationOutFaultPhase
>>>> So I think, everything is allright.
>>>> I engaged this module by adding a module ref to the service.xml
file
>>>> of my service.
>>>> However, when I want to test that my module is executed, I
can't see
>>>> anything!!
>>>> An idea...??
>>>>
>>>> Cheers
>>>> Fabien
>>>>
>>>>
>>>>
>>>> ----- Original Message ----- From: "Deepal Jayasinghe"
>>>> <[EMAIL PROTECTED]>
>>>> To: <[email protected]>
>>>> Sent: Thursday, June 29, 2006 9:53 AM
>>>> Subject: Re: [Axis 2]How can I check that a handler is executed?
>>>>
>>>>
>>>>> Hi Fabien;
>>>>>
>>>>> Fabien Couble wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I'm trying to engage a module in the Axis2 chain.
>>>>>> Apparently, the module is well engaged in a service (I
checked the
>>>>>> Administration console) but I'd like to be sure that the
handler >>>>>> of
>>>>>> the module is executed!!
>>>>>
>>>>>
>>>>>
>>>>> If you engage the module correctly , using web admin console you
>>>>> should
>>>>> be able to see your handler in the handler chain.
>>>>>
>>>>>> To do that, I put a "System.out.println" command in the method
invoke
>>>>>> of the handler but nothing... (in the log of the Tomcat server)
>>>>>> That is why, I'd like to know if it is a good method to check
that
>>>>>> or not!
>>>>>
>>>>>
>>>>>
>>>>> How do you engage a module , using web admin console or adding
module
>>>>> ref to services.xml ?
>>>>>
>>>>>> If not, how can I do?
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks,
>>>>> Deepal
>>>>> .................................................................
>>>>> ~Future is Open~
>>>>>
>>>>>
>>>>>
>>>>>
---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>
>>>> This message contains information that may be privileged or
>>>> confidential and is the property of the Capgemini Group. It is
>>>> intended only for the person to whom it is addressed. If you
are not
>>>> the intended recipient,  you are not authorized to read, print,
>>>> retain, copy, disseminate,  distribute, or use this message or any
>>>> part thereof. If you receive this  message in error, please
notify the
>>>> sender immediately and delete all  copies of this message.
>>>>
>>>>
>>>>
---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>

>>>
>>> --
>>> Thanks,
>>> Deepal
>>> .................................................................
>>> ~Future is Open~
>>>
>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> This message contains information that may be privileged or
>> confidential and is the property of the Capgemini Group. It is
>> intended only for the person to whom it is addressed. If you are not
>> the intended recipient,  you are not authorized to read, print,
>> retain, copy, disseminate,  distribute, or use this message or any
>> part thereof. If you receive this  message in error, please
notify the
>> sender immediately and delete all  copies of this message.
>>
>>
>>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> Thanks,
> Deepal
> .................................................................
> ~Future is Open~
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient,  you are not authorized to read, print,
retain, copy, disseminate,  distribute, or use this message or any
part thereof. If you receive this  message in error, please notify the
sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient, you are not authorized to read, print, retain,
copy, disseminate, distribute, or use this message or any part
thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient,  you are not authorized to read, print,
retain, copy, disseminate,  distribute, or use this message or any
part thereof. If you receive this  message in error, please notify the
sender immediately and delete all  copies of this message.

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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




--------------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to