Hi Thorsten,

FYI: there are some small inaccuracies in the migration docs regarding filters:

CustomRequestFilter:
1. Should implement ContainerRequestFilter instead ContainerRequestHandler
2. filter method should invoke 
message.getExchange().get(OperationResourceInfo.class).getClassResourceInfo() 
instead 
message.getExchange().get(OperationResourceInfo.class).getResourceClass()

CustomResponseFilter:
Following lines should be removed (copy & paste error):
public void filter(Message message, OperationResourceInfo ori, Response 
response) {
        public class CustomRequestFilter implements ContainerRequestHandler {

The docs will be fixed soon.

Regards,
Andrei. 

> -----Original Message-----
> From: Sergey Beryozkin [mailto:[email protected]]
> Sent: Mittwoch, 30. April 2014 11:27
> To: [email protected]
> Subject: Re: RequestHandler in CXF 3.0
> 
> Hi Thorsten
> On 30/04/14 07:48, Thorsten Höger wrote:
> > Hi,
> >
> > the RequestHandler is not available in CXF 3.0
> >
> > I currently use some RequestHandlers and use message.get, message.put
> > and classResourceInfo.get... and return null if do not want to mess
> > with the execution or some Response to break execution.
> >
> > How can I migrate this to a ContainerRequestFilter or anything else in
> > CXF 3.0?
> Please see here:
> 
> http://cxf.apache.org/docs/jax-rs.html#JAX-RS-FromCXF2.7.xtoCXF3.0.0
> 
> You don't even have to change the actual handler code to minimize the
> migration effort after CXF Message is obtained...
> 
> Let me know if you have any issue with the migration...
> 
> Cheers, Sergey
> 
> >
> > Regards,
> > Thorsten
> >
> >

Reply via email to