Exchange EWS不返回日历的邮件正文 [英] Exchange EWS not returning message body for calendar

查看:76
本文介绍了Exchange EWS不返回日历的邮件正文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图从office360.com获取所有日历事件.我正在使用ews来获取数据.我发送了

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>

此肥皂请求xml不会返回日历消息正文,但是我得到了主题和其他数据.我在这里做错了什么?任何帮助表示赞赏.

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.

推荐答案

需要在单独的调用中检索主体.

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.

第二种方法比较容易,但是您需要定义所有想要返回的属性,如果属性很多,可能会很麻烦.

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.

这篇关于Exchange EWS不返回日历的邮件正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