I tried to search emails depending on "received" or "sent" date.
This is my request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<MailboxCulture xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types">de-AT</MailboxCulture>
<RequestServerVersion xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2013" />
</soap:Header>
<soap:Body>
<ns2:FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" Traversal="Shallow">
<ns2:ItemShape>
<BaseShape>IdOnly</BaseShape>
</ns2:ItemShape>
<ns2:Restriction>
<And>
<IsEqualTo>
<Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:ItemClass" />
<FieldURIOrConstant>
<Constant Value="IPM.NOTE" />
</FieldURIOrConstant>
</IsEqualTo>
<IsGreaterThanOrEqualTo>
<Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:DateTimeReceived" />
<FieldURIOrConstant>
<Constant Value="2013-03-13T09:00:00Z" />
</FieldURIOrConstant>
</IsGreaterThanOrEqualTo>
<IsLessThanOrEqualTo>
<Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:DateTimeReceived" />
<FieldURIOrConstant>
<Constant Value="2013-12-13T09:00:00Z" />
</FieldURIOrConstant>
</IsLessThanOrEqualTo>
</And>
</ns2:Restriction>
<ns2:ParentFolderIds>
<DistinguishedFolderId Id="inbox" />
</ns2:ParentFolderIds>
</ns2:FindItem>
</soap:Body>
</soap:Envelope>
But I just get back following error:
WARNING: Interceptor for {http://schemas.microsoft.com/exchange/services/2006/messages}ExchangeService#{http://schemas.microsoft.com/exchange/services/2006/messages}FindItem has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. .. Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '503: Service Unavailable' when communicating with https://mail.rbes.local/ews/exchange.asmx
If I omit the restriction I get a valid response.
Anyone can help me?
Other request same error:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<MailboxCulture xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types">de-AT</MailboxCulture>
<RequestServerVersion xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2013" />
</soap:Header>
<soap:Body>
<ns2:FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" Traversal="Shallow">
<ns2:ItemShape>
<BaseShape>IdOnly</BaseShape>
</ns2:ItemShape>
<ns2:Restriction>
<IsLessThanOrEqualTo>
<Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:DateTimeReceived" />
<FieldURIOrConstant>
<Constant Value="2013-12-13T09:00:00Z" />
</FieldURIOrConstant>
</IsLessThanOrEqualTo>
</ns2:Restriction>
<ns2:ParentFolderIds>
<DistinguishedFolderId Id="inbox" />
</ns2:ParentFolderIds>
</ns2:FindItem>
</soap:Body>
</soap:Envelope>