4.2 Synchronizing Recurring Appointments with Exceptions

The following example demonstrates a client request to synchronize calendar data with the server, and the server response. In this example, the server response contains a weekly recurring appointment with a single exception.

Request:

 <?xml version="1.0" encoding="utf-8"?>
 <Sync xmlns:calendar="Calendar:" xmlns:airsyncbase="AirSyncBase:" xmlns="AirSync:">
   <Collections>
     <Collection>
       <SyncKey>1958804782</SyncKey>
       <CollectionId>1</CollectionId>
       <DeletesAsMoves>1</DeletesAsMoves>
       <GetChanges>1</GetChanges>
       <WindowSize>512</WindowSize>
     </Collection>
   </Collections>
 </Sync>

Response:

 <?xml version="1.0" encoding="utf-8"?>
 <Sync xmlns:calendar="Calendar:" xmlns:airsyncbase="AirSyncBase:" xmlns="AirSync:">
   <Collections>
     <Collection>
       <SyncKey>573512161</SyncKey>
       <CollectionId>1</CollectionId>
       <Status>1</Status>
       <Commands>
         <Add>
           <ServerId>1:1</ServerId>
           <ApplicationData>
             <calendar:Timezone>4AEAACgARwBNAFQALQAwADgAOgAwADAAKQAgAFAAYQBjAGkAZgBpAGMAIABUAGkA
 bQBlACAAKABVAFMAIAAmACAAQwAAAAsAAAABAAIAAAAAAAAAAAAAACgARwBNAFQALQAwADgAOgAwA
 DAAKQAgAFAAYQBjAGkAZgBpAGMAIABUAGkAbQBlACAAKABVAFMAIAAmACAAQwAAAAMAAAACAAIAAA
 AAAAAAxP///w==</calendar:Timezone>
             <calendar:DtStamp>20090415T165811Z</calendar:DtStamp>
             <calendar:StartTime>20090417T170000Z</calendar:StartTime>
             <calendar:Subject>Recurring appointment test</calendar:Subject>
             <calendar:UID>040000008200E00074C5B7101A82E00800000000B0CD1F52EBBDC9010000000000000
 00010000000B05E442FCB2CA443BF3D99B51A729FE6</calendar:UID>
             <calendar:OrganizerName>Anat Kerry</calendar:OrganizerName>
             <calendar:OrganizerEmail>anat@contoso.com </calendar:OrganizerEmail>
             <calendar:Location>My office</calendar:Location>
             <calendar:EndTime>20090417T180000Z</calendar:EndTime>
             <calendar:Recurrence>
               <calendar:Type>1</calendar:Type>
               <calendar:Interval>1</calendar:Interval>
               <calendar:Occurrences>3</calendar:Occurrences>
               <calendar:DayOfWeek>32</calendar:DayOfWeek>
             </calendar:Recurrence>
             <airsyncbase:Body>
               <airsyncbase:Type>3</airsyncbase:Type>
               <airsyncbase:EstimatedDataSize>238</airsyncbase:EstimatedDataSize>
               <airsyncbase:Truncated>1</airsyncbase:Truncated>
             </airsyncbase:Body>
             <calendar:Sensitivity>0</calendar:Sensitivity>
             <calendar:BusyStatus>2</calendar:BusyStatus>
             <calendar:AllDayEvent>0</calendar:AllDayEvent>
             <calendar:Reminder>15</calendar:Reminder>
             <calendar:Exceptions>
               <calendar:Exception>
                 <calendar:Deleted>1</calendar:Deleted>
                 <calendar:ExceptionStartTime>20090424T170000Z</calendar:ExceptionStartTime>
               </calendar:Exception>
             </calendar:Exceptions>
             <calendar:MeetingStatus>0</calendar:MeetingStatus>
             <airsyncbase:NativeBodyType>3</airsyncbase:NativeBodyType>
             <calendar:ResponseRequested>1</calendar:ResponseRequested>
             <calendar:ResponseType>1</calendar:ResponseType>
           </ApplicationData>
         </Add>
       </Commands>
     </Collection>
   </Collections>
 </Sync>