Re: Webdav htmldescription tag missing from response
- From: "Henning Krause [MVP - Exchange]" <newsgroups_remove@xxxxxxxxxxxxxxxxx>
- Date: Thu, 15 Mar 2007 21:50:06 -0700
Hi Andrew,
you are quering the wrong properties.
Instead of DAV:htmldescriptions, you must query urn:schemas:httpmail:htmldescription
Best regards,
Henning Krause
"Andrew" <Andrew@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:E5172080-A414-44A7-9803-088A36464C29@xxxxxxxxxxxxxxxx
Thanks Henning,
So I've converted the code to use the following search string but still I
don't get either the htmldescription or text descriptions back from exchange
in the response.
The search string I'm using is:
<?xml version="1.0"?>
<D:searchrequest xmlns:D = "DAV:">
<D:sql>
SELECT "DAV:contentclass", "DAV:displayname", "DAV:htmldescription",
"DAV:textdescription"
FROM "http://10.88.12.240/exchange/andrewp/Inbox/"
WHERE "DAV:ishidden" = false
AND "DAV:isfolder" = false
</D:sql>
</D:searchrequest>
The response begins:
<?xml version="1.0"?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:c="xml:" xmlns:a="DAV:">
<a:response>
<a:href>http://10.88.12.240/exchange/andrewp/Inbox/Trade%20Me%20Jobs%20--%20New%20application.%20Job:%20MILACKIT001%20Systems%20Support%20Administrator-3.EML</a:href>
<a:propstat><a:status>HTTP/1.1 200
OK</a:status><a:prop><a:contentclass>urn:content-classes:message</a:contentclass><a:displayname>Trade
Me Jobs -- New application. Job: MILACKIT001 Systems Support
Administrator-3.EML</a:displayname></a:prop></a:propstat>
<a:propstat><a:status>HTTP/1.1 404 Resource Not
Found</a:status><a:prop><a:htmldescription/><a:textdescription/></a:prop></a:propstat>
</a:response>
Could you let me know what I'm doing wrong here?
Thanks........
"Henning Krause [MVP - Exchange]" wrote:
Hello,
the reason why no html description is returned in this case, is that you are
performing the webdav query on a folder (iscollection=1).
If you want to look for all items in a folder, you should stick to a SEARCH
command.
Best regards,
Henning Krause
"Andrew" <Andrew@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:63A1BD40-9F5F-453A-958E-5396038BA1D3@xxxxxxxxxxxxxxxx
> We have some code that's reading HTML emails from an exchange mailbox
> using
> Webdav and has been quite happy for sometime. A snippet of code from it > is
> as
> follows:
>
> strMailboxURI = "http://10.88.12.240/exchange/andrewp/inbox"
> oXMLHTTP = New MSXML2.ServerXMLHTTP40
> oXMLHTTP.open("PROPFIND", strMailboxURI, False, strAlias, strPassword)
> oXMLHTTP.setRequestHeader("Content-type", "xml")
> oXMLHTTP.setRequestHeader("Depth", "1")
> oXMLHTTP.send()
> Dim XMLDocument As System.Xml.XmlDataDocument
> XMLDocument = New System.Xml.XmlDataDocument
> XMLDocument.LoadXml(oXMLHTTP.responseText)
> DisplayNameNodes1 = > XMLDocument.GetElementsByTagName("e:htmldescription")
> If DisplayNameNodes1.Count > 0 Then
> DisplayChildNodes = DisplayNameNodes1.Item(0).FirstChild
> strHTMLBody = DisplayChildNodes.InnerText()
> end if
>
> So if there were any emails within the inbox we used to get the html
> content
> stored with strHTMLBody for further processing.
>
> Something must have changed, and not the coding, but the process > stopped
> working, now when we run the same code we don't get any htmldescription
> tags
> at all within the XML document returned from Exchange.
>
> Would anyone have an idea why this might happen? Or suggestions for > using
> webdav another way to retrieve this information.
>
> A snippet of what is returned is this:
>
> <?xml version="1.0"?>
> <a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
> xmlns:c="xml:" xmlns:d="http://schemas.microsoft.com/repl/"
> xmlns:a="DAV:">
> <a:response>
> <a:href>http://10.88.12.240/exchange/andrewp/Inbox/</a:href>
> <a:propstat>
> <a:status>HTTP/1.1 200 OK</a:status>
> <a:prop>
> <a:contentclass>urn:content-classes:mailfolder</a:contentclass>
> <a:resourcetype><a:collection/></a:resourcetype>
> <a:creationdate
> b:dt="dateTime.tz">2005-12-10T03:33:34.399Z</a:creationdate>
> <a:ishidden b:dt="boolean">0</a:ishidden>
> <a:parentname>http://10.88.12.240/exchange/andrewp/</a:parentname>
> <a:getcontentlength b:dt="int">0</a:getcontentlength>
> <a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
> <d:repl-uid>rid:29e6d71fd57b954b90017edb46707ed4000000009f6d</d:repl-uid>
> <a:displayname>Inbox</a:displayname>
> <a:href>http://10.88.12.240/exchange/andrewp/Inbox/</a:href>
> <a:isreadonly b:dt="boolean">0</a:isreadonly>
> <a:getlastmodified
> b:dt="dateTime.tz">2007-03-14T19:56:33.853Z</a:getlastmodified>
> <a:iscollection b:dt="boolean">1</a:iscollection>
> <d:resourcetag>rt:29e6d71fd57b954b90017edb46707ed4000000009f6d29e6d71fd57b954b90017edb46707ed40000005b4952</d:resourcetag>
> </a:prop>
> </a:propstat>
> </a:response>
>
> Thanks in advance......
>
.
- References:
- Re: Webdav htmldescription tag missing from response
- From: Henning Krause [MVP - Exchange]
- Re: Webdav htmldescription tag missing from response
- From: Andrew
- Re: Webdav htmldescription tag missing from response
- Prev by Date: Re: Webdav htmldescription tag missing from response
- Next by Date: Create Mailitem with CDO (set from Address )
- Previous by thread: Re: Webdav htmldescription tag missing from response
- Next by thread: Create Mailitem with CDO (set from Address )
- Index(es):
Relevant Pages
|