/**
* Sample creating Task in Exchange repository
*/
public void addTask() {
HttpURL url = null;
WebdavResource resource = null;
try {
/* Set XML Namespace collection */
Hashtable<String, String> namespace = new Hashtable<String, String>();
namespace.put("a", "DAV:");
namespace
.put("b", "urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/");
namespace.put("g", "http://schemas.microsoft.com/mapi/");
namespace.put("e", "urn:schemas:httpmail:");
namespace.put("d", "urn:schemas:mailheader:");
namespace.put("c", "xml:");
namespace.put("f", "http://schemas.microsoft.com/mapi/proptag/");
namespace.put("h", "http://schemas.microsoft.com/exchange/");
namespace.put("i", "urn:schemas-microsoft-com:office:office");
namespace.put("k", "http://schemas.microsoft.com/repl/");
namespace.put("j", "urn:schemas:calendar:");
namespace.put("l", "urn:schemas-microsoft-com:exch-data:");
namespace.put("m", "http://schemas.microsoft.com/exchange/tasks/");
/* Connect to Exchange webdav repository */
url = new HttpURL(Constant.DAV_URL);
url.setUserinfo(Constant.APPLICATION_USER_ACCOUNT_NAME,
Constant.APPLICATION_USER_PASSWORD);
resource = new WebdavResource(url);
resource.setDebug(Constant.DEBUG_LEVEL);
/* Create task (XML request) */