I'm using EWS JAVA API 1.2 and I have a problem saving an ItemAttachment using this code.
if(attachmentsCol.getPropertyAtIndex(i) instanceof FileAttachment)
{
...
}
else
{
ItemAttachment attachment = (ItemAttachment)attachmentsCol.getPropertyAtIndex(i);
attachment.load();
Item item = attachment.getItem();
item.load(newPropertySet(ItemSchema.MimeContent));`
MimeContent Itemmc = item.getMimeContent();
....
}
item.load(....)
returns this error
microsoft.exchange.webservices.data.InvalidOperationException: This operation can't be performed because this service object doesn't have an Id.
Thank you for your help.