1 Reply Latest reply on May 30, 2006 5:22 PM by 414326

    Failed to update event when changing only dstart + attendee

    402857
      Hi everyone,

      im trying to modify an event with the calendar sdk where the vcard has been modified only at 2 places: I changed the dstart property and added an attendee.
      I am always getting an oracle.calendar.sdk.Api$StatusException(CAPI_STAT_DATA_UID_NOTFOUND) when executing this code. Anyone got an idea why?

      Greetings,
      Stephan Zeissler





      import oracle.calendar.sdk.*;

      public class DummyTest
      {
      public static final String UID = "asdasdasdad12eed1d12";
      public static final String vcard[] = new String[]
      {
      "BEGIN:VCALENDAR\n" +
      "VERSION:2.0\n" +
      "PRODID:-//KUTTIG//OCS Calendar API/\n" +
      "BEGIN:VEVENT\n" +
      "UID:" + UID + "\n" +
      "SUMMARY:Test-Event\n" +
      "SEQUENCE:0\n" +
      "DTSTART:20060119T200000\n" +
      "DTEND:20060119T210000\n" +
      "STATUS:CONFIRMED\n" +
      "CLASS:PUBLIC\n" +
      "PRIORITY:5\n" +
      "ATTENDEE;PARTSTAT=ACCEPTED:mailto:test.zolper@kuttig.com\n" +
      "END:VEVENT\n" +
      "END:VCALENDAR\n"
      ,
      "BEGIN:VCALENDAR\n" +
      "VERSION:2.0\n" +
      "PRODID:-//KUTTIG//OCS Calendar API/\n" +
      "BEGIN:VEVENT\n" +
      "UID:" + UID + "\n" +
      "SUMMARY:Test-Event\n" +
      "SEQUENCE:0\n" +
      // We changed the time to 20:30
      "DTSTART:20060119T203000\n" +
      "DTEND:20060119T210000\n" +
      "STATUS:CONFIRMED\n" +
      "CLASS:PUBLIC\n" +
      "PRIORITY:5\n" +
      "ATTENDEE;PARTSTAT=ACCEPTED:mailto:test.zolper@kuttig.com\n" +
      // And added an attendee:
      "ATTENDEE;PARTSTAT=ACCEPTED:mailto:stephan.zeissler@kuttig.com\n" +
      "END:VEVENT\n" +
      "END:VCALENDAR\n"

      };
      public DummyTest() throws Exception
      {
      Api.init("calendar.ini", "calendar.log");
      Session session = new Session();
      session.connect(Api.CSDK_FLAG_NONE, "demoocs1.localnet");
      session.authenticate(
      Api.CSDK_FLAG_NONE,
      "test.zolper",
      "PASSWORD"
      );

      // Creeate the event
      RequestResult rr = new RequestResult();
      session.storeEvents(
      Api.CSDK_FLAG_STORE_CREATE | Api.CSDK_FLAG_STREAM_NOT_MIME,
      vcard[0],
      rr
      );

      // Now replace it => fails!
      rr = new RequestResult();
      session.storeEvents(
      Api.CSDK_FLAG_STORE_REPLACE | Api.CSDK_FLAG_STREAM_NOT_MIME,
      vcard[1],
      rr
      ); // Throws Exception
      session.disconnect(0);
      }
      public static void main(String[] args) throws Exception
      {
      DummyTest dummyTest = new DummyTest();
      }
      }