Hi All, I want to create a public folder(Contact) programatically by using WebDAV I use MkCOLMEthod, however, my Query is wrong, how to write a Query? my Query is: String query ="<?xml version=\"1.0\" ?><a:propertyupdate xmlns:a=\"DAV:\" " + "xmlns:n0=\"http://schemas.microsoft.com/exchange\">" + "<a:set>" + " <a:prop> " + "<n0:outlookfoldersclass>IPF.Contact</n0:outlookfoldersclass> " + //"<a:displayname>Sample0x2fFolder</a:displayname> " + " </a:prop>" + " </a:set>" + "</a:propertyupdate>"; It return 400 Error, my application is Java. Thanks in advanced
One of your property names is wrong should be outlookfolderclass not outlookfoldersclass eg something like <a:propertyupdate xmlns:a="DAV:" xmlns:ex='http://schemas.microsoft.com/exchange/'> <a:set><a:prop><ex:outlookfolderclass>IPF.Contact</ex:outlookfolderclass></a:prop></a:set> </a:propertyupdate> I wouldn't worry about setting the displayname its will use the name from the URL. Cheers Glen "jeff" wrote in message news:943E1667-AA3C-48C6-84B8-6B7918552B41@microsoft.com... > Hi All, > > I want to create a public folder(Contact) programatically by using WebDAV > > I use MkCOLMEthod, however, my Query is wrong, how to write a Query? > > my Query is: > > String query ="<?xml version=\"1.0\" ?><a:propertyupdate > xmlns:a=\"DAV:\" " + > "xmlns:n0=\"http://schemas.microsoft.com/exchange\">" + > "<a:set>" + > " <a:prop> " + > "<n0:outlookfoldersclass>IPF.Contact</n0:outlookfoldersclass> " > + > //"<a:displayname>Sample0x2fFolder</a:displayname> " + > " </a:prop>" + > " </a:set>" + > "</a:propertyupdate>"; > > It return 400 Error, my application is Java. > > Thanks in advanced