1 Reply Latest reply: Mar 24, 2009 12:58 PM by 513533 RSS

    Getting incomplete end of file when using fetchCalendarEventsByRange

    559068
      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
          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.