http://blog.xenco.be/wp-content/uplo...soap-admin.txt Quote:
-----------------------------
<SearchGalRequest [type="{type}"]>
<name>...</name>
</SearchGalRequest>
<SearchGalResponse more="{more}" [tokenizeKey="{tokenize-key-op}"]>
<cn>...</cn>*
</SearchGalResponse>
{more-flag} = 1 if the results were truncated.
{tokenize-key-op} = and|or
- Not present if the search key was not tokenized.
- Some clients backtrack on GAL results assuming the results of a more
specific key is the subset of a more generic key, and it checks cached
results instead of issuing another SOAP request to the server.
If search key was tokenized and expanded with AND or OR, this cannot
be assumed.
{type} = type of addresses to search
"account" for regular user accounts, aliases and distribution lists
"resource" for calendar resources
"all" for combination of both types
if omitted, defaults to "all"
|
use zimbra_search_gal(..) with my modification
Code:
function zimbra_search_gal($name,$domain,$type = "all") {
$xml = new xml2Array();
$this->set_zimbra_header();
$soapmessage = $this->soapheader . '
<SearchGalRequest xmlns="urn:zimbraAdmin" domain="'.$domain.'" type="'.$type.'">
<name>' . $name . '</name>
</SearchGalRequest>
</soap:Body>
</soap:Envelope>';
curl_setopt($this->curlhandle, CURLOPT_POSTFIELDS, $soapmessage);
if (!($zimbraSOAPResponse = curl_exec($this->curlhandle))) {
$this->zimbraerrno = curl_errno($this->curlhandle);
$this->zimbraerror = curl_error($this->curlhandle);
return false;
}
$res = $xml->parse($zimbraSOAPResponse);
if (isset ($res['SOAP:ENVELOPE']['SOAP:BODY']['SEARCHGALRESPONSE']))
return $res['SOAP:ENVELOPE']['SOAP:BODY']['SEARCHGALRESPONSE'];
return false;
} How does it right reponse for you ?
...