From adf3bfaaf44311bbfb8f03327b948312295a2d8a Mon Sep 17 00:00:00 2001 From: mguessan Date: Mon, 29 Mar 2010 10:45:10 +0000 Subject: [PATCH] Caldav: fix broken inbox, missing instancetype in search request and add is null in search query git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@976 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 27f13ea5..4ab73d45 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -2491,10 +2491,11 @@ public class ExchangeSession { public List getEventMessages(String folderPath) throws IOException { List result; try { - String searchQuery = "Select \"DAV:getetag\", \"http://schemas.microsoft.com/exchange/permanenturl\"" + + String scheduleStatePropertyName = scheduleStateProperty.getNamespace().getURI() + scheduleStateProperty.getName(); + String searchQuery = "Select \"DAV:getetag\", \"http://schemas.microsoft.com/exchange/permanenturl\", \"urn:schemas:calendar:instancetype\"" + " FROM Scope('SHALLOW TRAVERSAL OF \"" + folderPath + "\"')\n" + " WHERE \"DAV:contentclass\" = 'urn:content-classes:calendarmessage'\n" + - " AND (NOT \"" + scheduleStateProperty.getNamespace().getURI() + scheduleStateProperty.getName() + "\" = 'CALDAV:schedule-processed')\n" + + " AND (\""+scheduleStatePropertyName+"\" IS NULL OR NOT \"" + scheduleStatePropertyName + "\" = 'CALDAV:schedule-processed')\n" + " ORDER BY \"urn:schemas:calendar:dtstart\" DESC\n"; result = getEvents(folderPath, searchQuery); } catch (HttpException e) {