In MZ's version 5 notes, p 137, it says javax.xml.datatype.XMLGregorianCalender maps to xs:anySimpleType in a schema.
It says "It is (XMLGregorianCalender)statically mapped to xs:anySimpleType, the common schema type from which all XML schema calendar types are derived."
But why XMLGregorianCalender won't map to xs:datetime?
For me, it makes more sense to map the Calender object to datatime instead of anySimpleType.
If we don't annotate it wit @XmlSchemaType, the schema type of the XMLGregorianCalender is not known until runtime. So, it can only be mapped to xs:anySimpleType.
This is from :http://markmail.org/message/bpplfv5ytvrtp7fp
So personally, I think it is more appropriate to annotate XMLGregorianCalender with @XmlSchemaType (name="dateTime").
I think it is not recommended not to annotate the Calendar object in Java, as it will be mapped by xs:anySimpleType.