EWS以用户身份要求预订房间

时间:2018-12-25 13:39:06

标签: exchange-server exchangewebservices

对于此服务器,当用户尝试在Exchange中预订会议室时,会议室会自动答复接受/拒绝。我正在尝试在EWS中复制此过程-使用服务帐户来请求与用户出席者和会议室资源的会议室会议。为了让房间自动回复用户而不是服务帐户,我是否需要使用模拟功能,或者是否有其他流程?我为此使用php-ews,但是任何语言的任何帮助或SOAP请求应包含的帮助都会大有帮助。

1 个答案:

答案 0 :(得分:0)

您可以使用以下代码请求会议:

<?xml version="1.0" encoding="utf-8"?>
<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="Exchange2010" />
   </soap:Header>
   <soap:Body>
      <m:CreateItem SendMeetingInvitations="SendToAllAndSaveCopy">
         <m:Items>
            <t:CalendarItem>
               <t:Subject>Status Meeting</t:Subject>
               <t:Body BodyType="Text">The purpose of this meeting is to discuss project status.</t:Body>
               <t:Start>2009-03-01T17:00:00Z</t:Start>
               <t:End>2009-03-01T19:00:00Z</t:End>
               <t:Location>Conf Room</t:Location>
              <t:RequiredAttendees>
                  <t:Attendee>
                     <t:Mailbox>
                        <t:EmailAddress>user1@contoso.com</t:EmailAddress>
                     </t:Mailbox>
                  </t:Attendee>
                  <t:Attendee>
                     <t:Mailbox>
                        <t:EmailAddress>user2@contoso.com</t:EmailAddress>
                     </t:Mailbox>
                  </t:Attendee>
               </t:RequiredAttendees>
               <t:OptionalAttendees>
                  <t:Attendee>
                     <t:Mailbox>
                        <t:EmailAddress>user3@contoso.com</t:EmailAddress>
                     </t:Mailbox>
                  </t:Attendee>
               </t:OptionalAttendees>
            </t:CalendarItem>
         </m:Items>
      </m:CreateItem>
   </soap:Body>
</soap:Envelope>

有关更多信息,请参阅以下链接:

Creating appointments and meetings by using the EWS Managed API 2.0

Exchange Web Services Create Meeting Request Working Example