RE: Get file attachment via WebDAV?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
>
.



Relevant Pages

  • Re: help with design - reload image on image load; avoid infinite loop
    ... This will be the page you will make your xml ... http request too, From your main page. ... graph, depending on the arguments passed to it. ... the first being loading, ...
    (comp.lang.javascript)
  • How to submit an HTTP Request with XML
    ... submits an http request with some XML. ... I have never done this in Perl and I need to know which modules to use ... It also deletes the source .pdf file from an SFTP server where ... I have the http request in a separate variable as "http:// ...
    (comp.lang.perl.misc)
  • Re: XML-string transportieren
    ... Ja, sicher, per HttpWebRequest kannst du dann das XML im HTTP request ... body senden, mit .NET, in dem du den RequestStream benutzt. ... Wenn das XML nicht auf der Platte als Datei vorhanden ist, ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: XML Post / Reply
    ... Our vendor has a SOAP / WSDL interface but the raw XML using POST is their ... What is the best way to do this with asp.net web services? ... My first incling is to stream an XML ... part of a HTTP request body, ...
    (microsoft.public.dotnet.xml)