I had configured an rsServer to use Bean Validation, but no validation occurred
<beans xmlns="http://www.springframework.org/schema/beans" ... xmlns:cxf="http://camel.apache.org/schema/cxf"> ... <cxf:rsServer id="somethingService" address="/something" serviceClass="foo.bar.SomethingServiceClass"> <cxf:providers> <ref bean="validationExceptionMapper" /> </cxf:providers> <cxf:inInterceptors> <ref bean="validationInInterceptor" /> </cxf:inInterceptors> <cxf:outInterceptors> <ref bean="validationOutInterceptor" /> </cxf:outInterceptors> </cxf:rsServer> <bean id="validationProvider" class="org.apache.cxf.validation.BeanValidationProvider" /> <bean id="validationExceptionMapper" class="org.apache.cxf.jaxrs.validation.ValidationExceptionMapper"/> <bean id="validationInInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationInInterceptor"> <property name="provider" ref="validationProvider" /> </bean> <bean id="validationOutInterceptor" class="org.apache.cxf.jaxrs.validation.JAXRSBeanValidationOutInterceptor"> <property name="provider" ref="validationProvider" /> </bean> ... </beans>
Moving the service class into service beans did the trick
<cxf:rsServer id="somethingService" address="/something"> <cxf:serviceBeans> <bean class="foo.bar.SomethingServiceClass" /> </cxf:serviceBeans> ... </cxf:rsServer>