给我的印象是,我可以在ConvertId请求中传递多个ID。如果我发送带有两个ID的以下请求(它们恰好是文件夹及其子消息),那么我只会得到一个ID。
肯定听起来像个虫子...
请求:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010"/>
</soap:Header>
<soap:Body>
<m:ConvertId DestinationFormat="EwsId">
<m:SourceIds>
<AlternateId Format="EntryId" Id="AAAAAF6BdU8APhVJsGWfKuqS58IBAMfPIwTHe/ZFheiJLdb/e6wAAAAAAQwAAA==" Mailbox="user@domain.demo"/>
<AlternateId Format="EntryId" Id="AAAAAF6BdU8APhVJsGWfKuqS58IHAMfPIwTHe/ZFheiJLdb/e6wAAAAAAQwAAEp86F7RqydMniCqPL+oKLEAAeNW8FMAAA==" Mailbox="user@domain.demo"/>
</m:SourceIds>
</m:ConvertId>
</soap:Body>
</soap:Envelope>
响应是
<?xml version="1.0" encoding="ISO-8859-1"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" Version="V2018_01_08" MinorBuildNumber="31" MajorBuildNumber="1228" MinorVersion="20" MajorVersion="15"/>
</s:Header>
<s:Body>
<m:ConvertIdResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseMessages>
<m:ConvertIdResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:AlternateId Mailbox="user@domain.demo" Id="AQMkAGU2ZWM5ZTQwLTk0MjMtNDY3NS1iZWI5LWQ4NTA0MDhmM2U0OQBGAAADXoF1TwA+FUmwZZ8q6pLnwgcAx88jBMd79kWF6Ikt1v97rAAAAgEMAAAASnzoXtGrJ0yeIKo8v6gosQAB41bwUwAAAA==" Format="EwsId" xsi:type="t:AlternateIdType"/>
</m:ConvertIdResponseMessage>
</m:ResponseMessages>
</m:ConvertIdResponse>
</s:Body>
</s:Envelope>
编辑: 两个id(两个消息)请求按预期工作的示例。
请求:
<?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">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010"/>
</soap:Header>
<soap:Body>
<ConvertId xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
DestinationFormat="EwsId">
<SourceIds>
<t:AlternateId Format="EntryId"
Id="AAAAAF6BdU8APhVJsGWfKuqS58IHAMfPIwTHe/ZFheiJLdb/e6wAAAAAAQwAAEp86F7RqydMniCqPL+oKLEAAiLXM0AAAA=="
Mailbox="user@domain.demo"/>
<t:AlternateId Mailbox="user@domain.demo"
Id="AAAAAF6BdU8APhVJsGWfKuqS58IHAMfPIwTHe/ZFheiJLdb/e6wAAAAAAQwAAEp86F7RqydMniCq PL+oKLEAAiC+eEMAAA=="
Format="EntryId"/>
</SourceIds>
</ConvertId>
响应:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1273" MinorBuildNumber="26" Version="V2018_01_08" xmlns:h="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><m:ConvertIdResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:ConvertIdResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:AlternateId xsi:type="t:AlternateIdType" Format="EwsId" Id="AQMkAGU2ZWM5ZTQwLTk0MjMtNDY3NS1iZWI5LWQ4NTA0MDhmM2U0OQBGAAADXoF1TwA+FUmwZZ8q6pLnwgcAx88jBMd79kWF6Ikt1v97rAAAAgEMAAAASnzoXtGrJ0yeIKo8v6gosQACItczQAAAAA==" Mailbox="user@domain.demo"/>
</m:ConvertIdResponseMessage>
<m:ConvertIdResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:AlternateId xsi:type="t:AlternateIdType" Format="EwsId" Id="AQMkAGU2ZWM5ZTQwLTk0MjMtNDY3NS1iZWI5LWQ4NTA0MDhmM2U0OQBGAAADXoF1TwA+FUmwZZ8q6pLnwgcAx88jBMd79kWF6Ikt1v97rAAAAgEMAAAASnzoXtGrJ0yeIKo8v6gosQACIL54QwAAAA==" Mailbox="user@domain.demo"/>
</m:ConvertIdResponseMessage>
</m:ResponseMessages>
</m:ConvertIdResponse>
</s:Body>
</s:Envelope>
答案 0 :(得分:0)
更正
因此,巩固我们的交流,可以将其视为迄今为止的答案。
根据我本人和Dmitry Streblechenko(OP)对这种方法的健全性测试。使用此方法时,允许使用倍数。 例如:同一时间只允许一种类型(消息)或另一种类型(文件夹)。