473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

WebDav SEARCH question

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/exc...ils/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();

Jul 17 '05 #1
1 1878
This turns out to be a PEAR PHP problem... There is a bug in
HTTP_Request

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jody Winston | last post by:
I'd like to present a view of an internal data store, which has Python interface built using SWIG, so that my users can traverse and manipulate the data store using familiar tools. My first...
0
by: Michael G. Schneider | last post by:
I just started playing around with WebDAV. The basic configuration is done and works. For example I am able to open a document via HTTP from within Word and save it. What I am really looking for...
0
by: SimpleSimple | last post by:
My company has an IIS 5, ASP.net intranet site that contains documents for employee use. The files are of various types (most often Office) and are stored in blob fields in a SQL2000 database. ...
2
by: George Durzi | last post by:
We recently upgraded to Exchange2K3/W2K3 from Exchange2K/W2K, and some of my c# code that I used to access users' contacts using WebDAV has stopped working. I'm getting a 401 unauthorized error....
2
by: Raj Dhrolia | last post by:
Hi All, Is there any programmatic way to communicate with WebDav. I only need to upload / download files from IIS 6.0. Thanks, Raj.
2
by: Brett Smith | last post by:
I know that this probably isn't the best place to post this but I already posted it in the exchange.devolopment group, and have not gotten any responces, so I thought that I would post it here. ...
0
by: alfred.sehmueller | last post by:
Hello, i'm searching for a dotnet webdav-server component or a possibility to use iis and intercept events. After a long google search without any results i hope anybody can help me. I can't...
1
by: =?Utf-8?B?QWxleCBSYWtvdg==?= | last post by:
Hi, I work at a webdav server. And i try to use Word as a webdav client. But I have strange problem. For some files Word sends LOCK command and works with them well. But for others it doesn't do...
7
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.