CreateItem (AcceptSharingInvitation)
Last modified: February 08, 2010
Applies to: Exchange Server 2007 | Exchange Server 2010
In this article
Accept Sharing Invitation Request Example
Successful Accept Sharing Invitation Response Example
Accept Sharing Invitation Error Response Example
The CreateItem operation is used to accept an invitation to share another user's calendar or contacts data.
Accept Sharing Invitation Request Example
Description
The following example shows how to accept a sharing invitation.
Code
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
<soap:Body>
<CreateItem xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
<Items xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
<AcceptSharingInvitation xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
<ReferenceItemId Id="AAAlAFVzZ" ChangeKey="CwAAABYAA" />
</AcceptSharingInvitation>
</Items>
</CreateItem>
</soap:Body>
</soap:Envelope>
Request Elements
The following elements are used in the request:
Comments
The item identifier and change key have been shortened to preserve readability.
Successful Accept Sharing Invitation Response Example
Description
The following example shows a successful response to a CreateItem request.
Code
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<t:ServerVersionInfo MajorVersion="14"
MinorVersion="0"
MajorBuildNumber="639"
MinorBuildNumber="11"
Version="Exchange2010"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<CreateItemResponse xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items />
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</CreateItemResponse>
</soap:Body>
</soap:Envelope>
Successful Response Elements
The following elements are used in the response:
Accept Sharing Invitation Error Response Example
Description
The following example shows an error response to a CreateItem request. The error is caused by an attempt to accept a sharing invitation that cannot be found in the Exchange store.
Code
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<t:ServerVersionInfo MajorVersion="14"
MinorVersion="0"
MajorBuildNumber="639"
MinorBuildNumber="11"
Version="Exchange2010"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<CreateItemResponse xmlns:m="https://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types"
xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Error">
<m:MessageText>The specified object was not found in the store.</m:MessageText>
<m:ResponseCode>ErrorItemNotFound</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Items />
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</CreateItemResponse>
</soap:Body>
</soap:Envelope>
Error Response Elements
The following elements are used in the error response: