Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Wed, 2 Jan 2008 21:27:00 -0800,    group: microsoft.public.exchange.development        back       


Need help to retrieve all properties of TASK item using WebDAV   
Hi Friends,

I am trying to retrieve all the properties of TASK item from exchange 2003 
using WebDAV by following below approach, but none of these approach retrieve 
all the properties of the TASK, even the main properties of TASK are not 
being returned.

a.Retrieve task information using Get method(mime approach).
I used Get method by specifying URI that identifies the TASK resource in 
exchange 2003 server. Here is the code snippet:

   string url= @"http://servername/exchange/user1/Tasks/Task1.EML";
   HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
   request.Credentials = new NetworkCredential(m_MyCredentials.UserName, 
m_MyCredentials.Password, m_MyCredentials.Domain);
   request.Method = "Get";
   request.Headers.Add("Translate", "f");
   request.ContentType = "message/rfc822";
   request.Headers.Add("Accept-Language", "en-us,en;q=0.5");
   request.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
   HttpWebResponse response = (HttpWebResponse)request.GetResponse();
         
Below is the mime response returned for the above request.

X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by ServerName.abc.com 
       id ; Mon, 8 Oct 2007 12:50:41 
+0530
Content-class: urn:content-classes:task
Subject: TestTask
Date: Sun, 7 Oct 2007 15:10:29 +0530
Message-ID: 
MIME-Version: 1.0
Content-Type: text/html;
       charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Test Task
Thread-Index: AcgIxhkwPZ3xINqlQROsujkigpecIg==
From: "User1" 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7638.1">
<TITLE>TestTask</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Ssdfsdfd </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsdf</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsd</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Fsd</FONT>
</P>
</BODY>
</HTML>
                   
b.	Retrieve task information using PROPFIND method(xml approach).

Tried following PROPFIND request to retrieve task properties of 
http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.Eml task.

<?xml version="1.0" ?> 
<D:propfind xmlns:D="DAV:" 
xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">
<D:allprop>
<dt:allprop /> 
</D:allprop>
</D:propfind>
                                  OR

<D:propfind xmlns:D="DAV:" xmlns:mapi="http:schemas.microsft.com/mapi/" 
xmlns:ex="http://schemas.microsoft.com/exchange/" 
xmlns:con="urn:schemas:contacts:" xmlns:cal="urn:schemas:calendar:" 
xmlns:mail="urn:schemas:httpmail:" xmlns:mailH="urn:schemas:mailheader:">
<D:allprop>
<mapi:allprop /> 
<ex:allprop /> 
<con:allprop /> 
<cal:allprop /> 
<mail:allprop /> 
<mailH:allprop /> 
</D:allprop>
</D:propfind>

Below is the xml response returned for the above request.

  <?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://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href> 
  <a:propstat>
  <a:status>HTTP/1.1 200 OK</a:status> 
  <a:prop>
  <a:contentclass>urn:content-classes:task</a:contentclass> 
  <a:getcontenttype>message/rfc822</a:getcontenttype> 
  <a:resourcetype /> 
  <a:creationdate 
b:dt="dateTime.tz">2007-10-07T09:39:42.406Z</a:creationdate> 
  <a:ishidden b:dt="boolean">0</a:ishidden> 
  
<a:parentname>http://ServerName/Exchange/User1@abc.com/Tasks/</a:parentname> 
  <a:getcontentlength b:dt="int">412</a:getcontentlength> 
  <a:isstructureddocument b:dt="boolean">0</a:isstructureddocument> 
  <d:repl-uid>rid:84930dbdb9b75b44abfbdbbb83438e15000001a20c03</d:repl-uid> 
  <a:displayname>TestTask.EML</a:displayname> 
  
<a:href>http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href> 
  <a:isreadonly b:dt="boolean">0</a:isreadonly> 
  <a:getlastmodified 
b:dt="dateTime.tz">2007-10-07T10:53:03.078Z</a:getlastmodified> 
  <a:iscollection b:dt="boolean">0</a:iscollection> 
  
<d:resourcetag>rt:84930dbdb9b75b44abfbdbbb83438e15000001a20c035e1cfd80a47e974c95bc6b61b9d5ebfb00000001f16b</d:resourcetag> </a:prop>
  </a:propstat>
  </a:response>
  </a:multistatus>

Both the above mime and xml response returned for the requested TASK item 
object do not have all the properties, not even the main properties of the 
TASK(like start date, due date etc). I know that by using PROPFIND or 
SEARCHREQUEST one could retrieve specific properties of the TASK by 
explicitly specifying property name in request xml, in this case I need to 
specify all the task properties in SearchRequest, which I want to avoid since 
I need all the available properties of the TASK.

