Ескертпе
Бұл бетке кіру үшін қатынас шегін айқындау қажет. Жүйеге кіруді немесе каталогтарды өзгертуді байқап көруге болады.
Бұл бетке кіру үшін қатынас шегін айқындау қажет. Каталогтарды өзгертуді байқап көруге болады.
Найдите сведения об операции EWS CreateFolderPath .
Операция CreateFolderPath создает иерархию папок.
Эта операция появилась в Exchange Server 2013.
Использование операции CreateFolderPath
Запрос операции CreateFolderPath принимает массив папок и идентификатор родительской папки и создает иерархию папок на основе порядка папок в массиве.
Заголовки SOAP операции CreateFolderPath
Операция CreateFolderPath может использовать заголовки SOAP, перечисленные в следующей таблице.
| Имя заголовка | Элемент | Описание |
|---|---|---|
| Олицетворения |
ExchangeImpersonation |
Определяет пользователя, которого олицетворяет клиентское приложение. Этот заголовок применим к запросу. |
| MailboxCulture |
MailboxCulture |
Определяет язык и региональные параметры, определенные в RFC 3066 "Теги для идентификации языков", которые будут использоваться для доступа к почтовому ящику. Этот заголовок применим к запросу. |
| RequestVersion |
RequestServerVersion |
Определяет версию схемы для запроса операции. Этот заголовок применим к запросу. |
| ServerVersion |
ServerVersionInfo |
Определяет версию сервера, который ответил на запрос. Этот заголовок применим к ответу. |
| TimeZoneContext |
TimeZoneContext |
Определяет область часового пояса для свойств DateTime . Этот заголовок применим к запросу. |
Пример запроса операции CreateFolderPath: создание иерархии папок
В следующем примере запроса операции CreateFolderPath показано, как создать иерархию папок, которая состоит из трех папок глубоко в папке "Входящие" по умолчанию.
Примечание.
Все идентификаторы элементов и ключи изменения в этой статье сокращены для сохранения удобочитаемости.
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
<t:MailboxCulture>en-US</t:MailboxCulture>
<t:TimeZoneContext>
<t:TimeZoneDefinition Id="GMT Standard Time"/>
</t:TimeZoneContext>
</soap:Header>
<soap:Body >
<m:CreateFolderPath>
<m:ParentFolderId>
<t:DistinguishedFolderId Id="inbox"/>
</m:ParentFolderId>
<m:RelativeFolderPath>
<t:Folder>
<t:DisplayName>MyFirstLevelFolder</t:DisplayName>
</t:Folder>
<t:Folder>
<t:DisplayName>MySecondLevelFolder</t:DisplayName>
</t:Folder>
<t:Folder>
<t:DisplayName>MyThirdLevelFolder</t:DisplayName>
</t:Folder>
</m:RelativeFolderPath>
</m:CreateFolderPath>
</soap:Body>
</soap:Envelope>
Текст SOAP запроса содержит следующие элементы:
Успешный ответ операции CreateFolderPath
В следующем примере показан успешный ответ на запрос операции CreateFolderPath для создания иерархии папок, расположенных глубоко в папке "Входящие" по умолчанию.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="526"
MinorBuildNumber="0"
Version="Exchange2013"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:CreateFolderPathResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateFolderPathResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder>
<t:FolderId Id="AAMkADEzOTExYisXAAA=" ChangeKey="AQAAABYAABq6Wxb"/>
<t:DisplayName>MyFirstLevelFolder</t:DisplayName>
<t:TotalCount>0</t:TotalCount>
<t:ChildFolderCount>0</t:ChildFolderCount>
<t:UnreadCount>0</t:UnreadCount>
</t:Folder>
</m:Folders>
</m:CreateFolderPathResponseMessage>
<m:CreateFolderPathResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder>
<t:FolderId Id="AAMkADEzOTExm4QrAABqxisYAAA=" ChangeKey="AQAAABYAAAm4QrAABq6Wxg"/>
<t:DisplayName>MySecondLevelFolder</t:DisplayName>
<t:TotalCount>0</t:TotalCount>
<t:ChildFolderCount>0</t:ChildFolderCount>
<t:UnreadCount>0</t:UnreadCount>
</t:Folder>
</m:Folders>
</m:CreateFolderPathResponseMessage>
<m:CreateFolderPathResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Folders>
<t:Folder>
<t:FolderId Id="AAMkADEzOTAABqxisZAAA=" ChangeKey="AQAAABYAA6Wxl"/>
<t:DisplayName>MyThirdLevelFolder</t:DisplayName>
<t:TotalCount>0</t:TotalCount>
<t:ChildFolderCount>0</t:ChildFolderCount>
<t:UnreadCount>0</t:UnreadCount>
</t:Folder>
</m:Folders>
</m:CreateFolderPathResponseMessage>
</m:ResponseMessages>
</m:CreateFolderPathResponse>
</s:Body>
</s:Envelope>
Текст SOAP ответа содержит следующие элементы:
Ответ на ошибку операции CreateFolderPath
В следующем примере показан ответ на ошибку на запрос операции CreateFolderPath . Это ответ на запрос на создание двух папок, первая из которых не имеет свойства отображаемого имени. Первая папка в иерархии не может быть создана без свойства отображаемого имени, а вторая папка не может быть создана, так как родительская папка в иерархии не была создана.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="0"
MajorBuildNumber="556"
MinorBuildNumber="14"
Version="Exchange2013"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:CreateFolderPathResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateFolderPathResponseMessage ResponseClass="Error">
<m:MessageText>The folder save operation failed due to invalid property values.</m:MessageText>
<m:ResponseCode>ErrorFolderSavePropertyError</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:MessageXml>
<t:FieldURI FieldURI="folder:DisplayName"/>
</m:MessageXml>
<m:Folders/>
</m:CreateFolderPathResponseMessage>
<m:CreateFolderPathResponseMessage ResponseClass="Error">
<m:MessageText>The specified parent folder could not be found.</m:MessageText>
<m:ResponseCode>ErrorParentFolderNotFound</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Folders/>
</m:CreateFolderPathResponseMessage>
</m:ResponseMessages>
</m:CreateFolderPathResponse>
</s:Body>
</s:Envelope>
Текст soap ответа на ошибку содержит следующие элементы:
Дополнительные коды ошибок, которые являются общими для EWS и относятся к этой операции, см. в разделе ResponseCode.