We are building a RESTFUL JSON based web service, where we need to validate the input bean parameters, such as not blank, not null etc. We are able to validate the bean parameters using annotations.
We have overloaded the CXF Inbound interceptor to send business defined HTTP error code instead of plain HTTP 500 error, in case of validation failures.
As we are building the bean (stub) classes from WADL and XSD file, every time we generate new bean classes, these validator annotation are lost.
Hence, instead of using annotations, we are trying externalize the validations through some external property.
Please let us know, if there is any way to validate the incoming request JSON, through externalized constraints property/XML file.
Thanks, Indranil