org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource seeks to determine whether a specified resource exists already or not.
At present, it checks whether COPY is an allowed method, and if it is, the resource is assumed to exist.
According to the code, this works on IIS.
It doesn't work for Alfresco's WebDAV implementation, at least. This causes the PUT of a new resource to fail.
The attached patch uses a PROPFIND to determine whether the resource exists. (It also contains the simple fix to the argument to setEscapedPath)