cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: CXF REST - How to register/configure ParameterNameProvider?
Date Wed, 16 Apr 2014 13:33:20 GMT
On 16/04/14 13:54, gangaaloori wrote:
> Hi,
> I'm using CXF 3.0.0-milestone2 version for exposing a REST API. I would like
> to validate the incoming request which I'm able to do using the
> JAXRSBeanValidationInInterceptor. If I'd like to return a good validation
> error message to the caller, How do I get/access the parameter name which
> caused the validation exception?
> After a quick search I found that out there is a way, by implementing the
> "javax.validation.ParameterNameProvider" interface. Luckily CXF source code
> has got an example java class -
> Now my question is - How do I register/configure this class within CXF
> context?
> Just FYI - I'm using spring to configure the jaxrs server
This interceptor (like all other validation interceptors) can be 
injected with the custom 
org.apache.cxf.validation.BeanValidationProvider, it is created by 
default, but it can be customized, one of its constructors accepts 
ParameterNameProvider, the other one - 
org.apache.cxf.validation.ValidationConfiguration which can be used to 
completely customize the process.

I'll need to update the documentation
Thanks, Sergey

> Thanks,
> Ganga Aloori
> --
> View this message in context:
> Sent from the cxf-user mailing list archive at

Sergey Beryozkin

Talend Community Coders


View raw message