0

我使用objective-c 将以下soap 请求发送到交换服务器2007。

<?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">
  <soap:Body>
    <SyncFolderHierarchy  xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <FolderShape>
        <t:BaseShape>AllProperties</t:BaseShape>
      </FolderShape>
    </SyncFolderHierarchy>
  </soap:Body>
</soap:Envelope>

在回复中,我得到“请求无效”。来自服务器的响应
此请求适用于 Exchange Server 2010 和 2013。但不适用于 Exchange Server 2007。



- Exchange Server 2007参考 支持 SyncFolderHierarchy :- http://msdn.microsoft.com/en-us/library/exchange/aa564829%28v=exchg.80%29.aspx
我的问题是
[1] 我必须在交换服务器中为 SyncFolderHierarchy 操作进行任何设置吗?

4

1 回答 1

0

我正在查询 Exchange 2010,但我必须包含一个标题:

    NSString *soapMessage = [NSString stringWithFormat:@""
                             @"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
                             @"<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" 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 =\"Exchange2010_SP2\"/>"
                             @"</soap:Header>"
                             @"<soap:Body>"
                             @"<m:GetRooms>"
                             @"<m:RoomList>"
                             @"<t:EmailAddress>%@</t:EmailAddress>"
                             @"</m:RoomList>"
                             @"</m:GetRooms>"
                             @"</soap:Body>"
                             @"</soap:Envelope>"
                             @"", roomlist];
于 2013-03-16T14:33:59.543 回答