none
Creating exception to recurring appointment [WebDAV] RRS feed

  • Question

  • Hi there

    I'm not sure if this is the best place to ask such questions but I try. I have somehow a strange problem with WebDAV and Exchange server 2007. I try to create an exception to a recurring appointment (the start date of an instance of a recurring appointment was shifted) but it isn't displayed correctly. I read some thread on the net and some people say that my problem is not doable with WebDAV and other say that IS doable. Now I'm asking the specialists. :)

    Detailed explanation:
    I'm writing a small application in Java that should create all kind of appointments on an Exchange 2007 server and on an Exchange 2003 server. I have no problem to create 'normal' appointments. And also recurring appointments without exception I can create easily. The problem rises when I have to create an exception (for example the room changed for one single instance) to the recurring appointment. I can't manage that the exception is recognized as an instance of the recurring appointment.
    For example, the following request is send to the server in order to create the exception:

    PROPPATCH /Exchange/USERALIAS/calendar/1244708752847-4.eml HTTP/1.0
    Repl-UID: e80f0e4183b1fa478c43b44d7765418b000000692a71
    Host: MYHOST
    Content-Type: text/xml; charset="UTF-8"
    Content-Length: 1286
    Authorization: Basic d2JlaWtpcmNoZXI6bGFzaXJpMTY=
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <D:propertyupdate xmlns:D="DAV:"
     xmlns:EX="http://schemas.microsoft.com/exchange/" xmlns:HM="urn:schemas:calendar:"
     xmlns:MAPI="http://schemas.microsoft.com/mapi/" xmlns:X="xml:"
     xmlns:HN="urn:schemas:httpmail:" xmlns:dt="urn:uuid:c2f41010-65b3-11d1a29f-00aa00c14882/">
     <D:set>
      <D:prop>
       <D:contentclass>urn:content-classes:appointment
       </D:contentclass>
       <EX:outlookmessageclass>IPM.Appointment
       </EX:outlookmessageclass>
       <MAPI:apptstateflags dt:dt="int">0
       </MAPI:apptstateflags>
       <HN:subject>blabla</HN:subject>
       <HM:location>ablabla</HM:location>
       <HM:dtstart>2009-06-23T10:00:00.000Z
       </HM:dtstart>
       <HM:dtend>2009-06-23T11:00:00.000Z</HM:dtend>
       <HM:alldayevent>0</HM:alldayevent>
       <HM:busystatus>Busy</HM:busystatus>
       <HN:importance>1</HN:importance>
       <HM:reminderoffset>0</HM:reminderoffset>
       <MAPI:reminderset>0</MAPI:reminderset>
       <MAPI:sensitivity>0</MAPI:sensitivity>
       <HM:sequence>1</HM:sequence>
       <HM:instancetype dt:dt="int">3</HM:instancetype>
       <HM:recurrenceid>2009-06-23T07:00:00.000Z</HM:recurrenceid>
       <HM:method>REQUEST</HM:method>
       <HM:uid>
        CD0000008B9511D182D800C04FB1625D7047012ABF1DD64B8742267AFDF8241F
       </HM:uid>
       <HM:timezoneid>0</HM:timezoneid>
      </D:prop>
     </D:set>
    </D:propertyupdate>
    

    As you can see, I set the following properties:
    - repl-uid
    - uid
    - recurrenceid
    - instance type
    - the number at the end of the href to signal that this instance should be attached

    So what is wrong with this request? Do I forgot some property to set?


    Thursday, June 11, 2009 9:23 AM

