A Calendar unfortunately doesn't have an automatic representation in XML
terms. Many Java frameworks use Calendar instances to represent schema
dateTime types, but this is actually inaccurate - Calendar has a time
zone, which dateTime does not (it can be written out with an offset from
UTC, but this is not the same as a time zone). JiBX instead supplies
automatic conversions for java.util.Date, which is precisely equivalent
to a schema dateTime.
If you want an accurate representation of Calendar you could do so with
a combination of time zone (as a string) and dateTime for the time
value. If you just want to ignore the time zone and represent a Calendar
instance as a simple dateTime value you can use a custom
serializer/deserializer for this purpose - just get the time value from
the Calendar and call the appropriate org.jibx.runtime.Utility method to
convert it to a string in the serializer, and the reverse in the
deserializer.
- Dennis
Ugo Enyioha wrote:
Hi,
Is it possible to map the java.util.Calender class
with JibX. I've been trying to to automatically create
a binding file using the binding tools, but I keep
getting errors with this type.
Appreciate the help.
Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users