在我的应用程序中,我需要查询Echange Web服务服务器,并找到所有未读的邮件.我使用的是Golang,我发送的是SOAPXML请求.我try 了以下几种方法:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013_SP1" />
</soap:Header>
<soap:Body>
<m:FindItem
Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
</m:ItemShape>
<m:Restriction>
<t:IsEqualTo>
<t:FieldURI FieldURI="item:IsRead" />
<t:FieldURIOrConstant>
<t:Constant Value="false" />
</t:FieldURIOrConstant>
</t:IsEqualTo>
</m:Restriction>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="inbox" />
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>
但在这种情况下,我收到错误消息,说我的请求不正确.如果我删除<t:IsEqualTo>
封邮件,我的收件箱中将收到所有邮件.任何如何修复它的 idea 都将是受欢迎的.谢谢