You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by umarul Farooq <am...@suntecgroup.com> on 2013/04/30 08:06:35 UTC
CXF Rest service does not do the input date validation
Hi All,
I developed a Rest service using Cxf 2.7.3 api.
I have used a bean class which contains a property called openDate and its
data type is java.sql.Timestamp and i provide the TimestampAdaptor for the
same.
When rest client gives the invalid date, it is not throwing the exception
rathen it is assigning the null reference in the openDate property.
Could you please let me know how to ebable the invalid date validation in
the service.
Thanks & Regards
Umar.
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Rest-service-does-not-do-the-input-date-validation-tp5726943.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: CXF Rest service does not do the input date validation
Posted by umarul Farooq <am...@suntecgroup.com>.
Thank you very much Sergey Beryozkin, After specified schema validation, now
its is validating.
Thanks & Regards
Umar
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Rest-service-does-not-do-the-input-date-validation-tp5726943p5726996.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: CXF Rest service does not do the input date validation
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 30/04/13 07:06, umarul Farooq wrote:
> Hi All,
>
> I developed a Rest service using Cxf 2.7.3 api.
>
> I have used a bean class which contains a property called openDate and its
> data type is java.sql.Timestamp and i provide the TimestampAdaptor for the
> same.
>
> When rest client gives the invalid date, it is not throwing the exception
> rathen it is assigning the null reference in the openDate property.
>
> Could you please let me know how to ebable the invalid date validation in
> the service.
>
Is that bean a JAXB bean ? If yes then try to enable a schema validation:
http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-Schemavalidation
Cheers, Sergey
> Thanks& Regards
> Umar.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-Rest-service-does-not-do-the-input-date-validation-tp5726943.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com