2011-03-23 61 views
1

如何从XML会议中删除用户?Exchange Web Services(EWS)从会议中删除RequiredAttendees?

我有这样的代码,删除所有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>[email protected]</t:EmailAddress> 
       </t:Mailbox> 
       </t:Attendee> 
      </t:RequiredAttendees> 
      </t:CalendarItem> 
     </t:AppendToItemField> 
      </t:Updates> 
     </t:ItemChange> 
     </ItemChanges> 
    </UpdateItem> 
    </soap:Body> 
</soap:Envelope> 

都为我工作,但我不能找到一种方法来删除一个用从会议而不是全部!

有帮助吗?

回答

2

answer here看起来很有希望。除了能够删除与会者外,您似乎只需要将与会者列表更新为您想要的人员。您也可以使用API

+0

我没有使用C#这个,我需要它在XML :-( – 2011-03-23 12:53:44

+0

好吧。更新我的答案。 – FreeAsInBeer 2011-03-23 12:54:29

+0

谢谢,这看起来很有趣,它确实有道理:-)所以这只是这样吗? – 2011-03-23 12:56:58

相关问题