class RegistrationDateAdapter extends XmlAdapter<String, XMLGregorianCalendar> {

    @Override
    public String marshal(XMLGregorianCalendar xmlGregorianCalendar)
    {
        // ISO datetime format
        return xmlGregorianCalendar.toGregorianCalendar().toInstant().toString();
    }

}