WebDav SEARCH question
From: doug (ddalton_at_shortbus.net)
Date: 02/28/05
- Next message: ribchr00_at_stud.unibas.ch: "Replacing "/[^>][\n\r]+/" with "<br />\n""
- Previous message: Bob Bedford: "mysql_affected_row return 0 ???"
- Next in thread: doug: "Re: WebDav SEARCH question"
- Reply: doug: "Re: WebDav SEARCH question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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();
- Next message: ribchr00_at_stud.unibas.ch: "Replacing "/[^>][\n\r]+/" with "<br />\n""
- Previous message: Bob Bedford: "mysql_affected_row return 0 ???"
- Next in thread: doug: "Re: WebDav SEARCH question"
- Reply: doug: "Re: WebDav SEARCH question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|