获取所有联系人或在联系人中搜索 [英] fetch all contacts or search in the contacts

查看:164
本文介绍了获取所有联系人或在联系人中搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从文件夹中获取所有条目(实际上来自联系人文件夹)。是否可以在联系人文件夹中搜索并使用Exchange SOAP API获取与搜索过滤器匹配的条目?有人知道如何用交换SOAP做到这一点?
我发现只有如何获取文件夹,如何查找文件夹以及如何从文件夹中获取项目。但我没有找到如何搜索文件夹(联系人)以及如何获取结果列表(联系人条目)。

I would like to fetch all entries from an folder (actually from an contact folder). Is it possible to search in the contact folder and fetch those entries which match the search filter using Exchange SOAP API? Somebody knows how to do it with exchange SOAP? What I find is that only how to get a folder, how to find folders and how to get an item from a folder. But I didn't find how to search in a folder (contact) and how to get the result list (contact entries).

我正在尝试用Java开发它而不生成任何Java代理。因此,如果您发布一些纯SOAP XML消息作为示例,那就没关系。

I am trying to develop it in Java without any generated Java Proxy. So if you post some pure SOAP XML messages as example it is OK.

感谢您的帮助!

 

推荐答案

这样的东西?

<?xml version =" 1.0" encoding =" utf-8"?>

< soap:Envelope xmlns:soap =" http://schemas.xmlsoap.org/soap/envelope/ "
$
xmlns:t =" http://schemas.microsoft.com/exchange/services/2006/types "

xmlns:m =" http://schemas.microsoft.com/exchange/services/2006/messages ">

< soap:Header>< t:RequestServerVersion Version =" Exchange2007_SP1" />< / soap:Header>

< soap:Body>

< m:FindItem Traversal =" Shallow">

< m:ItemShape>

< t:BaseShape>默认< / t:BaseShape>

< / m:ItemShape>

< m:IndexedPageItemView MaxEntriesReturned =" 10"基点= QUOT;初" Offset =" 0" />
$
< m:Restriction>

< t:Contains ContainmentComparison =" IgnoreCase" ContainmentMode =" Substring">

< t:FieldURI FieldURI =" contacts:DisplayName" />

< t:Constant Value =" whatever" ; />
$
< / t:包含>

< / m:限制>

< m:SortOrder>

< t:FieldOrder Order =" Ascending">< t:FieldURI FieldURI =" contacts:FileAs" />< / t:FieldOrder>

< / m:SortOrder>

< m:ParentFolderIds>

< t:DistinguishedFolderId Id =" contacts" />

< / m:ParentFolderIds>

< / m:FindItem>

< / soap:Body>

< / soap :信封>

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header><t:RequestServerVersion Version="Exchange2007_SP1"/></soap:Header>
<soap:Body>
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>Default</t:BaseShape>
</m:ItemShape>
<m:IndexedPageItemView MaxEntriesReturned="10" BasePoint="Beginning" Offset="0"/>
<m:Restriction>
<t:Contains ContainmentComparison="IgnoreCase" ContainmentMode="Substring">
<t:FieldURI FieldURI="contacts:DisplayName"/>
<t:Constant Value="whatever"/>
</t:Contains>
</m:Restriction>
<m:SortOrder>
<t:FieldOrder Order="Ascending"><t:FieldURI FieldURI="contacts:FileAs"/></t:FieldOrder>
</m:SortOrder>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="contacts"/>
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>

 


这篇关于获取所有联系人或在联系人中搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