Previous     Contents     Index     Next     
iPlanet Calendar Server 5.1 Programmer's Manual



Chapter 6   Web Calendar Access Protocol (WCAP) Overview


This chapter describes the Web Calendar Access Protocol (WCAP), which is a high level command-based protocol used to communicate with iPlanet Calendar Server. This chapter has the following sections:



Introduction

The default client UI protocol for iPlanet Calendar Server 5.x is an SHTML protocol, and is private. However, you can use WCAP for compatibility to support the iPlanet Calendar Server 2.x client UI protocol. WCAP is also the only way to retrieve calendar data in text/calendar and text/xml formats.

WCAP is a command based system consisting of client requests and server responses for transmitting calendaring data. WCAP returns calendaring data via HTTP. In most cases, iPlanet Calendar Server receives data through URL-encoded arguments.

WCAP returns output in an HTTP message. The returned content body of the HTTP messages can consist of calendar data in the following formats:

  • text/calendar format (iCalendar).

  • text/xml format.

    This XML format follows the iCalendar DTD.

  • text/js with embedded JavaScript objects.

    This was the default for the iPlanet Calendar Server 2.x user interface. It has been deprecated for iPlanet Calendar Server 5.x in favor of the .shtml approach.

WCAP commands consist of four general categories of usage:

  • User Configuration Information

  • Web Calendaring Data

  • Communication-sending for group scheduling

  • Miscellaneous commands



Command Overview

Table 6-1 describes the high level list of commands supported in WCAP . For a detailed description of each command, see Chapter 7 "WCAP Commands".


Table 6-1 WCAP Command Overview 

WCAP Command

Description

addlink  

Add event links from one calendar to another.  

change_password  

Change the user's password.  

createcalendar  

Create a new calendar.  

deletecalendar  

Delete an existing calendar.  

deletecomponents_by_range  

Delete both events and todos in a calendar(s) over a specific time period.  

deleteevents_by_id  

Delete events given a specific calid and uid/recurrence-ID pair.  

deleteevents_by_range  

Delete events in a calendar(s) over a specific time period.  

deletetodos_by_id  

Delete todos given a specified calid and userid/recurrence-ID pair.  

deletetodos_by_range  

Deletes todos in a calendar(s) over a specific time period.  

export  

Exports a calendar to a file.  

fetchcomponents_by_alarmrange  

Queries for components that have alarms to trigger over a specific time period.  

fetchcomponents_by_attendee_error  

Queries for components that had errors while sending group scheduling messages.  

fetchcomponents_by_lastmod  

Queries for components that have changed, during the specified time range.  

fetchcomponents_by_range  

Queries for components over a specific time period, with filtering attributes.  

fetchevents_by_id  

Queries for one or more events by a unique identifier (UID, Recurrence ID, modifier).  

fetchtodos_by_id  

Queries for one or more todos by a unique identifier (UID, Recurrence ID, modifier).  

get_all_timezones  

Returns all the timezones the server supports.  

get_calprops  

Returns calendar properties.  

get_freebusy  

Returns calendar freebusy time.  

get_guids  

Returns a set of random UIDs.  

get_userprefs  

Returns user preferences and some server settings.  

import  

Imports a calendar from a file to a user's calendar.  

login  

Authenticates a user and redirects to first HTML view.  

logout  

Terminates the current user's session and return to login screen.  

ping  

Administrator only: Pings the calendar server.  

search_calprops  

Searches for a calendar with the specified parameter values.  

set_calprops  

Sets calendar properties.  

set_userprefs  

Sets user preferences.  

storeevents  

Stores events that are specified in application/urlencoded manner. For storing an even by passing properties in a URL.  

storetodos  

Stores todos that are specified in the application/urlencoded manner.  

upload_file  

Uploads a file to the server.  

version  

Returns the WCAP version that the server supports.  

write_file  

Writes a file to the database.  


Session Identifiers

For many WCAP commands, you must specify the session identifier (id) that is returned by the login command. The session identifier ensures that data is accessible only to authenticated users with the required level of privilege or ownership.

When logging into the system, a user provides authentication of identity. The default authentication mechanism uses plain-text passwords and user names. iPlanet Calendar Server generates the session identifier only when authentication is successful. The identifier then serves as proof of authentication in subsequent calendaring operations.

You can customize the authentication mechanism to use a local or external authentication scheme. See Chapter 2 "CSAPI Reference", for the section csIAccessControl.



Command Formats



The plug-in architecture of iPlanet Calendar Server allows it to support multiple command formats. Both client and server can use a variety of data formats to meet various ISP needs.

The command protocol uses HTTP, and follows the standards defined by the WC3 URL specifications.

WCAP in iPlanet Calendar Server consists of JavaScript objects formatted as XML or iCalendar, communicated as HTML documents over HTTP on both the client and server side. The client supports version Internet Explorer 4.0 and above, and Netscape CommunicatorTM 4.05 and above.


Client Request Formats

Clients submit command requests to the iPlanet Calendar Server in either Universal Resource Identifier (URI) data format, or with an HTML form.

Command Format

Description

URI

Requests from client submitted using standard URI syntax.

HTML Form - urlencoded

Requests from client submitted using native JavaScript objects.

HTML Form - text/xml

Requests from client submitted using JavaScript objects formatted as XML.

HTML Form - text/calendar

Requests from client submitted using JavaScript objects formatted as iCalendar.


URI Format

Use the following format to submit a URI request:

http://webcalenderserver/COMMAND?PARAM=VAL&PARAM=VAL...

Multiple items are delimited by semicolons. If a string contains a semicolon character, replace the semicolon with its quoted-printable equivalent, %3B. For example, to represent the string "gh;i" in a list of IDs, use the following:

http://webcalendarserver/fetchcomponents_by_range.wcap?uid=abc;def;gh%3bi;jkl



Note This is a change from WCAP for iPlanet Calendar Server 2.x. Previously, the quoted-printable equivalent for a semicolon was =3B.



See also Common topics, in Chapter 7 "WCAP Commands".


HTML Form

Submit a form with method=[GET|POST] and action=command (where command is the command to execute). Parameters need to be formatted as specified in the encoding.


Client Side Event Notification

All client side JavaScript code in the parent frame of the response page is required to implement a method called CalcommandCallback(), where command is the name of the command requested. This callback will be invoked when the HTML response is completed loading.

The above commands when used with HTTP GET are simply for data retrieval.

The above commands when used with HTTP POST are for data modifications (including creation/deletion).


Server Response Formats

iPlanet Calendar Server responds to client requests by serving HTML containing JavaScript objects.You can configure a response format preference for a server, a user, or an individual request.

The client may request output in one of three different formats:

Response Format

Description

HTML with JavaScript objects - text/js

Responses are in HTML and contain JavaScript objects. This is the default output format for all WCAP commands.

HTML with JavaScript objects - text/calendar

Responses are in HTML, containing JavaScript formatted as iCalendar objects.

HTML with JavaScript objects - text/xml

Responses are in HTML, containing JavaScript formatted as XML objects


Previous     Contents     Index     Next     
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.

Last Updated January 30, 2002