Outook 2016中的makeEwsRequestAsync函数Windows桌面客户端不起作用 [英] makeEwsRequestAsync function in Outook 2016 Windows Desktop Client doesn't work

查看:78
本文介绍了Outook 2016中的makeEwsRequestAsync函数Windows桌面客户端不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发outlook addin,需要使用makeEwsRequestAsync在用户的EWS中创建约会。我测试了多种组合,如Mac / Windows,Chrome / Firefox,Office365 / Exchange等。但是,仅在Outlook 2016 for Windows + Exchange
Server 2013帐户不起作用。 

有没有人遇到过这个问题?我该如何解决这个问题?

I'm developing outlook addin, and need to use makeEwsRequestAsync to create appointment in user's EWS. I tested in multiple combinations such as Mac/Windows, Chrome/Firefox, Office365/Exchange etc. However, only in Outlook 2016 for Windows + Exchange Server 2013 account doesn't work. 
Has anyone meet with this issue also? How can I solve this issue?

非常感谢!

推荐答案

TonyXu,

Hi TonyXu,

您能否与我们分享您的代码和xml请求?你的Outlook 2016版本是什么?我在Outlook桌面16.0.7329.1017 32位下使用以下代码进行了测试,它运行正常。

Could you share us your code and xml request? What is your Outlook 2016 version? I made a test with below code under Outlook desktop 16.0.7329.1017 32-bit, it works correctly.

  function MeetingRequest()
  {
      var result = '<?xml version="1.0" encoding="utf-8"?>' +
              '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
                                     ' 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">' +
        '  <soap:Header>' +
       '    <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />' +
       '  </soap:Header>' +
      '<soap:Body>' +
          '<CreateItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"' +
                       ' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"' +
                        ' SendMeetingInvitations="SendToAllAndSaveCopy" >' +
      '<SavedItemFolderId>' +
      '<t:DistinguishedFolderId Id="calendar"/>' +
      '</SavedItemFolderId>' +
      '<Items>' +
      '<t:CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">' +
        '<Subject>Planning Meeting</Subject>' +
        '<Body BodyType="Text">Business meeting about new customers.</Body>' +
        '<ReminderIsSet>true</ReminderIsSet>' +
        '<ReminderMinutesBeforeStart>60</ReminderMinutesBeforeStart>' +
        '<Start>2016-12-02T14:00:00</Start>' +
        '<End>2016-12-02T15:00:00</End>' +
        '<IsAllDayEvent>false</IsAllDayEvent>' +
        '<LegacyFreeBusyStatus>Busy</LegacyFreeBusyStatus>' +
        '<Location></Location>' +
        '<RequiredAttendees>' +
          '<Attendee>' +
            '<Mailbox>' +
              '<EmailAddress>xxx@microsoft.com</EmailAddress>' +
            '</Mailbox>' +
          '</Attendee>' +
        '</RequiredAttendees>' +
      '</t:CalendarItem>' +
      '</Items>' +
      '</CreateItem>' +
      '</soap:Body>' +
      '</soap:Envelope>';
      return result;
  }
  function callback(asyncResult) {
      var result = asyncResult.value;
      var context = asyncResult.context;
      console.log(asyncResult.status);
  }
  function CreateMeeting() {
      Office.context.mailbox.makeEwsRequestAsync(MeetingRequest(), callback);

  }

我建议您使用上面的代码进行测试。

I suggest you make a test with my above code.

最诚挚的问候,

Best Regards,

爱德华


这篇关于Outook 2016中的makeEwsRequestAsync函数Windows桌面客户端不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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