会议请求属性无法在EWS SOAP调用中设置?

时间:2015-07-21 15:07:58

标签: soap exchangewebservices meeting-request

我在Exchange Server中创建(重复)事件,并使用纯SOAP调用与Exchange Web服务进行通信。

当这些事件实际上满足请求时,我会尝试维护以前检索过的某些会议属性,因此我将它们放入CreateItem调用中:

AllowNewTimeProposal
AppointmentReplyTime
ConferenceType
IsCancelled
IsOnlineMeeting
IsResponseRequested
MeetingWorkspaceURL
MeetingRequestWasSent
MyResponseType
NetShowURL
Organizer
OptionalAttendees
RequiredAttendees
Resources

首先我收到了属性Set action is invalid for propertyIsCancelled的错误IsOnlineMeeting,并认为 O,这些可能是自动设置,但现在我甚至在用户是组织者的事件中获取Organizer

发生了什么事?
所有这些会议属性都不能在CreateItem电话中设置吗? 我是不是偶然碰到了三个不可设置的东西 - 我在哪里可以找到实际可设置的列表(例如https://msdn.microsoft.com/en-us/library/aa580675%28v=exchg.80%29.aspx的文档确实提到偶尔的只读元素,但不是这些)?

请求:

<soapenv:Envelope
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
  xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
  <typ:RequestServerVersion Version="Exchange2007_SP1"/>
  <typ:MailboxCulture>en-US</typ:MailboxCulture>
  <typ:TimeZoneContext>
     <typ:TimeZoneDefinition Id="W. Europe Standard Time"/>
  </typ:TimeZoneContext>
</soapenv:Header>
<soapenv:Body>
   <mes:CreateItem SendMeetingInvitations="SendToNone">
      <mes:SavedItemFolderId>
         <typ:DistinguishedFolderId Id="calendar">
            <typ:Mailbox>
               <typ:EmailAddress>jan@TimeTellBV567.onmicrosoft.com</typ:EmailAddress>
            </typ:Mailbox>
         </typ:DistinguishedFolderId>
      </mes:SavedItemFolderId>
      <mes:Items>
         <typ:CalendarItem>
           <typ:Subject>recuir MODI</typ:Subject>
           <typ:Body BodyType="Text"></typ:Body>
           <typ:Categories>
             <typ:String>TimeTell</typ:String>
           </typ:Categories>
           <typ:ReminderIsSet>false</typ:ReminderIsSet>
           <typ:Start>2015-07-23T11:30:00.000+02:00</typ:Start>
           <typ:End>2015-07-23T12:00:00.000+02:00</typ:End>
           <typ:IsAllDayEvent>false</typ:IsAllDayEvent>
           <typ:LegacyFreeBusyStatus>Busy</typ:LegacyFreeBusyStatus>
           <typ:Location>daar</typ:Location>
           <typ:IsResponseRequested>true</typ:IsResponseRequested>
           <typ:MyResponseType>Organizer</typ:MyResponseType>
           <typ:Organizer>
             <typ:Mailbox>
               <typ:Name>Jan</typ:Name>
               <typ:EmailAddress>jan@somewhere.onmicrosoft.com</typ:EmailAddress>
               <typ:RoutingType>SMTP</typ:RoutingType>
             </typ:Mailbox>
           </typ:Organizer>
           <typ:RequiredAttendees>
             <typ:Attendee>
               <typ:Mailbox>
                 <typ:Name>Ben</typ:Name>
                 <typ:EmailAddress>ben@somewhere.onmicrosoft.com</typ:EmailAddress>
                 <typ:RoutingType>SMTP</typ:RoutingType>
               </typ:Mailbox>
               <typ:ResponseType>Unknown</typ:ResponseType>
             </typ:Attendee>
           </typ:RequiredAttendees>
           <typ:Recurrence>
             <typ:WeeklyRecurrence>
               <typ:Interval>1</typ:Interval>
               <typ:DaysOfWeek>Thursday</typ:DaysOfWeek>
             </typ:WeeklyRecurrence>
             <typ:NoEndRecurrence>
               <typ:StartDate>2015-07-23+01:00</typ:StartDate>
             </typ:NoEndRecurrence>
           </typ:Recurrence>
           <typ:MeetingTimeZone TimeZoneName="W. Europe Standard Time"/>
           <typ:ConferenceType>0</typ:ConferenceType>
           <typ:AllowNewTimeProposal>true</typ:AllowNewTimeProposal>
           <typ:IsOnlineMeeting>false</typ:IsOnlineMeeting>
         </typ:CalendarItem>
      </mes:Items>
   </mes:CreateItem>
</soapenv:Body>
</soapenv:Envelope>

响应:

<Envelope>
  <Header>
    <ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="213" MinorBuildNumber="21" Version="V2_47"/>
  </Header>
  <Body>
    <CreateItemResponse>
      <ResponseMessages>
        <CreateItemResponseMessage ResponseClass="Error">
          <MessageText>Set action is invalid for property.</MessageText>
          <ResponseCode>ErrorInvalidPropertySet</ResponseCode>
          <DescriptiveLinkKey>0</DescriptiveLinkKey>
          <MessageXml>
            <FieldURI FieldURI="calendar:Organizer"/>
          </MessageXml>
          <Items/>
        </CreateItemResponseMessage>
      </ResponseMessages>
    </CreateItemResponse>
  </Body>
</Envelope>

我目前正在使用自己的calander中的组织者对Office 365进行测试,但正如您从请求中看到的那样,我希望这可以从Exchange2007_SP1开始工作。

1 个答案:

答案 0 :(得分:1)

(回答我自己的问题)

嗯,这个问题有点误报,但我把它留在这里因为信息很难找到。

事实证明,我尝试修改的属性确实都是只读IsCancelledIsOnlineMeetingMeetingRequestWasSentOrganizer 。 从MS Exchange发展论坛the 'Exchange EWS set CalendarItem Organizer' post的答案中引用Kim Brand:

管理器是一个只读属性,这意味着您无法设置&#34;那个财产。这就是您看到错误消息&#34;设置操作对于属性&#34;无效的原因。
管理器是负责协调会议关注的一方,其值自动设置为创建CalendarItem的用户(除非使用Delegate Access)。

当我将上述属性从我的CreateItem电话中删除时,它会起作用。创建/更新的约会上的GetItem表示Organizer确实已设置:

<t:Organizer>
   <t:Mailbox>
      <t:Name>Jan</t:Name>
      <t:EmailAddress>/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=A9403513C6AA40E68E05776BFEA9C117-JAN</t:EmailAddress>
      <t:RoutingType>EX</t:RoutingType>
      <t:MailboxType>OneOff</t:MailboxType>
   </t:Mailbox>
</t:Organizer>


[编辑补充]:
可以通过MAPI设置只读属性,请参阅我的其他帖子 How to 'set' read-only calendar appointment properties (related to meetings)?