2016-07-27 4 views
0

でPullSubscriptionを作るとき、私はMicrosoft Office Dev Centerに記載されているようSubscrubeToAllFolders属性でPullSubscriptionを使用しようとしている:InternalServerError SubscribeToAllFolders

<?xml version="1.0" encoding="UTF-8"?> 
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> 
    <s:Header> 
     <t:RequestServerVersion Version="Exchange2013_SP1" /> 
    </s:Header> 
    <s:Body> 
     <m:Subscribe> 
      <m:PullSubscriptionRequest SubscribeToAllFolders=""> 
       <t:FolderIds /> 
       <t:EventTypes> 
        <t:EventType>CopiedEvent</t:EventType> 
        <t:EventType>CreatedEvent</t:EventType> 
        <t:EventType>DeletedEvent</t:EventType> 
        <t:EventType>ModifiedEvent</t:EventType> 
        <t:EventType>MovedEvent</t:EventType> 
        <t:EventType>NewMailEvent</t:EventType> 
        <t:EventType>FreeBusyChangedEvent</t:EventType> 
       </t:EventTypes> 
       <t:Watermark /> 
       <t:Timeout>1</t:Timeout> 
      </m:PullSubscriptionRequest> 
     </m:Subscribe> 
    </s:Body> 
</s:Envelope> 

しかし、これは常にテキストAn internal server error occurred. The operation failed.なしfaultactorErrorInternalServerErrorを返します。私は余分な<t:FolderIds /><t:Watermark/>タグの有無にかかわらずこれを試しました。異なるタイムアウトと異なる内容の<t:EventTypes>

しかし、ときに私はSubscribeToAllFolders=""を削除するなど、手動でフォルダに追加します。私は、予想される応答を取得

<?xml version="1.0" encoding="UTF-8"?> 
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> 
    <s:Header> 
     <t:RequestServerVersion Version="Exchange2013_SP1" /> 
    </s:Header> 
    <s:Body> 
     <m:Subscribe> 
      <m:PullSubscriptionRequest> 
       <t:FolderIds> 
        <t:DistinguishedFolderId Id="inbox" /> 
       </t:FolderIds> 
       <t:EventTypes> 
        <t:EventType>CopiedEvent</t:EventType> 
        <t:EventType>CreatedEvent</t:EventType> 
        <t:EventType>DeletedEvent</t:EventType> 
        <t:EventType>ModifiedEvent</t:EventType> 
        <t:EventType>MovedEvent</t:EventType> 
        <t:EventType>NewMailEvent</t:EventType> 
        <t:EventType>FreeBusyChangedEvent</t:EventType> 
       </t:EventTypes> 
       <t:Watermark /> 
       <t:Timeout>10</t:Timeout> 
      </m:PullSubscriptionRequest> 
     </m:Subscribe> 
    </s:Body> 
</s:Envelope> 

誰でも前にSubscribeToAllFoldersに問題がありましたか?それを働かせる方法はありますか?私はEWSとSOAPには比較的新しいので、私は何事も私の目的を愚かにしていますか?助けてくれてありがとう。

答えて

1

あなたの要求が正しくフォーマットされていないが、それは私はあなたが、それは両方のあなたのテストをできるようになるいくつかのテストを行うにはEWSEditor https://ewseditor.codeplex.com/を使用して見てお勧め

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 
 
    <soap:Header> 
 
     <t:RequestServerVersion Version="Exchange2013_SP1" /> 
 
    </soap:Header> 
 
    <soap:Body> 
 
     <m:Subscribe> 
 
     <m:PullSubscriptionRequest SubscribeToAllFolders="true"> 
 
      <t:EventTypes> 
 
      <t:EventType>CopiedEvent</t:EventType> 
 
      <t:EventType>CreatedEvent</t:EventType> 
 
      <t:EventType>DeletedEvent</t:EventType> 
 
      <t:EventType>ModifiedEvent</t:EventType> 
 
      <t:EventType>MovedEvent</t:EventType> 
 
      <t:EventType>NewMailEvent</t:EventType> 
 
      </t:EventTypes> 
 
      <t:Timeout>5</t:Timeout> 
 
     </m:PullSubscriptionRequest> 
 
     </m:Subscribe> 
 
    </soap:Body> 
 
    </soap:Envelope>

のようになります。例えば操作と各要求と応答に使用されるSOAPを提供します。

+0

ありがとうございます。問題は、 ''本当に '' SubscribeToAllFolders'に設定されていないということでした。私は、それがドキュメンテーションではっきりしているとは思わない。一度変更してしまえば、すべてがうまくいきました。書式設定などに問題はありませんでした。 – SCB

関連する問題