@Override
public String lock(String url) throws IOException
{
HttpLock entity = new HttpLock(url);
Lockinfo body = new Lockinfo();
Lockscope scopeType = new Lockscope();
scopeType.setExclusive(new Exclusive());
body.setLockscope(scopeType);
Locktype lockType = new Locktype();
lockType.setWrite(new Write());
body.setLocktype(lockType);
entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
// Return the lock token
return this.execute(entity, new LockResponseHandler());
}