I have a problem with Bean Validation. If I generate the Code with wsimport all the generated models don't have the annotations on the fields. So when I validate the object it doesn't recognise any ContraintViolation.
Does anyone have a solution for this? Or does Bean Validation not work with wsimport?
Some Info:
Serverside => JAX-WS with Tomcat 8.0 and Metro
Clientside => JavaFX
Usually you would not validate a bean which is supposed to send to a remote endpoint. First of all you would have to duplicate any validation logic in the "client".
Second there might be other restrains then your bean validation. E.g. Business validation of any type.
I suggest you implement an endpoint which does the validation and sends back any validation result to the client.
Please do not neglect to validate before any change to the model is done. You can not trust any data send by a client.