我需要从交换服务器获取GAL的联系人..

我有一个方法在Exchange服务器上搜索GAL

因为有

query string : The name to search the GAL for....

代码如下....

public int searchGAL(
            String query, 
            StringBuffer result) throws Exception 
    {
        // Create the request

        String uri = mUri + "Search";


String  xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
                + "<Search xmlns=\"Search:\">\n" + 
                "\t<Store>\n"
                + "\t\t<Name>GAL</Name>\n" 
                + "\t\t<Query>" + query + "</Query>\n" 
                + "\t\t<Options>\n"
                + "\t\t\t<Range>0-99</Range>\n"
                + "\t\t</Options>\n"
                + "\t</Store>\n"
                + "</Search>";

               // Send it to the server
        HttpResponse response = sendPostRequest(createHttpPost(uri,xml,true));  

        // Check the response code to see if the result was 200
        // Only then try to decode the content

        int statusCode = response.getStatusLine().getStatusCode();

        if(statusCode == 200)
        {
            // Decode the XML content
            result.append(decodeContent(response.getEntity())); 
        }

// parse and return the results
        return statusCode;
    }

如何获取服务器中的所有联系人,..如何查询?

当我给空间..查询将搜索以空格开头的名称..但我需要在我将空格作为查询字符串时返回所有联系人 .

http://msdn.microsoft.com/en-us/library/ff631384(v=exchg.80).aspx