1 Reply Latest reply: Jul 19, 2006 3:57 PM by Ward Flores-Oracle RSS

    Failed to create a daily note

    416850
      I have successed to create a appointment using the sample code in the document of Oracle® Calendar Application Developer’s Guide,but failed to create a daily note.

      main code like this

      oracle.calendar.soap.iCal.iCalendar ical =
      new oracle.calendar.soap.iCal.iCalendar();
      oracle.calendar.soap.iCal.vCalendar vcal =
      new oracle.calendar.soap.iCal.vCalendar();
      vevent = new oracle.calendar.soap.iCal.vEvent();
      ical.addvCalendar(vcal);
      vcal.addvComponent(vevent);
      // set the vEvent attributes
      vevent.setEventClass(m_eventClass);
      // Start time
      vevent.setDtStart(k_startTime);
      // Duration
      vevent.setDuration(k_baseDuration);
      // Location
      vevent.setLocation(k_baseLocation);
      // Summary
      vevent.setSummary(m_testName);
      // UID
      vevent.setUid(m_uid);
      // Event type
      vevent.setXEventType(m_xEventType);
      // Description
      vevent.setDescription(ical.toString());
      oracle.calendar.soap.client.CreateCommand create =
      new oracle.calendar.soap.client.CreateCommand();
      create.setCmdId(m_cmdid);
      create.setiCalendar(ical);
      // Create the Oracle Calendar client SOAP stub
      // and set the basic authentication header
      System.out.println("Creating the Oracle Calendar client SOAP stub");
      oracle.calendar.soap.client.Calendarlet cws =
      new oracle.calendar.soap.client.Calendarlet();
      // Login
      if (cws == null) {
      return;
      }
      Initialization myInit = new Initialization();
      myInit.initBasicAuth(cws, "test", "12345",
      "http://myhost:7777/ocws-bin/ocas.fcgi");
      // Next, make the SOAP call
      System.out.println("Making the SOAP call");
      oracle.calendar.soap.client.CalendaringResponse response =
      cws.Create(create.getElement());


      My call method is:

      MyEventCreateTest myEventCreateTest =
      new MyEventCreateTest("20060715", "PT01H00M",
      "Somewhere exotic", "MyEventCreateTest8",
      "MyEventCreateTest-UID-8",
      oracle.calendar.soap.iCal.vEvent.k_eventClassPublic,
      vEvent.k_eventTypeDailyNote,
      "CommandID-MyEventCreateTest", false);
      myEventCreateTest.run();

      and the log is:

      Creating the Oracle Calendar client SOAP stub
      Making the SOAP call
      SOAP send buffer:
      <?xml version='1.0' encoding='UTF-8'?>
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Header>
      <auth:BasicAuth xmlns:auth="http://soap-authentication.org/2002/01/"><Name>test</Name><Password>12345</Password></auth:BasicAuth>
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>
      <cwsl:Create xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/">
      <CmdId>CommandID-MyEventCreateTest</CmdId><iCalendar><vcalendar prodid="-//Oracle//Calendaring//Calendarlet//EN" version="2.0"><vevent><class>PUBLIC</class><description>iCalendar
      vcalendar
      vcalendar.version:2.0
      vcalendar.prodid:-//Oracle//Calendaring//Calendarlet//EN
      vevent
      vevent.class:PUBLIC
      vevent.x-oracle-eventtype:DAILY NOTE
      vevent.dtstart:20060715
      vevent.duration:PT01H00M
      vevent.location:Somewhere exotic
      vevent.summary:MyEventCreateTest8
      vevent.uid:MyEventCreateTest-UID-8
      </description><dtstart>20060715</dtstart>
      <duration>PT01H00M</duration><location>Somewhere exotic</location><summary>MyEventCreateTest8</summary>
      <uid>MyEventCreateTest-UID-8</uid><x-oracle-eventtype>DAILY NOTE</x-oracle-eventtype></vevent></vcalendar></iCalendar></cwsl:Create>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      SOAP receive buffer:
      <?xml version="1.0" encoding="utf-8" ?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Server.Error::System::SOAPRequest</faultcode>
      <faultstring>The Create method did not have a proper element in the request</faultstring>
      <detail>
      <cwsl:Error xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/">
      <Class>Error::System::SOAPRequest</Class>
      <Code>0020-00-00-00000034</Code>
      <Line>3028</Line>
      <FileName>SOAPRequestHandler.cpp,v</FileName>
      <Version>1.46</Version>
      <LastMod>2005/07/05 15:02:04</LastMod>
      <Author>fleblanc</Author>
      <Date>Fri Jul 14 16:47:41 2006</Date>
      <PID>15299</PID>
      <TID>3046071216</TID>
      <Level>Error</Level>
      </cwsl:Error>
      </detail>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>

      Creating CreateReply
      Unable to create CreateReply

      Thanks

      null