Exchange Web服务(EWS)从会议中删除RequiredAttendees?

时间:2011-03-23 12:47:28

标签: xml exchange-server exchangewebservices

如何从使用XML的会议中删除用户?

我有这个代码删除所有RequiredAttendees

<?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:Body>
    <UpdateItem MessageDisposition="SendAndSaveCopy" ConflictResolution="AutoResolve" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy" 
                xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAALAGVkaUB...=" ChangeKey="DwAAABYAAA...."/>
          <t:Updates>
            <t:DeleteItemField>
              <t:FieldURI FieldURI="calendar:RequiredAttendees"/>
            </t:DeleteItemField>
          </t:Updates>
        </t:ItemChange>
      </ItemChanges>
    </UpdateItem>
  </soap:Body>
</soap:Envelope>

和此代码添加RequiredAttendee

<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:Body>
    <UpdateItem MessageDisposition="SendAndSaveCopy" ConflictResolution="AutoResolve" SendMeetingInvitationsOrCancellations="SendToAllAndSaveCopy" 
                xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
      <ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAALAGVkaUBlbGl...." ChangeKey="DwAAABYAAAC......"/>
          <t:Updates>
                    <t:AppendToItemField>
          <t:FieldURI FieldURI="calendar:RequiredAttendees" />
          <t:CalendarItem>
            <t:RequiredAttendees>
              <t:Attendee>
                <t:Mailbox>
                  <t:EmailAddress>user@localhost.comm</t:EmailAddress>
                </t:Mailbox>
              </t:Attendee>
            </t:RequiredAttendees>
          </t:CalendarItem>
        </t:AppendToItemField>
          </t:Updates>
        </t:ItemChange>
      </ItemChanges>
    </UpdateItem>
  </soap:Body>
</soap:Envelope>

对我来说都很完美,但我找不到删除会议中使用的方法的方法,而不是全部!

任何帮助?

1 个答案:

答案 0 :(得分:2)

answer here看起来很有希望。您似乎只需要与所需人员一起更新与会者列表,而不是能够删除与会者。

您也可以使用API