0

object-c を使用して、次の SOAP リクエストを Exchange Server 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 では機能しません。


- SyncFolderHierarchy は Exchange Server 2007
リファレンスでサポートされています:- http://msdn.microsoft.com/en-us/library/exchange/aa564829%28v=exchg.80%29.aspx
私の質問は、
[1] SyncFolderHierarchy 操作のために Exchange サーバーで行う必要がある設定はありますか?

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 に答える