Friday, February 08, 2013 3:24 PM
Currently I'm busy developing an Office 2013 outlook app. I am trying to get the attachment from a mailbox item via the mailbox.makeEwsRequestAsync method. The response I receive has the following error: The requested web method is unavailable to this caller or application.
I used the following envelope.
<?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="Exchange2013"/> </soap:Header> <soap:Body> <GetAttachment xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <AttachmentShape> <IncludeMimeContent/> <BodyType/> <FilterHtmlContent/> <AdditionalProperties/> </AttachmentShape> <AttachmentIds> <t:AttachmentId Id="AQMkADhkMDRiYzlmLThjN2QtNGM0My05ODMwLTIyAGNmNDI0ZDMwODAARgAAAxnFAoqua3ZGnLV5PgcmjYQHAPCtHV4zyh1HqhQzDmo8SGUAAAMOAAAA8K0dXjPKHUeqFDMOajxIZQAAAysAAAABEgAQAHv5ksiBZM5BsVkyxDDLeIU="/> </AttachmentIds> </GetAttachment> </soap:Body> </soap:Envelope>
Sunday, February 10, 2013 10:39 PM
Mail Apps for Outlook only get access to a subset of EWS operations and GetAttachment is one of the operations your not allowed to use there's a full list of allowed operations on http://msdn.microsoft.com/en-us/library/fp160952.aspx. (One work around I could think of would be to use GetItem and request the MIME content and then parse and decode the attachment from the MIME content).
Monday, February 18, 2013 10:06 AM
Thanks for your reply.
I will have a look at GetItem in order to get the attachment.
Thursday, February 28, 2013 1:23 AM
Hi Glen and Mathijs,
The "GetItem" soap request cannot be used for getting the attachment itself. If you try using the attachment id and request the item using the "GetItem", you will get a response with the the message "The Id is invalid". And as mentioned the "GetAttachment" soap request is not available from the mail app.
Read: http://msdn.microsoft.com/en-us/library/exchange/aa565934(v=exchg.80).aspx , it says: "The GetItem operation does not return attachments. It does return metadata about an attached item or file. To return an attachment, use the GetAttachment Operation."
If you use GetItem on the email itself, you will get information about the attachment (i.e. metadata), but the attachment itself is not available. The MimeContent, returned in the response when requesting an email using the "GetItem", contains header data and nothing about the attachment.
It seems like there is no work around for this. Currently, we can't get attachments in an office mail app!
Any other suggestions would be greatly appreciated