krasa / krasa-jaxb-tools

XJC / JAXB plugin for generation of Bean Validation Annotations (JSR-303) and replacing primitive types
Apache License 2.0
60 stars 49 forks source link

Generate bean validation annotations on service interface #59

Closed digitalillusion closed 7 years ago

digitalillusion commented 7 years ago

This plugin is missing an important feature. While it generates JSR-303 annotations on the model, it does not add @Valid annotation on the service interface. This is really a gap since bean validation (as implemented in cxf validation feature) requires the service interface to be annotated in order to be triggered. So, up to now the only way to run the validation is an hard coded call to a bean validator in the service implementation.

This PR fills the gap, as thoroughly described in this stackoverflow discussion