Answers

  • bravedreamer,

     

    I have completed the investigation into your question and have some information that you may find valuable. In regards to exceptions, they are stored as attachments to the original recurring meeting. You can also create an exception by modifying some non-date/time properties, for example:

     

     

    PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-3.EML HTTP/1.1

    Content-type: text/xml

     

    <?xml version="1.0"?>

    <a:propertyupdate xmlns:a="DAV:"

                      xmlns:e="urn:schemas:mailheader:"

                      xmlns:d="urn:schemas:calendar:">

       <a:set>

          <a:prop>

             <e:subject>Longer, Later Daily test at noon</e:subject>

           </>

       </>

    </>

     

    Also, removing a recurring instance also works:

     

    DELETE /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-4.EML HTTP/1.1

     

    Date and Time Properties can also be changed as well:

     

    PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-3.EML HTTP/1.1

    Content-type: text/xml

     

    <?xml version="1.0"?>

    <a:propertyupdate xmlns:a="DAV:"

                      xmlns:e="urn:schemas:mailheader:"

                      xmlns:d="urn:schemas:calendar:"

                      xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">

       <a:set>

          <a:prop>

             <d:dtstart b:dt="dateTime.tz">2009-07-28T20:00:00.000Z</d:dtstart>

             <d:dtend b:dt="dateTime.tz">2009-07-28T21:00:00.000Z</d:dtend>

             <d:duration b:dt="int">3600</d:duration>

             <e:subject>Longer, Later Daily test at noon</e:subject>

           </>

       </>

    </>

     

    * I also noticed that one of your issues is that you are not placing the types in for many of the properties. *

     

    For example:

     

    <HM:dtstart>2009-06-23T10:00:00.000Z</HM:dtstart>

     

    Should be:

                                                      

    <d:dtstart b:dt="dateTime.tz">2009-07-28T20:00:00.000Z</d:dtstart>

     

    If you do not see the types correctly set, the call will fail as what you are experiencing.

     

    Dominic Salemno

    Senior Support Escalation Engineer

    Tuesday, August 4, 2009 8:27 PM
  • bravedreamer,

    The following is an example of creating an appointment via WebDAV:

    PROPPATCH /exchange/administrator/calendar/meeting.eml HTTP/1.1

    Content-type: text/xml

    Translate: f

    <?xml version="1.0"?>

    <a:propertyupdate

    xmlns:a="DAV:"

    xmlns:c="urn:schemas:calendar:"

    xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"

    xmlns:e="urn:schemas:httpmail:"

    xmlns:f="http://schemas.microsoft.com/exchange/"

    xmlns:j="urn:schemas:mailheader:" >

    <a:set>

    <a:prop>

    <e:textdescription>The body text</e:textdescription>

    <a:contentclass>urn:content-classes:appointment</a:contentclass>

    <f:outlookmessageclass>IPM.Appointment</f:outlookmessageclass>

    <c:busystatus>BUSY</c:busystatus>

    <c:dtstart dt:dt="dateTime.tz">2009-08-24T15:00:00.000Z</c:dtstart>

    <c:location>here</c:location>

    <j:subject>Simple meeting</j:subject>

    <c:duration dt:dt="int">1800</c:duration>

    <c:dtend dt:dt="dateTime.tz">2009-08-24T15:30:00.000Z</c:dtend>

    </>

    </>

    </>

    Dominic Salemno
    Senior Support Escalation Engineer

    Tuesday, August 25, 2009 11:44 PM
  • Sandro,

    Because of limitations that exist when you create items that are compatible with Outlook, we do not support complex calendaring when you use the WebDAV protocol. Complex calendaring applications include the following items: 

    Recurring appointments 
    Meeting functionality

    Note Meeting functionality includes sending, modifying, and canceling meetings.

    For applications that require complex calendaring functionality with Exchange 2000 Server or with Exchange Server 2003, we recommend that you use the following APIs: 

    Collaboration Data Objects for Exchange 2000 Server (CDOEX) 
    Collaboration Data Objects (CDO) 1.21 
    Outlook Object Model

    However, you could GET the master calendar item as MIME and parse it to obtain the exceptions. It will be in the vCalendar section in the lower half of the MIME. However, there is no developer support working with such content. There is also no WebDAV support for this as well.

    Subsequently, you could create a MIME version of the meeting master and write it to the calendar with a PUT.

    Documents you may find useful in this area are:

    [MS-OXCICAL]: iCalendar to Appointment Object Conversion Protocol Specification
    - http://msdn.microsoft.com/en-us/library/cc463911.aspx

    [MS-OXVCARD]: vCard to Contact Object Conversion Protocol 
    - http://msdn.microsoft.com/en-us/library/dd633489.aspx

    I hope this helps.

    Dominic Salemno
    Escalation Engineer
    US-CSS DSC Protocols Team

    Thursday, July 29, 2010 4:11 PM

