code: public XMLGregorianCalendar buildXMLGregorianCalendarDate(Date date) {
          XMLGregorianCalendar result = null;
          if (date != null) {
              Calendar cal = Calendar.getInstance();
              cal.setTime(date);
              result = buildXMLGregorianCalendarDate(cal);
          }
          return result;
      }
docs: Create a XMLGregorianCalendar Without Time Component.
  
  @param date The initial Date
  @return An XMLGregorianCalendar