Hi


Thanks for answering Gabo,

I have noticed that the interceptors are fired for a web service as my
services are set up as both web services and rest services. So I'm assuming
there is nothing wrong with either the listener itself or the phase that I'm
using.

Does anyone know how I can tell what Interceptors are in the chain for the
REST service ?

There're only currently only two intereceptors in the input chain for (JAXRS) 
Restfuls service,
the JAXRSInInterceptor and ServiceInvokerInterceptor.

Now, JAXRSInInterceptor is invoked at the very early stage (PRE_STREAM), this stage was there from this interceptor's inception so I've never payed any attention to it - and I reckon this is the reason you're not seeing your own CXF interceptor being invoked. I think I may need to put JAXRSInInterceptor to some later stage, such that some custom interceptors can be added before and after the the JAXRSInInterceptor has been invoked. here're we're talking about the 'classical' CXF interceptors which use phases. Would you like your interceptor be invoked before or after JAXRSInInterceptor has been invoked ? What stage you're using ?
Also, can you elaborate a bit more on how you specify interceptors using 
annotations ?


If you're ok with your interceptor be invoked before JAXRSInInterceptor then you might want to consider using CXF JAX-RS input filters which JAXRSInInterceptor invokes upon them *before* proceeding with handling the actual request.

Cheers, Sergey





Thanks



Gabo Manuel wrote:

Hi,
Here's a copy of my beans.xml, I configure the interceptors via
annotations


I haven't really tried adding interceptors via annotations. You might
want to look up (http://cwiki.apache.org/CXF20DOC/interceptors.html). I
am not sure if in addition to the annotations, you have to add the
interceptor to some interceptor provider as well.

Also, afaik the phase tells when the interceptor is meant to be given a
chance/shot at the message. INVOKE phase means that the interceptor will
be given the message context before/during method invocation. The link
above lists down when each phase occurs.

Others?

Gabo




--
View this message in context: 
http://www.nabble.com/Easy-to-Answer-REST-Interceptor-Query-tp20242642p20243179.html
Sent from the cxf-user mailing list archive at Nabble.com.


Reply via email to