Is there a way using which I could retrieve all the TASK properties without 
specifying each property explicitly? 
If yes, can that be applied to use mime and xml approach as mentioned above?

Any information on this would be helpful.

-Sumeet
date: Wed, 2 Jan 2008 21:27:00 -0800   author:   sumeetpk

Re: Need help to retrieve all properties of TASK item using WebDAV   
Your allprop query looks okay but i think the problem is your setting the 
contenttype for the allprop query to message/rfc822 you only want to do this 
when you want to get the stream of a RFC822 message (which will not include 
any Mapi properties) if you want to retrieve properties on a item set the 
content type to text/xml.

Cheers
Glen




"sumeetpk"  wrote in message 
news:A25A8588-5D24-4332-8BDC-AC128061CC52@microsoft.com...
> Hi Friends,
>
> I am trying to retrieve all the properties of TASK item from exchange 2003
> using WebDAV by following below approach, but none of these approach 
> retrieve
> all the properties of the TASK, even the main properties of TASK are not
> being returned.
>
> a.Retrieve task information using Get method(mime approach).
> I used Get method by specifying URI that identifies the TASK resource in
> exchange 2003 server. Here is the code snippet:
>
>   string url= @"http://servername/exchange/user1/Tasks/Task1.EML";
>   HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
>   request.Credentials = new NetworkCredential(m_MyCredentials.UserName,
> m_MyCredentials.Password, m_MyCredentials.Domain);
>   request.Method = "Get";
>   request.Headers.Add("Translate", "f");
>   request.ContentType = "message/rfc822";
>   request.Headers.Add("Accept-Language", "en-us,en;q=0.5");
>   request.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
>   HttpWebResponse response = (HttpWebResponse)request.GetResponse();
>
> Below is the mime response returned for the above request.
>
> X-MimeOLE: Produced By Microsoft Exchange V6.5
> Received: by ServerName.abc.com
>       id ; Mon, 8 Oct 2007 12:50:41
> +0530
> Content-class: urn:content-classes:task
> Subject: TestTask
> Date: Sun, 7 Oct 2007 15:10:29 +0530
> Message-ID: 
> MIME-Version: 1.0
> Content-Type: text/html;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> X-MS-Has-Attach:
> X-MS-TNEF-Correlator:
> Thread-Topic: Test Task
> Thread-Index: AcgIxhkwPZ3xINqlQROsujkigpecIg==
> From: "User1" 
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Diso-8859-1">
> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
> 6.5.7638.1">
> <TITLE>TestTask</TITLE>
> </HEAD>
> <BODY>
> <!-- Converted from text/rtf format -->
>
> <P><FONT SIZE=3D2 FACE=3D"Arial">Ssdfsdfd </FONT>
> <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsdf</FONT>
> <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsd</FONT>
> <BR><FONT SIZE=3D2 FACE=3D"Arial">Fsd</FONT>
> </P>
> </BODY>
> </HTML>
>
> b. Retrieve task information using PROPFIND method(xml approach).
>
> Tried following PROPFIND request to retrieve task properties of
> http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.Eml task.
>
> <?xml version="1.0" ?>
> <D:propfind xmlns:D="DAV:"
> xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">
> <D:allprop>
> <dt:allprop />
> </D:allprop>
> </D:propfind>
>                                  OR
>
> <D:propfind xmlns:D="DAV:" xmlns:mapi="http:schemas.microsft.com/mapi/"
> xmlns:ex="http://schemas.microsoft.com/exchange/"
> xmlns:con="urn:schemas:contacts:" xmlns:cal="urn:schemas:calendar:"
> xmlns:mail="urn:schemas:httpmail:" xmlns:mailH="urn:schemas:mailheader:">
> <D:allprop>
> <mapi:allprop />
> <ex:allprop />
> <con:allprop />
> <cal:allprop />
> <mail:allprop />
> <mailH:allprop />
> </D:allprop>
> </D:propfind>
>
> Below is the xml response returned for the above request.
>
>  <?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://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
>  <a:propstat>
>  <a:status>HTTP/1.1 200 OK</a:status>
>  <a:prop>
>  <a:contentclass>urn:content-classes:task</a:contentclass>
>  <a:getcontenttype>message/rfc822</a:getcontenttype>
>  <a:resourcetype />
>  <a:creationdate
> b:dt="dateTime.tz">2007-10-07T09:39:42.406Z</a:creationdate>
>  <a:ishidden b:dt="boolean">0</a:ishidden>
>
> <a:parentname>http://ServerName/Exchange/User1@abc.com/Tasks/</a:parentname>
>  <a:getcontentlength b:dt="int">412</a:getcontentlength>
>  <a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
>  <d:repl-uid>rid:84930dbdb9b75b44abfbdbbb83438e15000001a20c03</d:repl-uid>
>  <a:displayname>TestTask.EML</a:displayname>
>
> <a:href>http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
>  <a:isreadonly b:dt="boolean">0</a:isreadonly>
>  <a:getlastmodified
> b:dt="dateTime.tz">2007-10-07T10:53:03.078Z</a:getlastmodified>
>  <a:iscollection b:dt="boolean">0</a:iscollection>
>
> <d:resourcetag>rt:84930dbdb9b75b44abfbdbbb83438e15000001a20c035e1cfd80a47e974c95bc6b61b9d5ebfb00000001f16b</d:resourcetag> 
> </a:prop>
>  </a:propstat>
>  </a:response>
>  </a:multistatus>
>
> Both the above mime and xml response returned for the requested TASK item
> object do not have all the properties, not even the main properties of the
> TASK(like start date, due date etc). I know that by using PROPFIND or
> SEARCHREQUEST one could retrieve specific properties of the TASK by
> explicitly specifying property name in request xml, in this case I need to
> specify all the task properties in SearchRequest, which I want to avoid 
> since
> I need all the available properties of the TASK.
>
> Is there a way using which I could retrieve all the TASK properties 
> without
> specifying each property explicitly?
> If yes, can that be applied to use mime and xml approach as mentioned 
> above?
>
> Any information on this would be helpful.
>
> -Sumeet
date: Tue, 8 Jan 2008 09:17:09 +1100   author:   Glen Scales [MVP]

