Hi Sebastien,

There's no way to directly tell JiBX that if the value is empty it 
should be treated as though it weren't present at all. But, you can 
easily add a check for this in a custom deserializer - just wrap the 
standard Date deserializer with a check for an empty string, and return 
a null value in this case. The standard serializer/deserializer methods 
are all in the org.jibx.runtime.Utility package.

  - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



Sebastien Boudreau wrote:
> Hello,
>
> In my xml, I have a 'subscriptionDate' that has no value: 
> <subscriptionDate/>.
> My binding definition for that element is: <value 
> name="subscriptionDate" field="subscriptionDate" usage="optional" />
>
> At runtime, JiBX throws an exception saying that there is a "Missing 
> 'T' separator in dateTime" while trying to deserialize that date.
>
> How could I tell JiBX not trying to deserialize it if there is no 
> value for this element?
>
> Thanks again for your help!
> Seb
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to