3
votes

So i'm trying to fetch all the calendar event from office360.com . I am using ews to get the data. I sent a request of

    <?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>
    <FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
              Traversal="Shallow">
      <ItemShape>
        <t:BaseShape>AllProperties</t:BaseShape>
        <t:BodyType>HTML</t:BodyType>
      </ItemShape>
      <ParentFolderIds>
        <t:DistinguishedFolderId Id="calendar"/>
      </ParentFolderIds>
    </FindItem>
  </soap:Body>
</soap:Envelope>

This soap request xml is not returning me the calendar message body but i get the subject and other data . What am i doing wrong here ? any help is appreciated.

1

1 Answers

3
votes

The body needs to be retrieved in a separate call.

http://weblogs.asp.net/psperanza/archive/2008/03/18/getting-calendar-items-using-exchange-web-services.aspx

Or you can load the property first.

http://blogs.msdn.com/b/exchangedev/archive/2010/03/16/loading-properties-for-multiple-items-with-one-call-to-exchange-web-services.aspx

The second is easier but you need to define all properties you want back and if it is a lot, it can be a pain.