Hi, The general recommendation is to use ContainerRequestFilter/ContainerResponseFilter's whenever possible, because this keeps your code portable (Container filters are part of JAX-RS spec).
If you really have to use CXF interceptors for JAX-RS, the order for inbound chain will be following: 1) Servlet filters 2) CXF interceptors before UNMARSHAL phase 3) PreMatch Container Request Filter 4) CXF interceptors after UNMARSHAL phase 5) per-method specific Container Request Filters For outbound chain: 1) CXF interceptors before MARSHAL phase 2) ContainerResponse Filters 3) CXF interceptors after MARSHAL phase Regards, Andrei. > -----Original Message----- > From: Richard Snowden [mailto:[email protected]] > Sent: Sonntag, 26. Oktober 2014 22:58 > To: [email protected] > Subject: JAX-RS Interceptors > > Hi there, > > from what I understood is that I can use an AbstractPhaseInterceptor for SOAP > and for REST messages. > > When doing REST web services, would you advise that I should use > ContainerRequestFilter/ContainerResponseFilter's instead? > > Is there an option to set the "phase" when those Filters are triggered? > (like RECEIVE, UNMARSHAL, POST_INVOKE, etc. in an InterceptorChain)? > > regards, > Richard
