4.1 Copying a Calendar Item
The following example demonstrates a client request to copy an item to the Inbox folder, and the server response. The identifier of the new item is returned in the response message.
Request:
-
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <soap:Header> <t:RequestServerVersion Version="Exchange2010" /> </soap:Header> <soap:Body> <CopyItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ToFolderId> <t:DistinguishedFolderId Id="inbox"/> </ToFolderId> <ItemIds> <t:ItemId Id="AS4AUnV="/> </ItemIds> </CopyItem> </soap:Body> </soap:Envelope>
Response:
-
<?xml version="1.0" encoding="utf-8" ?> <soap:Envelope xmlns:soap="http://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="8" MinorVersion="1" MajorBuildNumber="344" MinorBuildNumber="0" Version="Exchange2010" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" /> </soap:Header> <soap:Body> <CopyItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <m:ResponseMessages> <m:CopyItemResponseMessage ResponseClass="Success"> <m:ResponseCode>NoError</m:ResponseCode> <m:Items> <t:Message> <t:ItemID Id="AAMkAd" ChangeKey="FwAAABY" /> </t:Message> </m:Items> </m:CopyItemResponseMessage> </m:ResponseMessages> </CopyItemResponse> </soap:Body> </soap:Envelope>