// This mapping will convert a Java 'Date' type to a dateTime
tm.register(java.util.Date.class,
Constants.XSD_DATETIME,
new CalendarSerializerFactory(java.util.Date.class,
Constants.XSD_DATETIME),
new CalendarDeserializerFactory(java.util.Date.class,
Constants.XSD_DATETIME)
);
// This is the preferred mapping per JAX-RPC.
// Last one registered take priority
tm.register(java.util.Calendar.class,
Constants.XSD_DATETIME,
new CalendarSerializerFactory(java.util.Calendar.class,
Constants.XSD_DATETIME),
new CalendarDeserializerFactory(java.util.Calendar.class,
Constants.XSD_DATETIME)
);
}