Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private XMLGregorianCalendar convertDateToXMLGregorianCalendar(Date fromDate) throws OperationFailedException {
- GregorianCalendar gregoryFrom = new GregorianCalendar();
- gregoryFrom.setTime(fromDate);
- XMLGregorianCalendar calendarFrom = null;
- try {
- calendarFrom = DatatypeFactory.newInstance()
- .newXMLGregorianCalendar(
- gregoryFrom);
- } catch (DatatypeConfigurationException e) {
- throw new OperationFailedException("Could not convert date to XMLGregorianDate" + fromDate + " Error :" + e.getMessage());
- }
- return calendarFrom;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement