xml - Java web services. Validating incoming datas -


i'm working on implementing values validations in web service didn't develop , (to honest) i'm not (yet) java web services framework.

the "entrance" method of ws defined this:

@suppresswarnings({ "rawtypes", "unchecked" })     @post     @produces({ mediatype.application_xml, mediatype.application_json })     @consumes({ mediatype.application_xml, mediatype.application_json })     @path("calculobaremo/calculobaremonuevo")     public baremonuevoout calculobaremonuevo(@context httpservletrequest request, baremonuevoin baremonuevo)throws remoteexception{  ...   } 

so can handle class baremonuevoin generated xml send web service.

i have control hipotetic numeric field should receive numeric values (either integer or decimal -double-).

let's take, example, fields integer , double. class baremonuevoin has following attributes: integer age , double salary

what's problem? problem parsing xml -> class works this:

xml 22

class age = 22

xml

class age = null

xml aaa

class age = null

double datas such works same.

stated case:

should work me as:

age = 0 (not null!)

i not able differ if null value comes void value (allowed) or alphanumeric value (not allowed).

is possible configure jax-ws different way of parsing incoming xmls relative entity classes?

sorry confusing text may more precise while discussing issue.

thank in advance.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -