This discussion is archived
1 Reply Latest reply: Mar 24, 2009 10:58 AM by 513533 RSS

Getting incomplete end of file when using fetchCalendarEventsByRange

559068 Newbie
Currently Being Moderated
When using fetchEventsByRange() to fetch calendar, I am getting incomplete end of file. Some
user's ics files end with "END:VCA", some with "END:VACLANE", some with
just "END:VEVENT". Does anyone have similar experience? Thanks.

The code I am using to export ics file is:

private String fetchCalendarEventsByRange(String startDate, String endDate) {

String properties[] = new String[0];
RequestResult results = new RequestResult();
String iCalendar = new String();

try {
iCalendar = mySession.fetchEventsByRange(Api.CSDK_FLAG_STREAM_NOT_MIME | Api.CSDK_FLAG_FETCH_EXCLUDE_HOLIDAYS,
agendas, // search agenda of current user
startDate,
endDate,
properties, // request specific properties
results);

return iCalendar;
}
catch(Api.StatusException e) {
System.err.println("fetchEventsByRange returned status'" + e + "'");
System.exit(-1);
}
return null;
}
  • 1. Re: Getting incomplete end of file when using fetchCalendarEventsByRange
    513533 Newbie
    Currently Being Moderated
    Hello,

    The code snippet provided with this question was used in the lab in an attempt to reproduce the problem; behavior did not occur. Also to note: several (3rd party) applications have used this function for years with no reports of such behavior (as far as the R&D team is aware.)

    This may be specific to a particular environment. Suggestion: try the code on a completely separate setup (i.e. avoid cloned installations or hosts that are configured from a similar template.) Does the behavior change?

    Chady.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points