none
(422) Unprocessable Entity using WebDAV

    Question

  • Hello,
    I have a problem with the following SELECT statement:

    Code Block
    <?xml version="1.0" ?>
    - <D:searchrequest xmlns:D="DAV:">
      <D:sql>SELECT "DAV:displayname", "DAV:id", "DAV:href", "DAV:creationdate" FROM "https://192.168.200.99/Exchange/jan.kowalski/tasks" where CONTAINS ("DAV:displayname", ' "test" ')</D:sql>
      </D:searchrequest>

    Response error is:
    The remote server returned an error: (422) Unprocessable Entity.

    The problem is the CONTAINS predicate in sql statement. Every statement with this predicate returns this error. I tried also CONTAINs without field name.

    Does anybody know what can be a reason?
    I connect to MS Exchange 2003.

    Thanks in advance
    Best regards

    Pawel Przybyla

    Wednesday, November 14, 2007 9:24 AM

All replies

  • Unfortunately what your trying to do wont work Contains will only work firstly if you have Full Text indexing enabled and it can only be used to search those properties that get indexed there a full a list of the properties that can be searched on http://msdn2.microsoft.com/en-us/library/aa494173.aspx.

     

    If you wanted to search for ever email that had test in the subject then you could use Like eg

     

    Code Block

     

    Where ""urn:schemas:httpmail:subject"" Like '%test%'"

     

     

    Cheers

    Glen

     

    Thursday, November 15, 2007 3:49 AM
  • I have a similar problem with the following query:

     

    Code Snippet
    SELECT “DAV:displayname” FROM “Inbox”  WHERE CONTAINS(*, '"buy"')

     

     

    This request works fine on Exchange 2003, but it doesn't work on Exchange 2007.

    Response error is "(422) Unprocessable Entity".

     

    Full-text indexing is enabled. MSDN says "Use an asterisk (*) to include all properties marked for full-text indexing".

    Requests without CONTAINS predicate work fine on Exchange 2007. What can be wrong with this request?

     

    Thank you,

    Mikhail

    Tuesday, February 12, 2008 5:35 PM
  • The Search service was rewritten in 2007 to use MSSearch v3  as WebDAV and Exoledb have been demphasised on 2007 I have a feeling that they these API's where not ported for the new search service. Either that or its a bug i can't make simple searches using WebDAV or Exoledb work.

     

    cheers

    Glen

     

     

    Wednesday, February 13, 2008 3:50 AM