On 15/02/13 10:29, eanbiso wrote:
Thanks a lot for the explanation!
Is ti possible to register the JAX-RS ExceptionMapper in the interceptor?
How can I do it?
Sorry but I'm not very expert with cxf!
have a look here please
http://cxf.apache.org/docs/jaxrs-services-configuration.html
you can register it as jaxrs:provider
Another question: I want to receive an exception on the client side...if I
return a Response from the handler (in place of the exception) will the
client receive an exception or not?
First of all, as I said you can either throw the exception and map it or
in the case of the interceptor - simply return Response.
On the client side: is CXF used there ? if CXF RS proxy based client is
used then you can register ResponseExceptionMapper and map the error to
some custom exception, otherwise, if proxy or WebClient is used and
typed response is expected (example, Book) then the error will be mapped
by the runtime to one of WebApplicationException subclasses
See more on client API:
http://cxf.apache.org/docs/jax-rs-client-api.html
Sergey
Thanks,
Andrea
--
View this message in context:
http://cxf.547215.n5.nabble.com/How-to-throw-an-exception-from-public-Response-handleRequest-Message-m-ClassResourceInfo-resourceCla-tp5723225p5723231.html
Sent from the cxf-user mailing list archive at Nabble.com.