users@jersey.java.net

[Jersey] JAX-RS data conversion, data binding and validation

From: Christian Helmbold <christian.helmbold_at_yahoo.de>
Date: Thu, 27 Jan 2011 17:35:55 +0000 (GMT)

Spring MVC and Grails[1] offer a nice way to convert incoming request data into
domain objects. Conversion errors, like "xy" -> Integer, are reported.


I want to do something similar with JAX-RS, but don't know how I could do it
elegantly. A MessageBodyReader came to my mind, but how to report conversion
errors to the method in the resource class, which receives the conversion
result?

Christian


[1]
http://grails.org/doc/latest/guide/6.%20The%20Web%20Layer.html#6.1.6%20Data%20Binding