Re: Need help to retrieve all properties of TASK item using WebDAV   
Thanks Glen for your response…

 We are setting the HttpWebRequest.ContentType to “text/xml” even though the 
above query doesn’t return all the properties of Task, not even the main 
properties of the Task. Although we are able to retrieve all the properties 
of Contact by following same query and approach, but when that is applied to 
Task it doesn’t work:(

-Sumeet

"Glen Scales [MVP]" wrote:

> Your allprop query looks okay but i think the problem is your setting the 
> contenttype for the allprop query to message/rfc822 you only want to do this 
> when you want to get the stream of a RFC822 message (which will not include 
> any Mapi properties) if you want to retrieve properties on a item set the 
> content type to text/xml.
> 
> Cheers
> Glen
> 
> 
> 
> 
> "sumeetpk"  wrote in message 
> news:A25A8588-5D24-4332-8BDC-AC128061CC52@microsoft.com...
> > Hi Friends,
> >
> > I am trying to retrieve all the properties of TASK item from exchange 2003
> > using WebDAV by following below approach, but none of these approach 
> > retrieve
> > all the properties of the TASK, even the main properties of TASK are not
> > being returned.
> >
> > a.Retrieve task information using Get method(mime approach).
> > I used Get method by specifying URI that identifies the TASK resource in
> > exchange 2003 server. Here is the code snippet:
> >
> >   string url= @"http://servername/exchange/user1/Tasks/Task1.EML";
> >   HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
> >   request.Credentials = new NetworkCredential(m_MyCredentials.UserName,
> > m_MyCredentials.Password, m_MyCredentials.Domain);
> >   request.Method = "Get";
> >   request.Headers.Add("Translate", "f");
> >   request.ContentType = "message/rfc822";
> >   request.Headers.Add("Accept-Language", "en-us,en;q=0.5");
> >   request.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
> >   HttpWebResponse response = (HttpWebResponse)request.GetResponse();
> >
> > Below is the mime response returned for the above request.
> >
> > X-MimeOLE: Produced By Microsoft Exchange V6.5
> > Received: by ServerName.abc.com
> >       id ; Mon, 8 Oct 2007 12:50:41
> > +0530
> > Content-class: urn:content-classes:task
> > Subject: TestTask
> > Date: Sun, 7 Oct 2007 15:10:29 +0530
> > Message-ID: 
> > MIME-Version: 1.0
> > Content-Type: text/html;
> >       charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> > X-MS-Has-Attach:
> > X-MS-TNEF-Correlator:
> > Thread-Topic: Test Task
> > Thread-Index: AcgIxhkwPZ3xINqlQROsujkigpecIg==
> > From: "User1" 
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> > <HTML>
> > <HEAD>
> > <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> > charset=3Diso-8859-1">
> > <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
> > 6.5.7638.1">
> > <TITLE>TestTask</TITLE>
> > </HEAD>
> > <BODY>
> > <!-- Converted from text/rtf format -->
> >
> > <P><FONT SIZE=3D2 FACE=3D"Arial">Ssdfsdfd </FONT>
> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsdf</FONT>
> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsd</FONT>
> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Fsd</FONT>
> > </P>
> > </BODY>
> > </HTML>
> >
> > b. Retrieve task information using PROPFIND method(xml approach).
> >
> > Tried following PROPFIND request to retrieve task properties of
> > http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.Eml task.
> >
> > <?xml version="1.0" ?>
> > <D:propfind xmlns:D="DAV:"
> > xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">
> > <D:allprop>
> > <dt:allprop />
> > </D:allprop>
> > </D:propfind>
> >                                  OR
> >
> > <D:propfind xmlns:D="DAV:" xmlns:mapi="http:schemas.microsft.com/mapi/"
> > xmlns:ex="http://schemas.microsoft.com/exchange/"
> > xmlns:con="urn:schemas:contacts:" xmlns:cal="urn:schemas:calendar:"
> > xmlns:mail="urn:schemas:httpmail:" xmlns:mailH="urn:schemas:mailheader:">
> > <D:allprop>
> > <mapi:allprop />
> > <ex:allprop />
> > <con:allprop />
> > <cal:allprop />
> > <mail:allprop />
> > <mailH:allprop />
> > </D:allprop>
> > </D:propfind>
> >
> > Below is the xml response returned for the above request.
> >
> >  <?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://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
> >  <a:propstat>
> >  <a:status>HTTP/1.1 200 OK</a:status>
> >  <a:prop>
> >  <a:contentclass>urn:content-classes:task</a:contentclass>
> >  <a:getcontenttype>message/rfc822</a:getcontenttype>
> >  <a:resourcetype />
> >  <a:creationdate
> > b:dt="dateTime.tz">2007-10-07T09:39:42.406Z</a:creationdate>
> >  <a:ishidden b:dt="boolean">0</a:ishidden>
> >
> > <a:parentname>http://ServerName/Exchange/User1@abc.com/Tasks/</a:parentname>
> >  <a:getcontentlength b:dt="int">412</a:getcontentlength>
> >  <a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
> >  <d:repl-uid>rid:84930dbdb9b75b44abfbdbbb83438e15000001a20c03</d:repl-uid>
> >  <a:displayname>TestTask.EML</a:displayname>
> >
> > <a:href>http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
> >  <a:isreadonly b:dt="boolean">0</a:isreadonly>
> >  <a:getlastmodified
> > b:dt="dateTime.tz">2007-10-07T10:53:03.078Z</a:getlastmodified>
> >  <a:iscollection b:dt="boolean">0</a:iscollection>
> >
> > <d:resourcetag>rt:84930dbdb9b75b44abfbdbbb83438e15000001a20c035e1cfd80a47e974c95bc6b61b9d5ebfb00000001f16b</d:resourcetag> 
> > </a:prop>
> >  </a:propstat>
> >  </a:response>
> >  </a:multistatus>
> >
> > Both the above mime and xml response returned for the requested TASK item
> > object do not have all the properties, not even the main properties of the
> > TASK(like start date, due date etc). I know that by using PROPFIND or
> > SEARCHREQUEST one could retrieve specific properties of the TASK by
> > explicitly specifying property name in request xml, in this case I need to
> > specify all the task properties in SearchRequest, which I want to avoid 
> > since
> > I need all the available properties of the TASK.
> >
> > Is there a way using which I could retrieve all the TASK properties 
> > without
> > specifying each property explicitly?
> > If yes, can that be applied to use mime and xml approach as mentioned 
> > above?
> >
> > Any information on this would be helpful.
> >
> > -Sumeet 
> 
> 
>
date: Wed, 9 Jan 2008 01:52:01 -0800   author:   sumeetpk

Re: Need help to retrieve all properties of TASK item using WebDAV   
It propbably means there's nothing wrong with your query then what you might 
want to look at is to use something like fiddler to look at the quieries 
that OWA uses which might help eg

<searchrequest xmlns="DAV:"><sql>SELECT 
"http://schemas.microsoft.com/exchange/smallicon" as p1, 
"http://schemas.microsoft.com/exchange/tasks/status" as taskcomplete, 
"http://schemas.microsoft.com/mapi/subject" as p3, 
"http://schemas.microsoft.com/mapi/commonend" as taskdue, 
"http://schemas.microsoft.com/exchange/tasks/ownership" as p5, 
"http://schemas.microsoft.com/exchange/tasks/is_recurring" as p6, 
"http://schemas.microsoft.com/exchange/tasks/deadoccur" as 
p7,"urn:schemas:httpmail:read" as r, 
"http://schemas.microsoft.com/exchange/outlookmessageclass" as 
m,"http://schemas.microsoft.com/exchange/tasks/ownership" as taskownership, 
"http://schemas.microsoft.com/exchange/tasks/deadoccur" as taskdeadoccur, 
"http://schemas.microsoft.com/exchange/tasks/is_recurring" as taskrecur
FROM Scope('SHALLOW TRAVERSAL OF ""')
WHERE "http://schemas.microsoft.com/mapi/proptag/0x67aa000b" = false AND 
"DAV:isfolder" = false
ORDER BY "http://schemas.microsoft.com/mapi/commonend" DESC, 
"urn:schemas:httpmail:datereceived" DESC
</sql><range type="row">0-24</range></searchrequest>

Cheers
Glen



"sumeetpk"  wrote in message 
news:1EEA21D4-D422-4578-A5C2-DA8E644ECFC0@microsoft.com...
> Thanks Glen for your response.
>
> We are setting the HttpWebRequest.ContentType to "text/xml" even though 
> the
> above query doesn't return all the properties of Task, not even the main
> properties of the Task. Although we are able to retrieve all the 
> properties
> of Contact by following same query and approach, but when that is applied 
> to
> Task it doesn't work:(
>
> -Sumeet
>
> "Glen Scales [MVP]" wrote:
>
>> Your allprop query looks okay but i think the problem is your setting the
>> contenttype for the allprop query to message/rfc822 you only want to do 
>> this
>> when you want to get the stream of a RFC822 message (which will not 
>> include
>> any Mapi properties) if you want to retrieve properties on a item set the
>> content type to text/xml.
>>
>> Cheers
>> Glen
>>
>>
>>
>>
>> "sumeetpk"  wrote in message
>> news:A25A8588-5D24-4332-8BDC-AC128061CC52@microsoft.com...
>> > Hi Friends,
>> >
>> > I am trying to retrieve all the properties of TASK item from exchange 
>> > 2003
>> > using WebDAV by following below approach, but none of these approach
>> > retrieve
>> > all the properties of the TASK, even the main properties of TASK are 
>> > not
>> > being returned.
>> >
>> > a.Retrieve task information using Get method(mime approach).
>> > I used Get method by specifying URI that identifies the TASK resource 
>> > in
>> > exchange 2003 server. Here is the code snippet:
>> >
>> >   string url= @"http://servername/exchange/user1/Tasks/Task1.EML";
>> >   HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
>> >   request.Credentials = new NetworkCredential(m_MyCredentials.UserName,
>> > m_MyCredentials.Password, m_MyCredentials.Domain);
>> >   request.Method = "Get";
>> >   request.Headers.Add("Translate", "f");
>> >   request.ContentType = "message/rfc822";
>> >   request.Headers.Add("Accept-Language", "en-us,en;q=0.5");
>> >   request.Headers.Add("Accept-Charset", 
>> > "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
>> >   HttpWebResponse response = (HttpWebResponse)request.GetResponse();
>> >
>> > Below is the mime response returned for the above request.
>> >
>> > X-MimeOLE: Produced By Microsoft Exchange V6.5
>> > Received: by ServerName.abc.com
>> >       id ; Mon, 8 Oct 2007 
>> > 12:50:41
>> > +0530
>> > Content-class: urn:content-classes:task
>> > Subject: TestTask
>> > Date: Sun, 7 Oct 2007 15:10:29 +0530
>> > Message-ID: 
>> > 
>> > MIME-Version: 1.0
>> > Content-Type: text/html;
>> >       charset="iso-8859-1"
>> > Content-Transfer-Encoding: quoted-printable
>> > X-MS-Has-Attach:
>> > X-MS-TNEF-Correlator:
>> > Thread-Topic: Test Task
>> > Thread-Index: AcgIxhkwPZ3xINqlQROsujkigpecIg==
>> > From: "User1" 
>> >
>> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
>> > <HTML>
>> > <HEAD>
>> > <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
>> > charset=3Diso-8859-1">
>> > <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
>> > 6.5.7638.1">
>> > <TITLE>TestTask</TITLE>
>> > </HEAD>
>> > <BODY>
>> > <!-- Converted from text/rtf format -->
>> >
>> > <P><FONT SIZE=3D2 FACE=3D"Arial">Ssdfsdfd </FONT>
>> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsdf</FONT>
>> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsd</FONT>
>> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Fsd</FONT>
>> > </P>
>> > </BODY>
>> > </HTML>
>> >
>> > b. Retrieve task information using PROPFIND method(xml approach).
>> >
>> > Tried following PROPFIND request to retrieve task properties of
>> > http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.Eml task.
>> >
>> > <?xml version="1.0" ?>
>> > <D:propfind xmlns:D="DAV:"
>> > xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">
>> > <D:allprop>
>> > <dt:allprop />
>> > </D:allprop>
>> > </D:propfind>
>> >                                  OR
>> >
>> > <D:propfind xmlns:D="DAV:" xmlns:mapi="http:schemas.microsft.com/mapi/"
>> > xmlns:ex="http://schemas.microsoft.com/exchange/"
>> > xmlns:con="urn:schemas:contacts:" xmlns:cal="urn:schemas:calendar:"
>> > xmlns:mail="urn:schemas:httpmail:" 
>> > xmlns:mailH="urn:schemas:mailheader:">
>> > <D:allprop>
>> > <mapi:allprop />
>> > <ex:allprop />
>> > <con:allprop />
>> > <cal:allprop />
>> > <mail:allprop />
>> > <mailH:allprop />
>> > </D:allprop>
>> > </D:propfind>
>> >
>> > Below is the xml response returned for the above request.
>> >
>> >  <?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://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
>> >  <a:propstat>
>> >  <a:status>HTTP/1.1 200 OK</a:status>
>> >  <a:prop>
>> >  <a:contentclass>urn:content-classes:task</a:contentclass>
>> >  <a:getcontenttype>message/rfc822</a:getcontenttype>
>> >  <a:resourcetype />
>> >  <a:creationdate
>> > b:dt="dateTime.tz">2007-10-07T09:39:42.406Z</a:creationdate>
>> >  <a:ishidden b:dt="boolean">0</a:ishidden>
>> >
>> > <a:parentname>http://ServerName/Exchange/User1@abc.com/Tasks/</a:parentname>
>> >  <a:getcontentlength b:dt="int">412</a:getcontentlength>
>> >  <a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
>> > 
>> > <d:repl-uid>rid:84930dbdb9b75b44abfbdbbb83438e15000001a20c03</d:repl-uid>
>> >  <a:displayname>TestTask.EML</a:displayname>
>> >
>> > <a:href>http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
>> >  <a:isreadonly b:dt="boolean">0</a:isreadonly>
>> >  <a:getlastmodified
>> > b:dt="dateTime.tz">2007-10-07T10:53:03.078Z</a:getlastmodified>
>> >  <a:iscollection b:dt="boolean">0</a:iscollection>
>> >
>> > <d:resourcetag>rt:84930dbdb9b75b44abfbdbbb83438e15000001a20c035e1cfd80a47e974c95bc6b61b9d5ebfb00000001f16b</d:resourcetag>
>> > </a:prop>
>> >  </a:propstat>
>> >  </a:response>
>> >  </a:multistatus>
>> >
>> > Both the above mime and xml response returned for the requested TASK 
>> > item
>> > object do not have all the properties, not even the main properties of 
>> > the
>> > TASK(like start date, due date etc). I know that by using PROPFIND or
>> > SEARCHREQUEST one could retrieve specific properties of the TASK by
>> > explicitly specifying property name in request xml, in this case I need 
>> > to
>> > specify all the task properties in SearchRequest, which I want to avoid
>> > since
>> > I need all the available properties of the TASK.
>> >
>> > Is there a way using which I could retrieve all the TASK properties
>> > without
>> > specifying each property explicitly?
>> > If yes, can that be applied to use mime and xml approach as mentioned
>> > above?
>> >
>> > Any information on this would be helpful.
>> >
>> > -Sumeet
>>
>>
>>
date: Thu, 10 Jan 2008 15:51:59 +1100   author:   Glen Scales [MVP]

Re: Need help to retrieve all properties of TASK item using WebDAV   
Thanks Glenn....

We believe the above query will retrieve only the properties explicitly 
specified in searchrequest and will not return all the properties of the 
Task.We are doing the same thing as specified – this retrieves task property 
which has been specified in Search request.

Facing same issue for Notes and Journal items where all the properties are 
not retrieved using propallL:(

Thanks
-Sumeet

"Glen Scales [MVP]" wrote:

> It propbably means there's nothing wrong with your query then what you might 
> want to look at is to use something like fiddler to look at the quieries 
> that OWA uses which might help eg
> 
> <searchrequest xmlns="DAV:"><sql>SELECT 
> "http://schemas.microsoft.com/exchange/smallicon" as p1, 
> "http://schemas.microsoft.com/exchange/tasks/status" as taskcomplete, 
> "http://schemas.microsoft.com/mapi/subject" as p3, 
> "http://schemas.microsoft.com/mapi/commonend" as taskdue, 
> "http://schemas.microsoft.com/exchange/tasks/ownership" as p5, 
> "http://schemas.microsoft.com/exchange/tasks/is_recurring" as p6, 
> "http://schemas.microsoft.com/exchange/tasks/deadoccur" as 
> p7,"urn:schemas:httpmail:read" as r, 
> "http://schemas.microsoft.com/exchange/outlookmessageclass" as 
> m,"http://schemas.microsoft.com/exchange/tasks/ownership" as taskownership, 
> "http://schemas.microsoft.com/exchange/tasks/deadoccur" as taskdeadoccur, 
> "http://schemas.microsoft.com/exchange/tasks/is_recurring" as taskrecur
> FROM Scope('SHALLOW TRAVERSAL OF ""')
> WHERE "http://schemas.microsoft.com/mapi/proptag/0x67aa000b" = false AND 
> "DAV:isfolder" = false
> ORDER BY "http://schemas.microsoft.com/mapi/commonend" DESC, 
> "urn:schemas:httpmail:datereceived" DESC
> </sql><range type="row">0-24</range></searchrequest>
> 
> Cheers
> Glen
> 
> 
> 
> "sumeetpk"  wrote in message 
> news:1EEA21D4-D422-4578-A5C2-DA8E644ECFC0@microsoft.com...
> > Thanks Glen for your response.
> >
> > We are setting the HttpWebRequest.ContentType to "text/xml" even though 
> > the
> > above query doesn't return all the properties of Task, not even the main
> > properties of the Task. Although we are able to retrieve all the 
> > properties
> > of Contact by following same query and approach, but when that is applied 
> > to
> > Task it doesn't work:(
> >
> > -Sumeet
> >
> > "Glen Scales [MVP]" wrote:
> >
> >> Your allprop query looks okay but i think the problem is your setting the
> >> contenttype for the allprop query to message/rfc822 you only want to do 
> >> this
> >> when you want to get the stream of a RFC822 message (which will not 
> >> include
> >> any Mapi properties) if you want to retrieve properties on a item set the
> >> content type to text/xml.
> >>
> >> Cheers
> >> Glen
> >>
> >>
> >>
> >>
> >> "sumeetpk"  wrote in message
> >> news:A25A8588-5D24-4332-8BDC-AC128061CC52@microsoft.com...
> >> > Hi Friends,
> >> >
> >> > I am trying to retrieve all the properties of TASK item from exchange 
> >> > 2003
> >> > using WebDAV by following below approach, but none of these approach
> >> > retrieve
> >> > all the properties of the TASK, even the main properties of TASK are 
> >> > not
> >> > being returned.
> >> >
> >> > a.Retrieve task information using Get method(mime approach).
> >> > I used Get method by specifying URI that identifies the TASK resource 
> >> > in
> >> > exchange 2003 server. Here is the code snippet:
> >> >
> >> >   string url= @"http://servername/exchange/user1/Tasks/Task1.EML";
> >> >   HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
> >> >   request.Credentials = new NetworkCredential(m_MyCredentials.UserName,
> >> > m_MyCredentials.Password, m_MyCredentials.Domain);
> >> >   request.Method = "Get";
> >> >   request.Headers.Add("Translate", "f");
> >> >   request.ContentType = "message/rfc822";
> >> >   request.Headers.Add("Accept-Language", "en-us,en;q=0.5");
> >> >   request.Headers.Add("Accept-Charset", 
> >> > "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
> >> >   HttpWebResponse response = (HttpWebResponse)request.GetResponse();
> >> >
> >> > Below is the mime response returned for the above request.
> >> >
> >> > X-MimeOLE: Produced By Microsoft Exchange V6.5
> >> > Received: by ServerName.abc.com
> >> >       id ; Mon, 8 Oct 2007 
> >> > 12:50:41
> >> > +0530
> >> > Content-class: urn:content-classes:task
> >> > Subject: TestTask
> >> > Date: Sun, 7 Oct 2007 15:10:29 +0530
> >> > Message-ID: 
> >> > 
> >> > MIME-Version: 1.0
> >> > Content-Type: text/html;
> >> >       charset="iso-8859-1"
> >> > Content-Transfer-Encoding: quoted-printable
> >> > X-MS-Has-Attach:
> >> > X-MS-TNEF-Correlator:
> >> > Thread-Topic: Test Task
> >> > Thread-Index: AcgIxhkwPZ3xINqlQROsujkigpecIg==
> >> > From: "User1" 
> >> >
> >> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> >> > <HTML>
> >> > <HEAD>
> >> > <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> >> > charset=3Diso-8859-1">
> >> > <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
> >> > 6.5.7638.1">
> >> > <TITLE>TestTask</TITLE>
> >> > </HEAD>
> >> > <BODY>
> >> > <!-- Converted from text/rtf format -->
> >> >
> >> > <P><FONT SIZE=3D2 FACE=3D"Arial">Ssdfsdfd </FONT>
> >> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsdf</FONT>
> >> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Sdfsd</FONT>
> >> > <BR><FONT SIZE=3D2 FACE=3D"Arial">Fsd</FONT>
> >> > </P>
> >> > </BODY>
> >> > </HTML>
> >> >
> >> > b. Retrieve task information using PROPFIND method(xml approach).
> >> >
> >> > Tried following PROPFIND request to retrieve task properties of
> >> > http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.Eml task.
> >> >
> >> > <?xml version="1.0" ?>
> >> > <D:propfind xmlns:D="DAV:"
> >> > xmlns:dt="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/">
> >> > <D:allprop>
> >> > <dt:allprop />
> >> > </D:allprop>
> >> > </D:propfind>
> >> >                                  OR
> >> >
> >> > <D:propfind xmlns:D="DAV:" xmlns:mapi="http:schemas.microsft.com/mapi/"
> >> > xmlns:ex="http://schemas.microsoft.com/exchange/"
> >> > xmlns:con="urn:schemas:contacts:" xmlns:cal="urn:schemas:calendar:"
> >> > xmlns:mail="urn:schemas:httpmail:" 
> >> > xmlns:mailH="urn:schemas:mailheader:">
> >> > <D:allprop>
> >> > <mapi:allprop />
> >> > <ex:allprop />
> >> > <con:allprop />
> >> > <cal:allprop />
> >> > <mail:allprop />
> >> > <mailH:allprop />
> >> > </D:allprop>
> >> > </D:propfind>
> >> >
> >> > Below is the xml response returned for the above request.
> >> >
> >> >  <?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://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
> >> >  <a:propstat>
> >> >  <a:status>HTTP/1.1 200 OK</a:status>
> >> >  <a:prop>
> >> >  <a:contentclass>urn:content-classes:task</a:contentclass>
> >> >  <a:getcontenttype>message/rfc822</a:getcontenttype>
> >> >  <a:resourcetype />
> >> >  <a:creationdate
> >> > b:dt="dateTime.tz">2007-10-07T09:39:42.406Z</a:creationdate>
> >> >  <a:ishidden b:dt="boolean">0</a:ishidden>
> >> >
> >> > <a:parentname>http://ServerName/Exchange/User1@abc.com/Tasks/</a:parentname>
> >> >  <a:getcontentlength b:dt="int">412</a:getcontentlength>
> >> >  <a:isstructureddocument b:dt="boolean">0</a:isstructureddocument>
> >> > 
> >> > <d:repl-uid>rid:84930dbdb9b75b44abfbdbbb83438e15000001a20c03</d:repl-uid>
> >> >  <a:displayname>TestTask.EML</a:displayname>
> >> >
> >> > <a:href>http://ServerName/Exchange/User1@abc.com/Tasks/TestTask.EML</a:href>
> >> >  <a:isreadonly b:dt="boolean">0</a:isreadonly>
> >> >  <a:getlastmodified
> >> > b:dt="dateTime.tz">2007-10-07T10:53:03.078Z</a:getlastmodified>
> >> >  <a:iscollection b:dt="boolean">0</a:iscollection>
> >> >
> >> > <d:resourcetag>rt:84930dbdb9b75b44abfbdbbb83438e15000001a20c035e1cfd80a47e974c95bc6b61b9d5ebfb00000001f16b</d:resourcetag>
> >> > </a:prop>
> >> >  </a:propstat>
> >> >  </a:response>
> >> >  </a:multistatus>
> >> >
> >> > Both the above mime and xml response returned for the requested TASK 
> >> > item
> >> > object do not have all the properties, not even the main properties of 
> >> > the
> >> > TASK(like start date, due date etc). I know that by using PROPFIND or
> >> > SEARCHREQUEST one could retrieve specific properties of the TASK by
> >> > explicitly specifying property name in request xml, in this case I need 
> >> > to
> >> > specify all the task properties in SearchRequest, which I want to avoid
> >> > since
> >> > I need all the available properties of the TASK.
> >> >
> >> > Is there a way using which I could retrieve all the TASK properties
> >> > without
> >> > specifying each property explicitly?
> >> > If yes, can that be applied to use mime and xml approach as mentioned
> >> > above?
> >> >
> >> > Any information on this would be helpful.
> >> >
> >> > -Sumeet
> >>
> >>
> >> 
> 
> 
>
date: Thu, 10 Jan 2008 07:30:02 -0800   author:   sumeetpk

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us