As the user who set the lock (I think the server will otherwise return a ‘fake’ lock token which cannot be used for this purpose, or it’ll refuse to accept the UNLOCK request for some other reaon), you can do a PROPFIND for the DAV:lockdiscovery property (see the webdav spec for full details of how this property is structured - you’ll need to know this).
Then, having extracted the appropriate lock token from the response here, issue an UNLOCK request using it.
Our webdav client has this functionality built in - if a resource is locked, it’ll check who the lock owner is, and regain control of the lock if the currently logged in user is the same. This is generally not too difficult to implement (though it’s hard to make it work 100% reliably across a range of webdav servers, as I recall…)
Mike
#Tamino#webMethods#API-Management