W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > January to March 2002

RE: Searching folders with WebDAV

From: Julian Reschke <julian.reschke@gmx.de>
Date: Mon, 21 Jan 2002 22:49:46 +0100
To: "WebDAV" <w3c-dist-auth@w3.org>
Message-ID: <JIEGINCHMLABHJBIGKBCAEJDDNAA.julian.reschke@gmx.de>
> From: Lisa Horton [mailto:lhorton@agtrax.com]
> Sent: Monday, January 21, 2002 8:37 AM
> To: w3c-dist-auth@w3.org
> Subject: [Moderator Action] Searching folders with WebDAV
>
>
> I hope someone can help me with 2 problems I am having with WebDAV.  I am
> developing a web page that shows public folder data from our
> Exchange Server
> such as calendar data and contact data.  We access our Exchange Server
> through our web server using URLs.  I have had much success using WebDAV,
> but have hit a "brick wall" on 2 items which are listed below with code.
>
> 1)  I am trying to perform a SEARCH on a public folder using
> SQL/XML/WebDAV
> and I am receiving no response.
>
> CODE:
>  dim objXML, strR, strURL, docXML, sReq
>     Set objXML = CreateObject("Microsoft.XMLHTTP")
>     strURL = "http://mail.agtrax.com/public/AgTrax/web%20Calendar/"
>     objXML.open "SEARCH", strURL, False, webExchgUserName,
> webExchgPassword
>
>     sReq="<?xml version='1.0'?>"
>     sReq= sReq & "<a:searchrequest xmlns:a = 'DAV:' >"
>     sReq= sReq & "<a:sql>Select 'urn:schemas:calendar:dtstart', "
>     sReq= sReq & "'urn:schemas:calendar:location', "
>     sReq= sReq & "'urn:schemas:calendar:dtend', "
>     sReq= sReq & "'urn:schemas:calendar:alldayevent'"
>     sReq= sReq & " FROM Scope('SHALLOW TRAVERSAL OF '" & strURL & "'')"
>     sReq= sReq & " WHERE NOT 'urn:schemas:calendar:instancetype' = 1"
>     sReq= sReq & " AND 'DAV:contentclass' =
> 'urn:content-classes:appointment'"
>     sReq= sReq & " AND 'urn:schemas:calendar:dtend' &gt;
> '2002-02-01T01:00:00.000Z'"
>     sReq= sReq & " AND 'urn:schemas:calendar:dtstart' &lt;
> '2002-02-28T01:00:00.000Z'"
>     sReq= sReq & " ORDER BY 'urn:schemas:calendar:dtstart' DESC"
>     sReq= sReq & "</a:sql>"
>     sReq= sReq & "</a:searchrequest>"
>     objXML.setrequestheader "Translate", "f"
>     objXML.setRequestHeader "Content-type:", "text/xml"
>     objXML.setRequestHeader "Host:", "mail.agtrax.com"
>     objXML.setRequestHeader "Depth", "1"
>
>     objXML.Send (sReq)
>     Set docXML = objXML.responseXML
>
>     Dim objNodeAppt, i
>     dim objNode
>     Set objNodeAppt = docXML.getElementsByTagName("*")
>     For i = 0 TO (objNodeAppt.length -1)
>       Set objNode = objNodeAppt.nextNode
>         Response.Write("<b>" & objNode.NamespaceURI & " " &
> objNode.NodeName
> & "</b> - ")
>       Response.Write(objNode.text  & "<hr>")
>     Next

What is the response code you're getting. And what exactly do you get as
reply?

(BTW: the "SQL" search grammar is something proprietay to Microsoft).

> 2) I am trying to create a contact folder (in Exchange)using
> MKCOL and I am
> receiving the Status Code 403 (Forbidden).  Is this just an issue with
> permissions or am I using the wrong method to create a folder?
> The code is
> below:

You can't use MKCOL with a request body. Try again without.
Received on Monday, 21 January 2002 16:50:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:43:59 GMT