【发布时间】:2014-04-08 18:03:11
【问题描述】:
上下文
CMIS parent 操作允许从对象的 id 获取对象的完整路径。
例如,我给/alfresco/service/cmis/s/versionStore:version2Store/i/2f4cbf7a-0f8e-4fa1-81e5-8be69eb0532e,我得到/Sites/swsdp/documentLibrary/Presentations。
我有一个 Alfresco Community 4.2.e 服务器。
不确定是否相关,但它纯粹是开箱即用的,除了我enabled ChangeLog:
audit.enabled=true
audit.alfresco-access.enabled=true
audit.cmischangelog.enabled=true
发生了什么
当我在下面运行 "parent" CMIS request 时,我得到下面的响应,其中包含零个 Atom 条目:
GET /alfresco/service/cmis/s/versionStore:version2Store/i/2f4cbf7a-0f8e-4fa1-81e5-8be69eb0532e/parents?includeAllowableActions=false&includeRelationships=none&includeRelativePathSegment=true HTTP/1.1
User-Agent: Apache Chemistry DotCMIS
Authorization: Basic YWRtaW46YWRtaW4=
Host: 192.168.0.66:8080
Connection: Keep-Alive
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Content-Type: application/atom+xml; type=feed;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 06 Mar 2014 06:57:46 GMT
477
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<author><name>admin</name></author>
<generator version="4.2.0 (r56674-b4848)">Alfresco (Community)</generator>
<icon>http://192.168.0.66:8080/alfresco/images/logo/AlfrescoLogo16.ico</icon>
<id>urn:uuid:2f4cbf7a-0f8e-4fa1-81e5-8be69eb0532e-parents</id>
<link rel="service" href="http://192.168.0.66:8080/alfresco/service/cmis"/>
<link rel="self" href="http://192.168.0.66:8080/alfresco/service/cmis/s/versionStore:version2Store/i/2f4cbf7a-0f8e-4fa1-81e5-8be69eb0532e/parents?includeAllowableActions=false&includeRelationships=none&includeRelativePathSegment=true"/>
<link rel="via" href="http://192.168.0.66:8080/alfresco/service/cmis/s/versionStore:version2Store/i/2f4cbf7a-0f8e-4fa1-81e5-8be69eb0532e"/>
<title>text1.txt Parents</title>
<updated>2014-03-05T16:32:44.359+09:00</updated>
</feed>
0
我认为应该发生的事情
作为参考,CMIS 标准有一个示例request/response 用于parents。
示例响应包含一个 Atom 条目,其中包含我正在寻找的路径:
<atom:entry>
[...]
<cmisra:object xmlns:ns3="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
<cmis:properties>
[...]
<cmis:propertyString queryName="cmis:path" displayName="Path" localName="cmis:path" propertyDefinitionId="cmis:path">
<cmis:value>/My_Folder-0-0/MultifiledFolder1</cmis:value>
问题
为什么 Alfresco 没有给我任何 Atom 条目?
我的请求有什么问题?我很确定 id 正确引用了现有文件 /Sites/swsdp/documentLibrary/Presentations/test1.txt。
【问题讨论】: