users@jersey.java.net

Handling XML validation errors in the unmarshaller

From: Jeff Crump <jeffrey.crump_at_gmail.com>
Date: Mon, 10 May 2010 11:08:52 -0400

Hello,

I'm trying to figure out how to handle in a general way validation events
that come from the unmarshaller on input. For example, my bean class has a
Long-valued property but the client sends a value that cannot be converted
to a Long. The unmarshaller is correctly recognizing the parse error but
chooses to skip the property rather than throw the error back up to my code.

I found this discussion in the archives regarding validation, and it sounds
like a similar approach would work for me:

https://jersey.dev.java.net/servlets/BrowseList?list=users&by=thread&from=1196351

But since it's a couple of years old I was wondering if there was an easier
way to accomplish this.

Thanks,

Jeff