MoveItemType moveItem = request.getEnvelope().addNewBody().addNewMoveItem();
moveItem.setToFolderId(targetFolderId);
NonEmptyArrayOfBaseItemIdsType itemIds = moveItem.addNewItemIds();
for (MessageId messageId : messageIds)
{
ItemIdType itemId = itemIds.addNewItemId();
itemId.setId(messageId.getId());
itemId.setChangeKey(messageId.getChangeKey());
}
BodyType response = sendRequest(request);
ItemInfoResponseMessageType[] responses =
response.getMoveItemResponse().getResponseMessages().getMoveItemResponseMessageArray();
if (responses.length != messageIds.size())