Sun Java System Calendar Server 6.3 WCAP Developer's Guide

Storing Attachments

The currently existing attachments argument in WCAP can be used for specifying URL (web locations of documents) as reference, these attachments will not be stored onto the server, but the reference would be returned to the client.

The actual attachments will follow as multipart mixed data for the POST. Following example shows how attachments can be stored by passing arguments to storeevents in the URI itself and the actual attachments in the data.


<>POST /storeevents.wcap?id=${SESSIONID}&calid=savri
&uid=111&dtstart=20050927T150000Z&duration=PT1H=0&sendattach=0
HTTP/1.1
Connection: Keep-Alive
Content-type: multipart/mixed; boundary=------------abcdefghij
Content-Length: 2381

-----------------------------abcdefghij
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Disposition:attachment ; filename=birthday.jpeg

MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1U
EBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIEMII
CajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEB
hMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIEMIIC
ajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBh
MCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIE
-------------------------------abcdefghij
content-type: image/GIF
content-disposition:attachment ; filename=birthday.GIF
Content-Transfer-Encoding: base64

MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1U
EBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIEMII
CajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEB
hMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIEMIIC
ajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1UEBh
MCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIEFEFF
-------------------------------abcdefghij