WebDav SEARCH question

From: doug (ddalton_at_shortbus.net)
Date: 02/28/05


Date: 28 Feb 2005 00:41:29 -0800

I have a HTTP_Request webdav query against exchange that just isnt
working I have tried everything, the webdav query is correctly
formatted, my header or something must be incorrect, I have used the
same query with the tool
http://www.infinitec.de/software/exchangeutils/excmd.aspx

and it works but with my code below it does not? The headers appear to
be identical, and my code below works with a PROPFIND Query fine, but
a SEARCH query consistently comes back with a result code of 400.

The PHP Code to generate my query is:

include "HTTP/Request.php";
$query='<?xml version="1.0"?>
<D:searchrequest xmlns:D="DAV:">
 <D:sql>
  SELECT "DAV:displayname", "DAV:contentclass"
  FROM "https://webmail.test.com/exchange/"
  WHERE "DAV:isfolder" = true
 </D:sql>
</D:searchrequest>
';

   $username='test';
$password='test';

$req = &new HTTP_Request("https://webmail.test.com/exchange/");

$req->setMethod('SEARCH');

$req->setBasicAuth($username, @$password);

$req->addHeader('User-Agent', 'Exchange Admin');
$req->addHeader("Content-Type", "text/xml");
$req->addHeader('depth','0');
$req->addHeader('translate','f');
$req->addHeader('Connection','Keep-Alive');

$req->addRawPostData($query);
$req->sendRequest();
echo $req->getResponseHeader();
echo $req->getResponseBody();



Relevant Pages

  • RE: Weird Problem with a Subreport
    ... UNION ALL SELECT 1 As ListID, UNIT, Remarks, Place_Holder FROM ... I tried to add Place Holder to the Union query along with UNIT, ... Ok for the sorting i will try to explain it to you. ... Do you have a text box in the Goup Header? ...
    (microsoft.public.access.reports)
  • RE: Weird Problem with a Subreport
    ... SELECT 0 AS ListID, UNIT, Remarks, Place_Holder FROM AugustND; ... I tried to add Place Holder to the Union query along with UNIT, ... Ok for the sorting i will try to explain it to you. ... Do you have a text box in the Goup Header? ...
    (microsoft.public.access.reports)
  • Re: Remove repeat section headers
    ... I'll stick with my assessment that a union query might resolve your issue. ... 'Type' field names and data types, and desired display in your report. ... but I need to have a header for each and mess with the ...
    (microsoft.public.access.reports)
  • RE: Weird Problem with a Subreport
    ... Ok for the sorting i will try to explain it to you. ... query from are being sorted by the place holder field. ... Do you have a text box in the Goup Header? ... I have a header of shutdown in front of the whole list but the two lists ...
    (microsoft.public.access.reports)
  • creating a multi part query to be able to export complete data
    ... placed together in a query to be able to then export the data into an excel ... H - a single letter to indicate the header file, ... I realize that sql plus is not the same ...
    (microsoft.public.access.queries)