1、普通字符串(日期形式)转换为XMLGregorianCalendar
SimpleDateFormat simpleDateFormat =new SimpleDateFormat("yyyy-MM-dd");
Date date2=simpleDateFormat.parse("2013-06-22");
GregorianCalendar gcal =new GregorianCalendar();
gcal.setTime(date2);
XMLGregorianCalendar xgcal= DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);