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标准为parents
提供了request / response示例。
示例响应包含一个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
。
答案 0 :(得分:2)
您正在使用已弃用的CMIS端点和过时的CMIS实现。
尝试:
http://<host>/alfresco/api/-default-/public/cmis/versions/1.0/atom