Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Command Formats

Plug-in architecture allows Calendar Server to support multiple command formats. Depending on your needs, you can use a variety of data formats for both clients and server.

WCAP uses HTTP, and follows the standards defined by the WC3 URL specifications.

WCAP in Calendar Server consists calendar data formatted as XML or iCalendar, communicated as HTML documents over HTTP on both the client and server side. Refer to the Calendar Server Release Notes for recommended browser versions for client interfaces.


Note –

The number of characters that can be passed in for each parameter is limited to 1024 characters.


Client Request Formats

Clients submit command requests to the Calendar Server in either Universal Resource Identifier (URI) data format, or with one of three HTML forms.

Command Format  

Description  

URI 

Requests from client submitted using standard URI syntax. 

HTML Form - urlencoded

Requests from client submitted as encoded URL's. 

HTML Form - text/xml

Requests from client submitted using objects formatted as XML. 

HTML Form - text/calendar

Requests from client submitted using objects formatted as iCalendar. 

URI Format

Use the following format to submit a URI request:

http://webcalendarserver/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 ID's, use the following:


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

See also Chapter 6, WCAP Common Topics

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.


Note –

The maximum length for WCAP parameters is 1024 characters.


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 is invoked when the HTML response has completed loading.

When used with HTTP GET, commands are for data retrieval.

When used with HTTP POST, commands are for data modifications, including creation or deletion.

Server Response Formats

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