Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Applications / March 2007

Tip: Looking for answers? Try searching our database.

Webdav htmldescription tag missing from response

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew - 15 Mar 2007 06:08 GMT
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......
Henning Krause [MVP - Exchange] - 15 Mar 2007 14:25 GMT
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

> We have some code that's reading HTML emails from an exchange mailbox
> using
[quoted text clipped - 61 lines]
>
> Thanks in advance......
Andrew - 15 Mar 2007 22:34 GMT
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%20applic
ation.%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........

> Hello,
>
[quoted text clipped - 72 lines]
> >
> > Thanks in advance......
Henning Krause [MVP - Exchange] - 16 Mar 2007 05:50 GMT
Hi Andrew,

you are quering the wrong properties.

Instead of DAV:htmldescriptions, you must query
urn:schemas:httpmail:htmldescription

Best regards,
Henning Krause

> Thanks Henning,
>
[quoted text clipped - 115 lines]
>> >
>> > Thanks in advance......
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.