Web services Exchange Web服务-调用“时无法获取其他属性”;“FindPeople”;方法
我正在向Office365发出原始Web services Exchange Web服务-调用“时无法获取其他属性”;“FindPeople”;方法,web-services,soap,exchangewebservices,office365,Web Services,Soap,Exchangewebservices,Office365,我正在向Office365发出原始SOAP请求,并尝试获取指定AddressListId的联系人列表。我成功获取了联系人列表,但它不包括我需要的所有其他信息。一旦我向请求中添加了一些附加属性(例如PhoneNumber),服务器将返回无效形状错误 这是我的要求: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
SOAP
请求,并尝试获取指定AddressListId
的联系人列表。我成功获取了联系人列表,但它不包括我需要的所有其他信息。一旦我向请求中添加了一些附加属性(例如PhoneNumber),服务器将返回无效形状
错误
这是我的要求:
<?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="Exchange2013" />
</soap:Header>
<soap:Body >
<m:FindPeople>
<m:PersonaShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="persona:DisplayName"/>
<t:FieldURI FieldURI="persona:PhoneNumber"/>
</t:AdditionalProperties>
</m:PersonaShape>
<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100" Offset="0"/>
<m:ParentFolderId>
<t:AddressListId Id="###-####-####-####"/>
</m:ParentFolderId>
</m:FindPeople>
</soap:Body>
</soap:Envelope>
我只
如何获取每个角色的所有附加信息?我使用的是EWS托管API,因此您必须在MSDN上搜索原始SOAP调用,我只能引导您的搜索一点: 我也遇到了类似的问题,因为同样的问题也适用于
findappoints()
。请求AppointmentSchema。RequiredAttenders
将引发无效形状错误和AppointmentSchema。使用FindAppoints()
后,Organizer
将不包含电子邮件地址,只包含组织者的名称
解决方案是对Exchange Server执行两个请求
var appointments = calendarFolder.FindAppointments(BasePropertySet.FirstClassProperties);
exchangeService.LoadPropertiesForItems(appointments, MyAdvancedProperties);
我认为FindPeople()
以及其他所有Find%Itemtype%()
EWS可能支持的方法也可以采用相同的“变通方法”,但我不确定
编辑:我刚找到一个地方,上面说,LoadPropertiesForItems
使用多个itemid调用原始soapGetItem
。我不想做两个请求。我们有一个大的组织,需要花很多时间来迭代每个角色。根据微软的文档,这个电话应该是有效的,但它没有,所以我想知道我做错了什么我不知道你的情况,只是最好的猜测,但我没有做错任何事情-从FindAppoints获得组织者或所需与会者是完全不可能的。但我猜类似的限制也适用于FindPeople。顺便说一句,微软有一些论坛,当官方文件似乎有缺陷或不完整时,你可以在这些论坛上找到更好的答案。