RE: Get file attachment via WebDAV?
- From: "Frank" <Frank@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Jun 2005 10:43:10 -0700
Ok, I've answered part of my own questions. I must be blind since I didn't
see that the DAV namespace property "href" has the entire URL of the
attachment returned via the X-MS-ENUMATTS request. Therefore, I've
successfully used a GET method to obtain the attachment and save it to my
local computer.
I still do have these other minor questions:
1). I noticed that the "d:x37050003" property seems to indicate what type of
attachment this is. I just want valid attached files (nothing embedded).
Are these values documented anywhere?
2). The only way I can get to the "d:x37050003" property is using the
getElementsByTagName method of the DOM document using a nodelist. If I try
to go directly to this node in the XML and get the text like this:
reqDoc.SelectSingleNode("//multistatus/response/propstat/prop/x37050003").text
It fails. If I try to use "//a:multistatus/a:repsonse...." etc... it also
fails. How can I select a single node in XML when namespaces are used.
Thank you very much.
"Frank" wrote:
> I've successfully put in an HTTP request to get an email message from an
> Inbox on the Exchange server and found if it had attachments or not. Now,
> I've sent the HTTP request (X-MS-ENUMATTS) and part of the XML returned back
> is:
>
> <a:response>
>
> <a:href>http://flspexuser02/exchange/nlopes/Inbox/WFG%20Experience-5.EML/allemployeeexperience6-30.doc</a:href>
> <a:propstat>
> <a:status>HTTP/1.1 200 OK</a:status>
> <a:prop>
> <d:x3703001f>.doc</d:x3703001f>
> <d:x3704001f>ALLEMP~3.DOC</d:x3704001f>
> <d:x37050003 b:dt="int">1</d:x37050003>
> <d:x370b0003 b:dt="int">857</d:x370b0003>
> <d:x37140003 b:dt="int">0</d:x37140003>
> <d:x0e200003 b:dt="int">123481</d:x0e200003>
> <d:x0e210003 b:dt="int">0</d:x0e210003>
>
> <e:attachmentfilename>allemployeeexperience6-30.doc</e:attachmentfilename>
> <f:cn>allemployeeexperience6-30.doc</f:cn>
> </a:prop>
> </a:propstat>
> </a:response>
>
> 1). I see the attachmentfilename of "allemployeeexperience6-30.doc", but how
> do I retrieve it? Is is already in this XML (base 64 encoded or something?)
>
> 2). I don't want to download any type of embedded images, etc... if they are
> considered file attachments. I only want real file attachments. What is the
> best way to check for that or is it necessary?
>
> Thank you very much,
>
> Frank
>
.
- Follow-Ups:
- Re: Get file attachment via WebDAV?
- From: Henning Krause [MVP - Exhange]
- Re: Get file attachment via WebDAV?
- References:
- Get file attachment via WebDAV?
- From: Frank
- Get file attachment via WebDAV?
- Prev by Date: Public Folder Contact Creation Issue
- Next by Date: Re: Get file attachment via WebDAV?
- Previous by thread: Get file attachment via WebDAV?
- Next by thread: Re: Get file attachment via WebDAV?
- Index(es):
Relevant Pages
|