users@jersey.java.net

Re: [Jersey] validation???

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Tue, 12 May 2009 12:48:09 +0200

Hi Bruno,

XSD validation enforces the correct syntax of the matedata, but it do
nothing about the business rules, which ones you should code
somewhere...

.Net and other EE frameworks provides built in validation processes
based on events or chains o validation.. it is really cool and a "must
have" feature of any productive framework..

but Jersey is a young project, and it is not complete yet.. it is nice
that people ask more and more by the missed features, than the project
developers can organize the priorities..

On Tue, May 12, 2009 at 11:23 AM, Bruno Vernay <brunovern.a_at_gmail.com> wrote:
> Hi,
> As I am reading the JAXB doc, there is schema validation
> https://jaxb.dev.java.net/tutorial/section_3_3-Validation.html#Validation
> But it uses XSD, which isn't very friendly.
>
> Paul, in your example, you show a immutable object "Range" with an
> annotated constructor. Is it used by JAXB ???
> I thought that JAXB was using only an empty constructor and then
> accessed the fields with byte code enhancement.  So this created a
> problem since it bypasses any validation.
>
> Do you know a way to instruct JAXB to use a specific constructor ?
> That would indeed allow validation.
>
> Thanks
> Bruno
>
>
> On Tue, May 12, 2009 at 10:43 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>> Hi Keith,
>> There is no validation framework provided by Jersey.
>> Some developers are using the Bean Validation Framework. See the following
>> thread:
>> http://markmail.org/search/?q=list%3Anet.java.dev.jersey.users+validation#query:list%3Anet.java.dev.jersey.users%20validation%20order%3Adate-backward+page:1+mid:3qhjvhnozilsuzmn+state:results
>> IIRC other developers may be using some AOP-based solutions to validate
>> resource method parameters.
>> Hope this helps,
>> Paul.
>> On May 12, 2009, at 12:38 AM, Treague, Keith wrote:
>>
>> Is there any support in jersey for validating incoming data? I’d prefer this
>> sort of thing to be handled by the framework like Spring MVC or even Struts
>> 2 however I’m not seeing any integrated validation framework in Jersey.
>>
>> Keith Treague
>>
>
>
>
> --
> Bruno VERNAY
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>



-- 
Please help to test this application:
http://fgaucho.dyndns.org:8080/cejug-classifieds-richfaces