You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Hamrita Sami <Sa...@eon-energie.com> on 2004/08/20 13:25:05 UTC

WebDav properties for Exchange 2003 items

Hi all,

I'm writing an application to access Microsoft Exchange 2003 using the Slide
framework.

When I create a new webdav property  (over Microsoft's WebDav Client, the
Exchange Explorer) for an existing exchange item, let's say an appointment,
and then call the method below to list all the properties of single items
located in the directory "path", my property was not listed??!!

The new property I created is called "DAV:contactuid" and the value is
something like "AQEAAAAAAKiBAQAAAAAA2/4AAAAA". The datatype is "srtring". 
All other properties like "DAV:contentclass" were listed.
 
What's wrong?

Cheers,
Sami

Method:

private Enumeration listItemsExtended(String path) throws HttpException,
IOException {		
	
	webdavResource.setPath(path);
	Vector basiclist = webdavResource.listBasic();

	for (int i = 0; i < basiclist.size(); i++) {

		/** 
		 * array 0: displayname
		 * array 1: getcontentlength
		 * array 2: iscollection or getcontentype
		 * array 3: getlastmodifieddate
		*/
		String[] longFormat = (String []) basiclist.elementAt(i);

		String displayname = longFormat[0];
		String isCollection = longFormat[2];
		
		String actualpath = path + "/" + displayname;
		
		if (!isCollection.equals("COLLECTION")) {

			//shows the values of all the properties of the
selected item
			Enumeration props =
webdavResource.propfindMethod(actualpath, Integer.MAX_VALUE);
			while (props.hasMoreElements()) {
				ResponseEntity entity = (ResponseEntity)
props.nextElement();					
				Enumeration responseProperties =
entity.getProperties();					
				while (responseProperties.hasMoreElements())
{
					Property responseProp =(Property)
responseProperties.nextElement();
					System.out.println("Key: [" +
responseProp.getName() + "], Value: [" + responseProp.getPropertyAsString()
+ "]");						
				}
			}
		}
	}
	return null;
}