0

EWS マネージ API を使用して Exchange Server 2010 を使用しています。リクエストFindItemを実行すると、サーバーからエラーが発生します-「ErrorIncorrectSchemaVersion」「リクエストは有効ですが、RequestServerVersion SOAPヘッダーで正しいサーバーバージョンが指定されていません。RequestServerVersion SOAPヘッダーが正しいRequestServerVersionValueで設定されていることを確認してください。」しかし、XML では RequestServerVersionValue を Exchange2010 として指定しました。Exchange2007、Exchange2007_SP1、Exchange2010_SP1 も指定しようとしましたが、何も変わりませんでした。

  <?xml version="1.0" ?> 
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <SOAP-ENV:Body>
- <FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" Traversal="Shallow">
- <ItemShape>
  <BaseShape xmlns="http://schemas.microsoft.com/exchange/services/2006/types">IdOnly</BaseShape> 
  </ItemShape>
  <IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning" /> 
- <ParentFolderIds>
- <DistinguishedFolderId xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Id="calendar">
- <Mailbox>
  <EmailAddress>test@test1.com</EmailAddress> 
  </Mailbox>
 </DistinguishedFolderId>
  </ParentFolderIds>
  </FindItem>
- <ExchangeImpersonation xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
- <ConnectingSID>
 <PrimarySmtpAddress>test@test1.com</PrimarySmtpAddress> 
 </ConnectingSID>
  </ExchangeImpersonation>
  <MailboxCulture xmlns="http://schemas.microsoft.com/exchange/services/2006/types">US-en</MailboxCulture> 
  <RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2010" /> 
- <TimeZoneContext xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
- <TimeZoneDefinition Id="FLE Standard Time">
- <Periods>
  <Period Id="FLE Standard Time" /> 
  </Periods>
  </TimeZoneDefinition>
  </TimeZoneContext>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
4

1 に答える 1

1

次のように、SOAPヘッダーに含める必要のあるXMLのブロックがあります。

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Header>
  <ExchangeImpersonation xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
    <ConnectingSID>
    <PrimarySmtpAddress>developer@[snip].nl</PrimarySmtpAddress> 
    </ConnectingSID>
  </ExchangeImpersonation>
  <MailboxCulture xmlns="http://schemas.microsoft.com/exchange/services/2006/types">US-en</MailboxCulture> 
  <RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2010" /> 
  <TimeZoneContext xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
    <TimeZoneDefinition Id="FLE Standard Time">
      <Periods>
        <Period Id="FLE Standard Time" /> 
      </Periods>
    </TimeZoneDefinition>
  </TimeZoneContext>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" Traversal="Shallow">
    <ItemShape>
      <BaseShape xmlns="http://schemas.microsoft.com/exchange/services/2006/types">IdOnly</BaseShape> 
    </ItemShape>
    <IndexedPageItemView MaxEntriesReturned="100" Offset="0" BasePoint="Beginning" /> 
    <ParentFolderIds>
      <DistinguishedFolderId xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Id="calendar">
        <Mailbox>
          <EmailAddress>developer@[snip].nl</EmailAddress> 
        </Mailbox>
      </DistinguishedFolderId>
    </ParentFolderIds>
  </FindItem>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>    

これを実行すると、次のエラーが発生します;-)
ErrorTimeZone-期間のバイアス属性がnullに設定されます

そして、私はSoapUIでこのテストを見つけました(ヒント!)

于 2013-01-11T15:31:08.210 に答える