我正在使用自定义WebDAV implementation(基于java servlet)。这似乎在很大程度上运行良好 - 除了Microsoft Word不报告锁定的文档被锁定到用户。因此,用户可以编辑文档,直到他们尝试保存文档为止,此时用户在Microsoft Word中遇到不友好的“上传失败”消息。Microsoft Word忽略从WebDAV服务器发送的锁定状态
我的问题的主要目的是发现,如果我可以修改,以便在WebDAV的反应做一个或多个以下:
获得Microsoft Word中显示给用户一个消息说当前文档被锁定。
如果存在锁定,强制Microsoft Word以只读状态打开文档。
我跑上了提琴手,分析了请求和响应线索,将注释与specifications for WebDAV进行比较。我有点不确定下一步要看什么,所以非常欢迎来自任何WebDAV专家的帮助!
请求1
HEAD http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1
User-Agent: Microsoft Office Existence Discovery
Connection: Keep-Alive
Host: webdavserver:7161
响应1
HTTP/1.1 200 OK
Date: Wed, 05 Nov 2014 11:45:32 GMT
Content-Type: application/msword
Last-Modified: Wed, 05 Nov 2014 11:45:30 GMT
ETag: W/"77312-1415187930429"
X-Powered-By: Servlet/2.5 JSP/2.1
请求2
LOCK http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: text/xml; charset="utf-8"
User-Agent: Microsoft Office Core Storage Infrastructure/1.0
Translate: f
Timeout: Second-3600
Connection: Keep-Alive
Content-Length: 199
Host: webdavserver:7161
<?xml version="1.0" encoding="utf-8" ?>DOMAIN\user
响应2
HTTP/1.1 207 Unknown
Date: Wed, 05 Nov 2014 11:45:32 GMT
Content-Length: 307
Content-Type: text/xml; charset=UTF-8
X-Powered-By: Servlet/2.5 JSP/2.1
http://tidevwls03:7161/OpenTwinsApp/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc
HTTP/1.1 423 Locked
请求3
GET http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8"
User-Agent: Microsoft Office Core Storage Infrastructure/1.0
Depth: 0
Translate: f
Connection: Keep-Alive
Host: webdavserver:7161
响应3
HTTP/1.1 200 OK
Date: Wed, 05 Nov 2014 11:45:32 GMT
Transfer-Encoding: chunked
Content-Type: application/msword
Last-Modified: Wed, 05 Nov 2014 11:45:30 GMT
ETag: W/"77312-1415187930429"
X-Powered-By: Servlet/2.5 JSP/2.1
[byte stream]
要求4
PROPFIND http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Type: text/xml; charset="utf-8"
User-Agent: Microsoft Office Core Storage Infrastructure/1.0
Depth: 0
Translate: f
Connection: Keep-Alive
Content-Length: 208
Host: webdavserver:7161
响应4
HTTP/1.1 207 Unknown
Date: Wed, 05 Nov 2014 11:45:33 GMT
Content-Type: text/xml; charset=UTF-8
X-Powered-By: Servlet/2.5 JSP/2.1
http://tidevwls03:7161/OpenTwinsApp/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc
2014-11-05T11:45:30Z
Wed, 05 Nov 2014 11:45:30 GMT
HTTP/1.1 423 Locked
HTTP/1.1 404 Not Found
从在Microsoft Word中这一点似乎轮询服务器试图获得对锁文件。用户仍然不知道文档上有锁定。我认为这证明Word知道锁定。
请求5
LOCK http://webdavserver:7161/App/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
User-Agent: Microsoft Office Core Storage Infrastructure/1.0
If: (<>)
Translate: f
Timeout: Second-3600
Connection: Keep-Alive
Host: webdavserver:7161
响应5
HTTP/1.1 207 Unknown
Connection: close
Date: Wed, 05 Nov 2014 11:46:07 GMT
Content-Length: 307
Content-Type: text/xml; charset=UTF-8
X-Powered-By: Servlet/2.5 JSP/2.1
http://tidevwls03:7161/OpenTwinsApp/WebDAV/577476_Client%2C_3rd_party_or_internal_account._Rheiner_R%C3%BCckversicherungs_GmBH1.doc
HTTP/1.1 423 Locked
2014-11-05
mrswadge