All replies

  • bravedreamer,

    I am the engineer who has taken ownership of this issue. I am investigating this and will update you as things progress.

    Dominic Salemno
    Senior Support Escalation Engineer
    Thursday, June 11, 2009 3:13 PM
  • Thanks a lot.
    Thursday, June 11, 2009 3:15 PM
  • Any new information?

    Maybe you could provide me with some running code. Preferable in Java.
    Tuesday, June 16, 2009 7:08 AM
  • bravedreamer,

    I am still investigating this issue. Unfortunately, we do not support Java as it is a non-Microsoft product.
    I will keep you up-to-date as things progress.

    Dominic Salemno
    Senior Support Escalation Engineer
    Tuesday, June 16, 2009 2:46 PM
  • Theoretically there should be no difference between Java and for example C#. As far as I get the WebDAV request string. ;)
    Tuesday, June 16, 2009 3:10 PM
  • bravedreamer,

    Which publically published document underneath Open Specifications are you referencing?

    Open Specifications: http://msdn.microsoft.com/en-us/library/cc203350.aspx

    Dominic Salemno
    Senior Support Escalation Engineer


    Tuesday, June 16, 2009 3:50 PM
  • I'm not sure what do you mean.

    For working with calendar items (all sort of) I'm using the specification in document MS-XWDCAL (http://msdn.microsoft.com/en-us/library/dd299448.aspx). Unfortunately, I didn't find any information about how to create exceptions in a recurring appointment. Therefore I tried it by myself (just setting some properties, you know). The thing I observed is that the first time, the creation of an exception to a recurring appointment works. But if I try the same code a second time, it doesn't work anymore.

    That brings me to the conclusion that I'm doing a little thing wrong. Maybe I forgot just to set some property. I don't know.
    Wednesday, June 17, 2009 6:06 AM
  • bravedreamer,

    I am still investigating this issue and will provide you with more information as things progress.

    Dominic Salemno
    Senior Support Escalation Engineer
    Monday, June 22, 2009 2:02 PM
  • Okay, thanks. I'm sorry, but I didn't know that it takes that long. Unfortunately, this is a crucial part of my application and I would need it.

    I'm wondering a little that nobody asked you about this issue so far.
    Monday, June 22, 2009 2:37 PM
  • bravedreamer,

    I am still investigating this issue and should have an answer for you shortly.

    Dominic Salemno
    Senior Support Escalation Engineer

    Thursday, July 9, 2009 4:15 PM
  • bravedreamer,

     

    I have completed the investigation into your question and have some information that you may find valuable. In regards to exceptions, they are stored as attachments to the original recurring meeting. You can also create an exception by modifying some non-date/time properties, for example:

     

     

    PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-3.EML HTTP/1.1

    Content-type: text/xml

     

    <?xml version="1.0"?>

    <a:propertyupdate xmlns:a="DAV:"

                      xmlns:e="urn:schemas:mailheader:"

                      xmlns:d="urn:schemas:calendar:">

       <a:set>

          <a:prop>

             <e:subject>Longer, Later Daily test at noon</e:subject>

           </>

       </>

    </>

     

    Also, removing a recurring instance also works:

     

    DELETE /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-4.EML HTTP/1.1

     

    Date and Time Properties can also be changed as well:

     

    PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-3.EML HTTP/1.1

    Content-type: text/xml

     

    <?xml version="1.0"?>

    <a:propertyupdate xmlns:a="DAV:"

                      xmlns:e="urn:schemas:mailheader:"

                      xmlns:d="urn:schemas:calendar:"

                      xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">

       <a:set>

          <a:prop>

             <d:dtstart b:dt="dateTime.tz">2009-07-28T20:00:00.000Z</d:dtstart>

             <d:dtend b:dt="dateTime.tz">2009-07-28T21:00:00.000Z</d:dtend>

             <d:duration b:dt="int">3600</d:duration>

             <e:subject>Longer, Later Daily test at noon</e:subject>

           </>

       </>

    </>

     

    * I also noticed that one of your issues is that you are not placing the types in for many of the properties. *

     

    For example:

     

    <HM:dtstart>2009-06-23T10:00:00.000Z</HM:dtstart>

     

    Should be:

                                                      

    <d:dtstart b:dt="dateTime.tz">2009-07-28T20:00:00.000Z</d:dtstart>

     

    If you do not see the types correctly set, the call will fail as what you are experiencing.

     

    Dominic Salemno

    Senior Support Escalation Engineer

    Tuesday, August 4, 2009 8:27 PM
  • Okay. Thanks Mr. Salemno for your effort.

    Let me just summarize what you have said. Only to see if I've understood it well. ;)

    You say that in order to create an exception to a recurring appointment, I have to change only some non-date/time properties on the MASTER appointment? Is that correct?

    All that stuff of changing/deleting an exception afterwards (after having created it) is correct. This is very easy and could already do it. My problem is only the creation. I will try that (changing something in the master appointment) but sincerely, I'm not convinced that it would create an exception.


    As I have seen in your examples above, you are patching already an instance (PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-3.EML HTTP/1.1 ) of the appointment. I tried it by myself (adding the next free number to the end of resource description (in your case the "3")) but it does not work in all cases. For example if you have already some exceptions created with some other application (e.g. the web interface for Exchange) and try to add afterwards another excpetion through WebDAV, the thing with the number wouldn't work. Anyway, I will try to test it on my machine.

    For the thing with the data types you are absolutely right. I will change that too and hopefully see some positiv outcomings. :)
    Wednesday, August 5, 2009 8:04 AM
  • bravedreamer,

    I am investigating the creation of exceptions, I shall follow-up with you as things progress.

    Dominic Salemno
    Senior Support Escalation Engineer
    Wednesday, August 5, 2009 6:28 PM
  • bravedreamer,

    If you review [MS-OXOCAL] ("Appointment and Meeting Object Protocol Specification" : http://msdn.microsoft.com/en-us/library/cc425490.aspx) Section 1.3.1.1.1, you will notice what is defined by term Exception.

    From the documentation:

    An exception represents a modified instance of a recurring event. This could be as simple as extra
    data in the body, or it could be more complicated, such as a change in date/time or location. An
    exception is defined by an Exception Attachment object and an
    Exception Embedded Message
    object.


    You must modify an existing instance of a recurring event to create an exception.

    Does this information assist you?

    Dominic Salemno
    Senior Support Escalation Engineer
    Thursday, August 6, 2009 5:13 PM
  • Hi Dominic

    I didn't know about this special document. I got the definition of an exception from some posts in divers forums. But as far as I see, this definition is the same as the one in your document. We are speaking about the same. ;)

    Sorry, but unfortunately I'm not getting your point. How do I get an existing instance of a recurring event? Suppose you have a recurring appointment that recurrs every 2 week with no end date. And suppose we have no exception in this recursion. When I perform now a request to the server and try to get the appointment, the server will return me the master appointment. So, I get no information about a specific instance.

    Let me clarify again my point (maybe we didn't understood well): I have no problem to delete or modify an instance of a recurring appointment. As long as I have a valid URL or UID, I can get any instance I want. The problem for me is now the creation of such an instance because there I don't have any URL or UID. If I would program for example through the .NET framework then this would be no problem because I have already the infrastruction (all the data structures) to handle the attachments (you said already that exceptions are stored as attachments to the master appointment). Therefore, I would simply add a new attachment. But in Java, I have to handle such requests through the WebDAV protocol and I have seen that attachments to recurring appointments are simply marked through an additional number at the end of the URL. Please correct me, if that is not correct. Following example:

    If I would use the URL given in this request the server would return me the basic appointment (master appointment)
    PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}.EML HTTP/1.1
    But if I would use this URL in the request, the server would return a specific instance (if it exists):
    PROPPATCH /exchange/baracko/Calendar/{75C6CD24-6F6E-4F99-8189-EF0C086E6CDE}-3.EML HTTP/1.1

    My specific problem is now to create such a number at the end of the URL. If you have a hint for me, please let me know it.

    If I missed your point, please could you provide me with an example where you create first a recurring appointment, afterward create an exception to it and last but not least change, for example the room number the master appointment created in the first step.

    Thank you very much.



    Friday, August 7, 2009 1:04 PM
  • bravedreamer,

    I am still investigating this issue and will update you as things progress.

    Dominic Salemno
    Senior Support Escalation Engineer
    Monday, August 17, 2009 1:56 PM
  • bravedreamer,

    I am still investigating this matter.

    Dominic Salemno
    Senior Support Escalation Engineer
    Friday, August 21, 2009 3:21 PM
  • Okay, fine. I hope not to bother you too much. ;)

    If you have any question or if you need a more detailed example/explanation, feel free to contact me.

    Thanks very much for your assist.
    Friday, August 21, 2009 6:03 PM
  • bravedreamer,

    The following is an example of creating an appointment via WebDAV:

    PROPPATCH /exchange/administrator/calendar/meeting.eml HTTP/1.1

    Content-type: text/xml

    Translate: f

    <?xml version="1.0"?>

    <a:propertyupdate

    xmlns:a="DAV:"

    xmlns:c="urn:schemas:calendar:"

    xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"

    xmlns:e="urn:schemas:httpmail:"

    xmlns:f="http://schemas.microsoft.com/exchange/"

    xmlns:j="urn:schemas:mailheader:" >

    <a:set>

    <a:prop>

    <e:textdescription>The body text</e:textdescription>

    <a:contentclass>urn:content-classes:appointment</a:contentclass>

    <f:outlookmessageclass>IPM.Appointment</f:outlookmessageclass>

    <c:busystatus>BUSY</c:busystatus>

    <c:dtstart dt:dt="dateTime.tz">2009-08-24T15:00:00.000Z</c:dtstart>

    <c:location>here</c:location>

    <j:subject>Simple meeting</j:subject>

    <c:duration dt:dt="int">1800</c:duration>

    <c:dtend dt:dt="dateTime.tz">2009-08-24T15:30:00.000Z</c:dtend>

    </>

    </>

    </>

    Dominic Salemno
    Senior Support Escalation Engineer

    Tuesday, August 25, 2009 11:44 PM
  • As a matter of fact this is not the anser to the questions asked. bravedreamer asked

    "could you provide me with an example where you create first a recurring appointment, afterward create an exception to it and last but not least change"

    and I would be very interested in something like this, too. So could you please give such an example?

    Tuesday, July 6, 2010 1:18 PM
  • Hi Sandro Rudin:

    I have alerted Protocol documentation team about your inquiry and a member of the team will be in touch soon.


    Regards, Obaid Farooqi
    Tuesday, July 6, 2010 4:39 PM
    Owner
  • Sandro,

    Apparently my last post didn't stick. I am the engineer who has taken ownership of your issue and am currently investigating this.

    Dominic Salemno
    Senior Support Escalation Engineer
    US-CSS DSC Protocols Team

    Thursday, July 15, 2010 4:48 PM
  • Sandro,

    I have nothing new to report at this time. I will update you as things progress.

    Dominic Salemno
    Senior Support Escalation Engineer
    US-CSS DSC Protocols Team

    Thursday, July 15, 2010 4:49 PM
  • The server should expand instances, as per http://msdn.microsoft.com/en-us/library/ee237608(v=EXCHG.80).aspx. So the easiest way for you to find the particular instance you are looking for is to do a SEARCH request on the calendar with the date range you're looking for. That should give you the proper URL. Then you modify it as you need.

    Monday, July 26, 2010 9:17 PM
  • Thank you Jason.

    Has your question been answered Sandro?

    Dominic Salemno
    Escalation Engineer
    US-CSS DSC Protocols Team

    Wednesday, July 28, 2010 4:33 PM
  • Actually - no. My question (in fact bravedreamers question) was:

    "could you provide me with an example where you create first a recurring appointment, afterward create an exception to it and last but not least change"

    I can see no such example so obviously my question has not been answered.

    The thing is that I know a lot about exchange, webdav and ews and also its documentation (if you can call it a documentation - most of the information is posted in blogs and forums from people who had to spend hours to figure it out). But the problems with these things are always somewhere down in a detail; one flag that is missing, one string that is falsly formatted etc. and because of that a fully featured example would be helpful.

    But as these actions are not 'officialy' supported it might no be possible to give an 'official' example? Anyway, thank you for your time. I am able to do all the things mentioned above, but I had to make so many workarounds and hacks and it cost me so much time to get there that it would be interesting to see such a sample - and others might benefit a lot from it...

    Thursday, July 29, 2010 8:03 AM
  • Sandro,

    We are working on an example for you.

    Dominic Salemno
    Escalation Engineer
    US-CSS DSC Protocols Team

    Thursday, July 29, 2010 2:10 PM
  • Sandro,

    Because of limitations that exist when you create items that are compatible with Outlook, we do not support complex calendaring when you use the WebDAV protocol. Complex calendaring applications include the following items: 

    Recurring appointments 
    Meeting functionality

    Note Meeting functionality includes sending, modifying, and canceling meetings.

    For applications that require complex calendaring functionality with Exchange 2000 Server or with Exchange Server 2003, we recommend that you use the following APIs: 

    Collaboration Data Objects for Exchange 2000 Server (CDOEX) 
    Collaboration Data Objects (CDO) 1.21 
    Outlook Object Model

    However, you could GET the master calendar item as MIME and parse it to obtain the exceptions. It will be in the vCalendar section in the lower half of the MIME. However, there is no developer support working with such content. There is also no WebDAV support for this as well.

    Subsequently, you could create a MIME version of the meeting master and write it to the calendar with a PUT.

    Documents you may find useful in this area are:

    [MS-OXCICAL]: iCalendar to Appointment Object Conversion Protocol Specification
    - http://msdn.microsoft.com/en-us/library/cc463911.aspx

    [MS-OXVCARD]: vCard to Contact Object Conversion Protocol 
    - http://msdn.microsoft.com/en-us/library/dd633489.aspx

    I hope this helps.

    Dominic Salemno
    Escalation Engineer
    US-CSS DSC Protocols Team

    Thursday, July 29, 2010 4:11 PM