WebDav

Information about WebDav, in particular with MS Exchange. All information dumped here is based on my experiance from creating an events calendar in Java, storing the appointment details in MS Exchange. I could also then view the same appointments using Outlook 2003.

PropPatch
Adding a new appointment Editing an existing appointment

PropFind
A depth of 0 returns custom fields.

Search
Used to find appointments over a date range.

Example Search XML
Search for all appointments from 2005-10-23 to 2005-10-31 (a week).    Select " http://schemas.microsoft.com/exchange/permanenturl ", "urn:schemas:calendar:organizer", "urn:schemas:calendar:dtstart", "urn:schemas:calendar:dtend", "urn:schemas:calendar:location", "urn:schemas:calendar:alldayevent", "urn:schemas:calendar:busystatus", "urn:schemas:calendar:meetingstatus", "urn:schemas:httpmail:displayto", "urn:schemas:httpmail:displaycc", "urn:schemas:httpmail:to", "urn:schemas:httpmail:cc", "urn:schemas:httpmail:bcc", "urn:schemas:httpmail:fromname", "urn:schemas:httpmail:fromemail", "urn:schemas:httpmail:textdescription", "urn:schemas:httpmail:htmldescription", "urn:schemas:httpmail:subject", "customField1", "customField2", FROM Scope ('SHALLOW TRAVERSAL OF " http://www.example.com/exchange/user/calendar "') WHERE NOT "urn:schemas:calendar:instancetype" = 1 AND "DAV:contentclass" = 'urn:content-classes:appointment' AND "urn:schemas:calendar:dtstart" &gt;= '2005-10-23 23:00:00' AND "urn:schemas:calendar:dtstart" &lt;= '2005-10-31 00:00:00' ORDER BY "urn:schemas:calendar:dtstart" ASC  

Search Range against exchange
I have discovered that the maximum search range for against exchange is 2 year and 2 days.

searches outside this range in a response 422

X-MS-ENUMATTS
Exchange header to get a list of attachments for a given URL.

This command can only be performed on resources which ends in ".eml". You cannot use the resources permanent URL.

http://www.example.com/exchange/user/-FlatUrlSpace-/d5d89575f5111749a48f3aa88806bb0b-17d5/d5d89575f5111749a48f3aa88806bb0b-58fd

and

http://www.example.com/exchange/user/Calendar/1130341426748.eml

may both point to the same resource but only the ".eml" resource will respond correctly to X-MS-ENUMATTS

Put
A normal http header. Used to add attachments to an appointment. Attachments can only be added to: http://schemas.microsoft.com/exchange/ outlookmessageclass IPM.Note DAV: contentclass urn:content-classes:message

The put should be to the URL + "/" + filename

Remember to change the properties back to an appointment. http://schemas.microsoft.com/exchange/ outlookmessageclass IPM.Appointment DAV: contentclass urn:content-classes:appointment

Get
A normal http header. Used to get attachments.
 * Success: 200

Copy
Provide source id and dest id. Will perform a deep copy.


 * Sucess: 201
 * Failure: 412

Delete
Delete a resource


 * Success: 200, 204

Response Codes

 * 201 - Created: A new resource was successfully created.
 * 207 - Multi status
 * 400 - Malformed request, normally means the XML is wrong.
 * 412 - Destination resource already exists

Read fields

 * urn:schemas:calendar:organizer
 * urn:schemas:calendar:dtstart
 * urn:schemas:calendar:dtend
 * urn:schemas:calendar:location
 * urn:schemas:calendar:alldayevent
 * urn:schemas:calendar:busystatus
 * urn:schemas:calendar:meetingstatus
 * urn:schemas:httpmail:displayto
 * urn:schemas:httpmail:displaycc
 * urn:schemas:httpmail:to
 * urn:schemas:httpmail:cc
 * urn:schemas:httpmail:bcc
 * urn:schemas:httpmail:fromname
 * urn:schemas:httpmail:fromemail
 * urn:schemas:httpmail:textdescription
 * urn:schemas:httpmail:htmldescription
 * urn:schemas:httpmail:subject

Write Fields

 * dt urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/
 * dateTime.tz = yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
 * d urn:schemas:calendar:
 * location
 * alldayevent dt:dt="boolean"
 * dtstart dt:dt="dateTime.tz"
 * dtend dt:dt="dateTime.tz"
 * instancetype dt:dt="int" 0
 * busystatus BUSY
 * meetingstatus CONFIRMED
 * responserequested dt:dt="boolean" 0
 * transparent OPAQUE
 * e urn:schemas:httpmail:
 * subject
 * htmldescription
 * a DAV:
 * contentclass urn:content-classes:appointment
 * ishidden dt:dt="boolean" 0
 * isreadonly dt:dt="boolean" 0
 * f http://schemas.microsoft.com/exchange/
 * outlookmessageclass IPM.Appointment
 * i urn:schemas:mailheader
 * to

If alldayevent = 1, then dtstart must start at midnight and dtend must be 24hours later.