K
KovaiRam
Hi,
I need to create and process appointments on the exchange 2003 server.
I am using Apache Slide as my Webdav client to access Exchange 2003
server.
When I try to change a property of an existing appointment and I get
'200 OK' response back.
But actually I don't see the appointment get changed(on the outlook).
Here is the code snippet using the Apache Slide client.
Hashtable props = new Hashtable();
props.put(new
PropertyName("DAV:","contentclass"),"urn:content-classes:appointment");
props.put(new
PropertyName("http//schemas.microsoft.com/exchange","outlookmessageclass"),"IPM.Appointment");
props.put(new PropertyName("urn:schemas:httpmail","subject"),"Changed
Test Appointment Subject");
//I am commenting this to check date fields should not create problems.
/*props.put(new
PropertyName("urn:schemas:httpmail","htmldescription"),"Let's meet
here");
props.put(new PropertyName("urn:schemas:calendar","dtstart")
,"2005-01-26T10:00:00.000Z");
props.put(new PropertyName("urn:schemas:calendar","dtend")
,"2005-01-26T10:30:00.000Z");
props.put(new PropertyName("urn:schemas:calendar","instancetype"),"0");
props.put(new
PropertyName("urn:schemas:calendar","busystatus"),"BUSY");
props.put(new
PropertyName("urn:schemas:calendar","meetingstatus"),"CONFIRMED");
*/
props.put(new PropertyName("header","to"),"user");
props.put(new PropertyName("urn:schemas:httpmail","finvited"),"1");
System.out.println("returned value ...
"+wr.proppatchMethod(props,true));
Do I need to change anything on the Exchange 2003 server to make it
work ?
Is there anything wrong in the XML request ?
Any help would be greatly appreciated.(If you have any code examples,
please post it)
Here are the XMLs from the debug mode.
-------------------------------------------------------------------------------------------------
PROPPATCH /exchange/username/Calendar/slideTestSubject.EML HTTP/1.1
Authorization: Basic Y29ucm9tOmN2YkAjJA==
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: 0.0.0.0
Content-Length: 449
<Dropertyupdate xmlns="DAV:">
<D:set>
<Drop>
<D:contentclass>
urn:content-classes:appointment
</D:contentclass>
<to xmlns="header">
user
</to>
<finvited xmlns="urn:schemas:httpmail">
1
</finvited>
<outlookmessageclass
xmlns="http//schemas.microsoft.com/exchange">
IPM.Appointment
</outlookmessageclass>
<subject xmlns="urn:schemas:httpmail">
Changed Test Appointment Subject
</subject>
</Drop>
</D:set>
</Dropertyupdate>
------------------------------------------------------------------------
<<<<<<< from server
---------------------------------------------------
HTTP/1.1 207 Multi-Status
Date: Thu, 27 Jan 2005 16:18:49 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MS-Exchange-Permanent-URL:
http://0.0.0.0/exchange/username/-FlatUrlSpace-/10
af9647e5ed624ea30b34945fdbb7d0-7fdf72/597d2b3630b5564c94fc5cff14fd63bf-7905a4
Repl-UID: <rid:597d2b3630b5564c94fc5cff14fd63bf0000007905a4>
Content-Type: text/xml
Content-Length: 420
ResourceTag:
<rt:597d2b3630b5564c94fc5cff14fd63bf0000007905a4597d2b3630b5564c94f
c5cff14fd63bf0000009f62c0>
MS-WebStorage: 6.5.7226
<a:multistatus
xmlns:a="DAV:"
xmlns:b="header"
xmlns:c="urn:schemas:httpmail"
xmlns:d="http//schemas.microsoft.com/exchange">
<a:response>
<a:href>
http://0.0.0.0/exchange/username/Calendar/slideTestSubject.EML
</a:href>
<aropstat>
<a:status>
HTTP/1.1 200 OK
</a:status>
<arop>
<a:contentclass>
</a:contentclass>
<b:to>
</b:to>
<c:finvited>
</c:finvited>
<dutlookmessageclass>
</dutlookmessageclass>
<c:subject>
</c:subject>
</arop>
</aropstat>
</a:response>
---------------------------------------------------
PROPFIND /exchange/username/Calendar/slideTestSubject.EML HTTP/1.1
Authorization: Basic Y29ucm9tOmN2YkAjJA==
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: 0.0.0.0
Content-Length: 207
Depth: 0
<Dropfind xmlns="DAV:">
<Drop>
<D:displayname>
</D:displayname>
<D:getcontentlength>
</D:getcontentlength>
<D:getcontenttype>
</D:getcontenttype>
<D:resourcetype>
</D:resourcetype>
<D:getlastmodified>
</D:getlastmodified>
<D:lockdiscovery>
</D:lockdiscovery>
</Drop>
</Dropfind>
------------------------------------------------------------------------
<<<<<<< from server
---------------------------------------------------
HTTP/1.1 207 Multi-Status
Date: Thu, 27 Jan 2005 16:18:49 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Type: text/xml
Accept-Ranges: rows
MS-WebStorage: 6.5.7226
Transfer-Encoding: chunked
<a:multistatus
xmlns:a="DAV:"
xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:c="xml:">
<a:response>
<a:href>
http://0.0.0.0/exchange/username/Calendar/slideTestSubject.EML
</a:href>
<aropstat>
<a:status>
HTTP/1.1 200 OK
</a:status>
<arop>
<a:displayname>
slideTestSubject.EML
</a:displayname>
<a:getcontentlength b:dt="int">
651
</a:getcontentlength>
<a:getcontenttype>
message/rfc822
</a:getcontenttype>
<a:resourcetype>
</a:resourcetype>
<a:getlastmodified b:dt="dateTime.tz">
2005-01-27T16:18:49.567Z
</a:getlastmodified>
<lockdiscovery xmlns="DAV:">
</lockdiscovery>
</arop>
</aropstat>
</a:response>
</a:multistatus>
I need to create and process appointments on the exchange 2003 server.
I am using Apache Slide as my Webdav client to access Exchange 2003
server.
When I try to change a property of an existing appointment and I get
'200 OK' response back.
But actually I don't see the appointment get changed(on the outlook).
Here is the code snippet using the Apache Slide client.
Hashtable props = new Hashtable();
props.put(new
PropertyName("DAV:","contentclass"),"urn:content-classes:appointment");
props.put(new
PropertyName("http//schemas.microsoft.com/exchange","outlookmessageclass"),"IPM.Appointment");
props.put(new PropertyName("urn:schemas:httpmail","subject"),"Changed
Test Appointment Subject");
//I am commenting this to check date fields should not create problems.
/*props.put(new
PropertyName("urn:schemas:httpmail","htmldescription"),"Let's meet
here");
props.put(new PropertyName("urn:schemas:calendar","dtstart")
,"2005-01-26T10:00:00.000Z");
props.put(new PropertyName("urn:schemas:calendar","dtend")
,"2005-01-26T10:30:00.000Z");
props.put(new PropertyName("urn:schemas:calendar","instancetype"),"0");
props.put(new
PropertyName("urn:schemas:calendar","busystatus"),"BUSY");
props.put(new
PropertyName("urn:schemas:calendar","meetingstatus"),"CONFIRMED");
*/
props.put(new PropertyName("header","to"),"user");
props.put(new PropertyName("urn:schemas:httpmail","finvited"),"1");
System.out.println("returned value ...
"+wr.proppatchMethod(props,true));
Do I need to change anything on the Exchange 2003 server to make it
work ?
Is there anything wrong in the XML request ?
Any help would be greatly appreciated.(If you have any code examples,
please post it)
Here are the XMLs from the debug mode.
-------------------------------------------------------------------------------------------------
PROPPATCH /exchange/username/Calendar/slideTestSubject.EML HTTP/1.1
Authorization: Basic Y29ucm9tOmN2YkAjJA==
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: 0.0.0.0
Content-Length: 449
<Dropertyupdate xmlns="DAV:">
<D:set>
<Drop>
<D:contentclass>
urn:content-classes:appointment
</D:contentclass>
<to xmlns="header">
user
</to>
<finvited xmlns="urn:schemas:httpmail">
1
</finvited>
<outlookmessageclass
xmlns="http//schemas.microsoft.com/exchange">
IPM.Appointment
</outlookmessageclass>
<subject xmlns="urn:schemas:httpmail">
Changed Test Appointment Subject
</subject>
</Drop>
</D:set>
</Dropertyupdate>
------------------------------------------------------------------------
<<<<<<< from server
---------------------------------------------------
HTTP/1.1 207 Multi-Status
Date: Thu, 27 Jan 2005 16:18:49 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MS-Exchange-Permanent-URL:
http://0.0.0.0/exchange/username/-FlatUrlSpace-/10
af9647e5ed624ea30b34945fdbb7d0-7fdf72/597d2b3630b5564c94fc5cff14fd63bf-7905a4
Repl-UID: <rid:597d2b3630b5564c94fc5cff14fd63bf0000007905a4>
Content-Type: text/xml
Content-Length: 420
ResourceTag:
<rt:597d2b3630b5564c94fc5cff14fd63bf0000007905a4597d2b3630b5564c94f
c5cff14fd63bf0000009f62c0>
MS-WebStorage: 6.5.7226
<a:multistatus
xmlns:a="DAV:"
xmlns:b="header"
xmlns:c="urn:schemas:httpmail"
xmlns:d="http//schemas.microsoft.com/exchange">
<a:response>
<a:href>
http://0.0.0.0/exchange/username/Calendar/slideTestSubject.EML
</a:href>
<aropstat>
<a:status>
HTTP/1.1 200 OK
</a:status>
<arop>
<a:contentclass>
</a:contentclass>
<b:to>
</b:to>
<c:finvited>
</c:finvited>
<dutlookmessageclass>
</dutlookmessageclass>
<c:subject>
</c:subject>
</arop>
</aropstat>
</a:response>
---------------------------------------------------
PROPFIND /exchange/username/Calendar/slideTestSubject.EML HTTP/1.1
Authorization: Basic Y29ucm9tOmN2YkAjJA==
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0final
Host: 0.0.0.0
Content-Length: 207
Depth: 0
<Dropfind xmlns="DAV:">
<Drop>
<D:displayname>
</D:displayname>
<D:getcontentlength>
</D:getcontentlength>
<D:getcontenttype>
</D:getcontenttype>
<D:resourcetype>
</D:resourcetype>
<D:getlastmodified>
</D:getlastmodified>
<D:lockdiscovery>
</D:lockdiscovery>
</Drop>
</Dropfind>
------------------------------------------------------------------------
<<<<<<< from server
---------------------------------------------------
HTTP/1.1 207 Multi-Status
Date: Thu, 27 Jan 2005 16:18:49 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Type: text/xml
Accept-Ranges: rows
MS-WebStorage: 6.5.7226
Transfer-Encoding: chunked
<a:multistatus
xmlns:a="DAV:"
xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:c="xml:">
<a:response>
<a:href>
http://0.0.0.0/exchange/username/Calendar/slideTestSubject.EML
</a:href>
<aropstat>
<a:status>
HTTP/1.1 200 OK
</a:status>
<arop>
<a:displayname>
slideTestSubject.EML
</a:displayname>
<a:getcontentlength b:dt="int">
651
</a:getcontentlength>
<a:getcontenttype>
message/rfc822
</a:getcontenttype>
<a:resourcetype>
</a:resourcetype>
<a:getlastmodified b:dt="dateTime.tz">
2005-01-27T16:18:49.567Z
</a:getlastmodified>
<lockdiscovery xmlns="DAV:">
</lockdiscovery>
</arop>
</aropstat>
</a:response>
</a:multistatus>