Export (0) Print
Expand All

AcceptItemType Class

The AcceptItemType class represents an accept response object that is used to reply to a meeting request or calendar item.

Namespace: ExchangeWebServices
Assembly: EWS (in ews.dll)

[SerializableAttribute] 
[XmlTypeAttribute(Namespace="http://schemas.microsoft.com/exchange/services/2006/types")] 
[GeneratedCodeAttribute("wsdl", "2.0.50727.42")] 
[DebuggerStepThroughAttribute] 
[DesignerCategoryAttribute("code")] 
public class AcceptItemType : WellKnownResponseObjectType
/** @attribute SerializableAttribute() */ 
/** @attribute XmlTypeAttribute(Namespace="http://schemas.microsoft.com/exchange/services/2006/types") */ 
/** @attribute GeneratedCodeAttribute("wsdl", "2.0.50727.42") */ 
/** @attribute DebuggerStepThroughAttribute() */ 
/** @attribute DesignerCategoryAttribute("code") */ 
public class AcceptItemType extends WellKnownResponseObjectType
SerializableAttribute 
XmlTypeAttribute(Namespace="http://schemas.microsoft.com/exchange/services/2006/types") 
GeneratedCodeAttribute("wsdl", "2.0.50727.42") 
DebuggerStepThroughAttribute 
DesignerCategoryAttribute("code") 
public class AcceptItemType extends WellKnownResponseObjectType

The AcceptItemType object is used to accept a meeting request or calendar item. Although the AcceptItemType inherits many members from many base classes, the only property that has to be set on the AcceptItemType object is the ReferenceItemId property.

Bb426175.note(en-us,EXCHG.80).gifNote:
A user cannot accept a meeting request or calendar item for which the user is the organizer.

Meeting requests have an ItemClass of IPM.Schedule.Meeting.Request. To find only meeting requests when you are using search folders or FindItem queries, restrict the result set by the ItemClass property.

If the MessageDisposition property is not set on the CreateItemType, an ErrorMessageDispositionRequired error will be returned.


The following example shows you how to accept a meeting request. The item identifier of the meeting request is used in the ReferenceItemId property.

static void AcceptItem(ExchangeServiceBinding esb)
{
    // Create the request.
    CreateItemType request = new CreateItemType();
    
    // Set the message disposition on the request.
    request.MessageDisposition = MessageDispositionType.SendAndSaveCopy;
    request.MessageDispositionSpecified = true;

    // Create the AcceptItem response object.
    AcceptItemType acceptItem = new AcceptItemType();
    
    // Identify the meeting request to accept.
    acceptItem.ReferenceItemId = new ItemIdType();
    acceptItem.ReferenceItemId.Id = "AAAnAHJheA=";

    // Add the AcceptItem response object to the request.
    request.Items = new NonEmptyArrayOfAllItemsType();
    request.Items.Items = new ItemType[1];
    request.Items.Items[0] = acceptItem;

    // Send the request and get the response.
    CreateItemResponseType response = esb.CreateItem(request);

    ArrayOfResponseMessagesType aormt = response.ResponseMessages;
    ResponseMessageType[] rmta = aormt.Items;

    foreach (ResponseMessageType rmt in rmta)
    {
        ItemInfoResponseMessageType iirmt = (rmt as ItemInfoResponseMessageType);
        if (iirmt.ResponseClass == ResponseClassType.Success)
        {
            Console.WriteLine("Successfully accepted meeting");
        }
    }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003,

Target Platforms

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Longhorn, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2)
Show:
© 2014 Microsoft