This discussion is archived
3 Replies Latest reply: Feb 1, 2008 2:41 AM by 620944 RSS

We are not able to use the Web Service to create an appointment

user495727 Newbie
Currently Being Moderated
We are able to create a Day event with:

<vcalendar prodid="-//Oracle//Calendaring//Calendarlet//EN" version="2.0">
<vevent>
<class>PRIVATE</class>
<description>Ejemplo de evento</description>
<dtstart value="DATE">20061003</dtstart>
<duration>PT00H00M</duration>
<location>Vision Corporation</location>
<summary>Kiku</summary>
<uid>TESTORAPTOR-UID-3</uid>
<x-oracle-eventtype>DAY EVENT</x-oracle-eventtype>
<x-oracle-isrtcenabled>false</x-oracle-isrtcenabled>
<valarm>
<action>DISPLAY</action>
<trigger>-PT1H05M</trigger>
</valarm>
</vevent>
</vcalendar>

But we are not able to create an appointment:

<vcalendar prodid="-//Oracle//Calendaring//Calendarlet//EN" version="2.0">
<vevent>
<class>PUBLIC</class>
<description>a long description</description>
<dtstart>20061003T090909</dtstart>
<duration>60M</duration >
<location>my location</location>
<priority>2</priority>
<summary>a title</summary>
<uid>4567</uid>
<x-oracle-eventtype>APPOINTMENT</x-oracle-eventtype>
</vevent>
</vcalendar>

The error is not clear at all:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encod
ingStyle="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</fau
ltstring>
<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>

And in ocas_log:

CLASS = Error::Data::CalEvent
CODE = 0001-00-00-00018599
MSG = A UNIAPI error occurred
LINE = 6668

We are creating a PL/SQL procedure to upload appointments. We don't have Java installed in the database this is why we can't use (and prefere not to use) the calendarlet classes. We want to use a custom API.

Which is the syntax to create an APPOINTMENT? From the documentation we are not able to guess it...
Thanks for your help.
  • 1. Re: We are not able to use the Web Service to create an appointment
    user495727 Newbie
    Currently Being Moderated
    The whole PL/SQL which fails in case it helps to solve the issue

    declare
    peticion VARCHAR2(32767);
    env VARCHAR2(32767);
    url varchar2(1000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    begin
    url:='http://<HOST>:7778';
    -- soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    -- <auth:BasicChallenge
    -- xmlns:auth="http://www.soap-authentication.org/2002/01/">
    -- <Realm>Oracle Calendar Web Services</Realm>
    -- </auth:BasicChallenge>
    peticion:='
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
    <auth:BasicAuth xmlns:auth="http://soap-authentication.org/2002/01/">
    <Name>sysadmin</Name>
    <Password>sysadmin1</Password>
    </auth:BasicAuth>
    </soap:Header>
    <soap:Body>
    <cwsl:Create xmlns:cwsl="http://www.oracle.com/WebServices/Calendaring/1.0/">
    <CmdId>Testoraptor Command 31</CmdId>
    <iCalendar>
    <vcalendar prodid="-//Oracle//Calendaring//Calendarlet//EN" version="2.0">
    <vevent>
    <class>PUBLIC</class>
    <description>a long description</description>
    <dtstart>20061003T090909</dtstart>
    <duration>60M</duration >
    <location>my location</location>
    <priority>2</priority>
    <summary>a title</summary>
    <uid>4567</uid>
    <x-oracle-eventtype>APPOINTMENT</x-oracle-eventtype>
    </vevent>
    </vcalendar>
    </iCalendar>
    </cwsl:Create>
    </soap:Body>
    </soap:Envelope>';
    http_req := utl_http.begin_request(url||'/ocws-bin/ocas.fcgi', 'POST','HTTP/1.0');
    utl_http.set_header(http_req, 'Content-Type', 'text/xml');
    utl_http.set_header(http_req, 'Content-Length', length(peticion));
    utl_http.set_header(http_req, 'SOAPAction', '"http://www.oracle.com/WebServices/Calendaring/1.0/Create"');
    utl_http.write_text(http_req, peticion);
    dbms_output.put_line (length(peticion));
    http_resp := utl_http.get_response(http_req);
    utl_http.read_text(http_resp, env);
    utl_http.end_response(http_resp);
    end;
    /

    We have tried many different XML structures but we are not able to create an appointment.
  • 2. Re: We are not able to use the Web Service to create an appointment
    ward.flores Newbie
    Currently Being Moderated
    Hi,

    The problem is located in your "duration" element. The duration string should be of the form PThhHmmM (e.g. PT01H30M meaning 1 hour and 30 minutes).

    Even if you're not planning to use the calendarlet.jar, you can still refer to its documentation (javadoc) in order to find this type of information.

    Calendar Web Services Java API Reference (Javadoc)
    http://download-east.oracle.com/docs/cd/B25553_01/calendar.1012/b25488/toc.htm

    Regards.
  • 3. Re: We are not able to use the Web Service to create an appointment
    620944 Newbie
    Currently Being Moderated
    <p>I have a very similar issue but the solution posted didn't do the trick for me. Did anyone manage to resolve this issue on this thread?</p>

    <p>Thanks</p>

    <p>AB<br>
    Mobile Phones</p>

    Message was edited by:
    user617941