Tatu,
Thanks for the input and response. I think this helps me down a path. One question I do have after spending the evening perusing the API and some of Paul's old (2008) posts...is there now a straight forward way to enable schema validation with JAXB in Jersey?
I may be going the JSR303 route but want to cover all of my options.
Thanks again for the response to newbie questions.
Mike
On Apr 1, 2010, at 11:10 PM, Tatu Saloranta wrote:
> On Thu, Apr 1, 2010 at 4:42 PM, Mike Key <mike.key_at_gmail.com> wrote:
> ...
>> Also I've noticed a few posts to this mail alias about different validation means (JSON or XML) that people are considering as part of JSR 303. So my more important question is...I am 100% new to
>> JSR303 and am wondering if using this type of validation is becoming preferred to XML schema validation or is to be used in conjunction with schema validation? And lastly if it is preferred to XML
>
> I can't say for sure, but I think it is becoming more common, partly
> because JSR-303 is now mature (which it was not when JAXB and JAX-RS
> became mature). It is also nice because its use is quite orthogonal to
> serialization aspects, meaning that it is more widely applicable than
> data format specific validation.
>
>> schema validation...do I use these annotations instead of JAXB annotations on an interface supporting JSON/XML with Jersey?
>
> You would use them as complementary pieces: JAXB annotations to handle
> data binding, and JSR-303 to indicate constraints for bean properties.
> Sort of like Schema validation is an optional additional thing for
> JAX-RS/JAXB. But whereas some JAXB annotations have additional
> implications for XML Schema generation, there are no such side effects
> for Bean Validation. Actually, JAXB annotations do not have direct
> effect on schema validation, but rather they can be used to generate
> schema, which can then be used for validation, so their effect would
> be indirect.
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>