1 Reply Latest reply: May 15, 2006 10:57 AM by 414326 RSS

    Reccuring event creation using the java API and CAPI does not create event

    480794
      Good morning,

      We am using this function to create a recurring event using the Java SDK. The
      connection to the server works ok. When creating a recurring event using the
      below code there is no error message or exception but neither is the event created.

      The Oracle calendar used is version 9.0.4

      private void createCalendarEvent(String title, String uid) {

      RequestResult results = new RequestResult();
      String s = "";
      s += "Content-Type: text/calendar; charset=UTF-8\n";
      s += "Content-Disposition: attachment; filename=\"\"\n";
      s += "Content-Transfer-Encoding: QUOTED-PRINTABLE\n\n";
      s += "BEGIN:VCALENDAR\n";
      s += "PRODID:Connector ocal/\n";
      s += "VERSION:2.0\n";
      s += "BEGIN:VEVENT\n";
      s += ("SUMMARY:" + title + "\n");
      s += "DESCRI
      PTION: " + title + "\n";
      s += "LOCATION: " + title + "\n";
      s+= "CLASS:" + "NORMAL" + "\n";
      s+= "X-ORACLE-EVENTTYPE: " +APPOINTMENT\n";
      s += "DTSTART:" + "TZID=Europe-Paris:20060324T143600Z\n";
      s+= "RRULE:FREQ=DAILY;COUNT=2\n";
      s+= "PRIORITY:" + "1" + "\n";
      s += "END:VEVENT\n";
      s += "END:VCALENDAR\n";


      System.out.println(s);
      try {
      mySession.storeEvents(Api.CSDK_FLAG_STORE_CREATE |
      Api.CSDK_FLAG_STORE_INVITE_SELF ,s,results);

      }
      catch (Api.StatusException e)
      {
      System.out.println("storeEvents returned status'" + e.getMessage() + "'");
      System.out.println("storeEvents returned status'" + e + "'");
      e.printStackTrace();
      }
      }

      I think it is the cormat of the vevent i am using is not correct. The documentation does not help much in finding the correct format to be used. Could you help me find the correct format of VEVENT to be used to create recurrening events.

      Thanks is advance!!!
      Joyce
        • 1. Re: Reccuring event creation using the java API and CAPI does not create ev
          414326
          Hi Joyce,

          In the 9.0.4 version of the sdk there was a bug that overwrites the error message in that case. That bug as been fixed.

          The error that should have been returned is "CAPI_STAT_DATA_ICAL_PARAMNAME"

          The problem is that the mime header indicates that the VCALENDAR is quoted-printable encoded while in fact it is not.

          "Content-Transfer-Encoding: quoted-printable".
          So the parser is having problems decoding the data which leads to the CAPI_STAT_DATA_ICAL_PARAMNAME error. The 2 easiest solutions are to (1)encode the VCalendar in quoted-printable, or remove the mime header and store the event with CAPI_FLAG_STREAM_NOT_MIME.

          References:
          - http://www.motobit.com/util/quoted-printable-encoder.asp
          - MIME Rfc 2045

          Here is what the event encoded looks like.
          MIME-Version: 1.0
          Content-Type: text/calendar; charset=UTF-8
          Content-Transfer-Encoding: quoted-printable

          BEGIN:VCALENDAR
          VERSION:2.0
          PRODID:Oracle/Oracle Calendar Server 10.1.2.1.0
          BEGIN:VTIMEZONE
          TZID:/ORACLE/OCAL/MET-1METDST
          BEGIN:DAYLIGHT
          RRULE:FREQ=YEARLY;UNTIL=20750331T020000Z;BYMONTH=3;BYDAY=-1SU
          TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
          TZOFFSETTO:+0200
          TZOFFSETFROM:+0100
          DTSTART:19960325T020000
          END:DAYLIGHT
          BEGIN:STANDARD
          RRULE:FREQ=YEARLY;UNTIL=20751031T030000Z;BYMONTH=10;BYDAY=-1SU
          TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
          TZOFFSETTO:+0100
          TZOFFSETFROM:+0200
          DTSTART:19961025T030000
          END:STANDARD
          BEGIN:DAYLIGHT
          RRULE:FREQ=3DYEARLY;UNTIL=3D19950331T020000Z;BYMONTH=3D3;BYDAY=3D-1SU
          TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
          TZOFFSETTO:+0200
          TZOFFSETFROM:+0100
          DTSTART:19910325T020000
          END:DAYLIGHT
          BEGIN:STANDARD
          RRULE:FREQ=3DYEARLY;UNTIL=3D19950930T030000Z;BYMONTH=3D9;BYDAY=3D-1SU
          TZNAME:Middle European Time\, Middle European Time Daylight Savings Time
          TZOFFSETTO:+0100
          TZOFFSETFROM:+0200
          DTSTART:19910924T030000
          END:STANDARD
          END:VTIMEZONE
          BEGIN:VEVENT
          X-ORACLE-EVENTTYPE:APPOINTMENT
          TRANSP:OPAQUE
          SUMMARY:testRRULE234
          SEQUENCE:0
          RRULE:FREQ=3DDAILY;COUNT=3D2;INTERVAL=3D1;WKST=3DSU
          PRIORITY:5
          ORGANIZER:mailto:user1@cfritsc5.ch.oracle.com
          LOCATION:Paris
          DTSTART;TZID=3D/ORACLE/OCAL/MET-1METDST:20060504T143000
          DTEND;TZID=3D/ORACLE/OCAL/MET-1METDST:20060504T150000
          CLASS:PRIVATE
          ATTENDEE:mailto:user1@cfritsc5.ch.oracle.com
          END:VEVENT
          END:VCALENDAR

          Regards,
          Jean-Philippe