Maintaining an accurate copy (or snapshot) of the folder hierarchy contained within an Exchange mailbox is the realm of the aptly named SyncFolderHierarchy Web method. Example 16-1 shows the basic structure of a SyncFolderHierarchy request.
Example 16-1. Basic structure of a SyncFolderHierarchy request
<SyncFolderHierarchy xmlns=".../messages"> <FolderShape/> <SyncState/> </SyncFolderHierarchy>
As shown in Example 16-1, SyncFolderHierarchy is a relatively simple operation consisting of two child elements, FolderShape and SyncState.
The required FolderShape element is an instance of FolderResponseShapeType, which you became familiar with in Chapter 3. Syncing the folder hierarchy is a data retrieval operation, ...