GregorianCalendar calendar = new GregorianCalendar(); calendar.setTimeInMillis(startPoint.getTime()); period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar)); calendar.setTimeInMillis(endPoint.getTime()); period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));
GregorianCalendar calendar = new GregorianCalendar(); calendar.setTimeInMillis(startPoint.getTime()); period.setStartPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar)); calendar.setTimeInMillis(endPoint.getTime()); period.setEndPoint(DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar));