request.setMethod(WebDAVMethod.LOCK.name());
request.setRequestURI(path);
request.setContentType(MediaType.APPLICATION_XML);
Lockinfo lockinfo = new Lockinfo();
Lockscope lockscope = new Lockscope();
lockscope.setExclusive(new Exclusive());
lockinfo.setLockscope(lockscope);
Locktype locktype = new Locktype();
locktype.setWrite(new Write());
lockinfo.setLocktype(locktype);
StringWriter writer = new StringWriter();