First of all I must say that it was a very concise and informative reply...

That said, from what I understood the following are the interceptor
providers...
        * Client
    * Endpoint
    * Service
    * Bus
    * Binding
Since these will plug there interceptor implementations in a layered way, I
am curios to know the layered order in which they fit together, along with
the default interceptor implementation that they provide?

One more ... As I can plug-in my interceptor in any of the layer but
shouldn't the interceptor be capable of handling the message as passed by
the upper/lower layer interceptor. 
So, doesn't any of the upper or lower layer interceptors provide any
protocol/rules for the message format at any particular layer...like StAX
In-interceptor should expect that input message is an XML document...

Also, it would be really helpful if someone can suggest a way to debug the
CXF-Code

Thanks!!

Regards,
Harbhanu

-----Original Message-----
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 05, 2008 7:38 PM
To: [email protected]
Subject: Re: Reg. Interceptor states




On May 5, 2008, at 4:45 AM, harbhanu wrote:
> I want to know more about the specifics of different states in the
> interceptor chain to which an interceptor can be attached.
>
> I have tried looking at the documentation but IMO it doesn't discuss  
> it in
> depth.
>
> According to the test that I did, the state transition is as follows
....snip.....

The phases are controlled by the PhaseManager in the Bus.   If you  
look in the PhaseManagerImpl.java at:
https://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/java/org/apache/
cxf/phase

You can see the full list of phases that we have defined.

That said, you can easily configure new phases in there if you need  
some additional work you want done.


> If possible, please let me know about the message transformation  
> that takes
> place.

Well, the interceptors themselves are the ones that do any  
transformation or processing.   All of the CXF functionality is done  
via interceptors that live in the chain.    Thus, any processing that  
goes on is specific to the interceptors that are put in place by the  
binding, the bus, the endpoint, etc..

> Also, point me to any resource which discusses this in depth.
>
> Couple more questions regarding interceptors:
>
> How can I pass information between different layers of interceptors?

The Message object implements Map so you can store anything you want  
on the message itself.

Alternatively, if you need information across the message exchange  
(aka: you need information from the in interceptors to do some out  
processing), you can store stuff on the Exchange (which also  
implements Map) which is retrievable from the message.
>

> How can I modify the execution of a particular message during the  
> message
> flow since I don't see any context which can be modified for the  
> same. ?

I guess I'd need more details about what you are trying to do.   The  
Message contains a reference to the PhaseChain that is currently being  
executed.  From your interceptor, you can completely modify the chain  
(for phases that have not yet run).   You can add interceptors, delete  
them, etc...

I hope that helps!


Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to