PHP Webdav/ Exchange question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • doug

    PHP Webdav/ Exchange question

    I have been working on a php application interfacing with exchange, my
    application works with PROPFIND but when I do a search I get an error
    400, can anyone point out to me why, I do a METHOD SEARCH, my code
    is below:

    My query is well formed and works, so my header request may be
    incorrect?

    HTTP_REQUEST_ME THOD_SEARCH=SEA RCH

    $req = &new HTTP_Request($u rl);

    if (is_string($use rname)) {
    $req->setBasicAuth($ username, @$password);
    }
    if ($method!=HTTP_ REQUEST_METHOD_ SEARCH)
    {
    $req->setMethod($met hod);
    $req->addHeader("Dep th", "1");
    $req->addHeader("Tra nslate", "f");
    }
    else
    {
    $req->setMethod($met hod);
    // $req->addHeader("Dep th", "1");
    // $req->addHeader("Tra nslate", "f");

    }

    $req->addHeader("Con tent-Type", "text/xml");
    $req->addRawPostData ($query);

    $req->sendRequest( );
    if (PEAR::isError( $req->sendRequest()) ) {
    echo "ERROR:".$r eq->getMessage() ;
    }
    $responsecode=$ req->getResponseCod e();

Working...