WebDAV Query to Exchange 2003, can't see IMAP attributes RRS feed

  • Question

  • Hello,

    So I'm trying to query our Exchange 2003 server using WebDAV - we're replacing an app that used Outlook automation to export Worldwide Address Book. It now needs to be run on a server without Outlook. So I'm running the following WebDAV query:

    <?xml version=""1.0""?>
        <g:searchrequest xmlns:g=""DAV:"">
                SELECT * 
                    Scope('shallow  TRAVERSAL OF """"')
                    ""urn:schemas:contacts:givenName"" LIKE 'Brad%'

    It finds the contact, but doesn't pull in things like "E-Mail Display As". I've tried selecting the field "Email1DisplayName" explicitly in the select clause to no avail. Also have found a spreadsheet listing the Contact Schema - Email Display As lists{00062004-0000-0000-C000-000000000046}/8080001f (as opposed to something like urn:schemas:contacts:customerid) but if I try selecting that I get a bad request (which sounds like it doesn't like that in the SQL query). I'm fairly new to WebDAV to Exchange, can anyone shed some light on why this field (and others) are missing when I select *?

    Many Thanks,

    P.S. below is how I'm making the call if that helps:

     HttpWebRequest request = HttpWebRequest.Create(uri) as HttpWebRequest;
                request.Credentials = credentials;
                request.Method = "SEARCH";
                request.ContentLength = contents.Length;
                request.ContentType = "text/xml";
                using (Stream requestStream = request.GetRequestStream())
                    requestStream.Write(contents, 0, contents.Length);
                using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
                using (Stream responseStream = response.GetResponseStream())
                    XmlDocument document = new XmlDocument();



    Tuesday, October 4, 2011 4:32 PM


All replies