I have a REST service whose data entity beans are annotated with JAXB annotations. For security reasons those entity beans need to be validated. To see the differences I wan't to switch on and off this validation, hence I thought to create a bean validation proxy. But I don't know how I can tell the JAXB provider to use the CategoryValidationProxy
instead of the CategoryImpl.
Because of the already existing XSD schema validation, a propper MessageBodyReader
for dataEntity Category already exists. This MessageBodyReader
looks like: Validate JAXBElement
[EDIT :]
Right now I have done all the data validation within the data entity implementation itself. So there is no way to switch this validation on and off. Enable and disable it on the fly is quite important because this enables me to see which attacks can be prevented.