我的alfresco(4.1.5)存储库中有一个文件,我想通过alfresco Services REST API阅读内容。对于查找,我想使用文件路径,而不是UUID。但是,路径的查找不起作用,只有UUID的查找工作。我找不到错误。

这是文件路径:

DisplayPath和文件名:

/Company Home/Data Dictionary/Cleaner Configs/cleaner.properties               

qnamepath:

/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties

UUID的查找使用以下REST API URL:

http://localhost:8080/alfresco/service/cmis/i/2391adf9-365c-4959-bf30-8f001154c100/content

但是,按路的查找仅无法正常工作。既没有主路径也不具有显示路径:

http://localhost:8080/alfresco/service/cmis/p/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties/content?a=false

http://localhost:8080/alfresco/service/cmis/p/Company%20Home/Data%20Dictionary/Cleaner%20Configs/cleaner.properties/content?a=false

在这两种情况下,我都有404个错误:

Message:    10080001 Unable to find ObjectPathReference[storeRef=workspace://SpacesStore,path=/app:company_home/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties]

Exception:  org.springframework.extensions.webscripts.WebScriptException - 10080001 Unable to find ObjectPathReference[storeRef=workspace://SpacesStore,path=/app:company_home/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties]

参考:

http://wiki.alfresco.com/wiki/cmis_web_scripts_reference#get_content_.28getContent.29

获取指定文档的内容流,或获取用于文档的指定演绎的演绎流。

get/alfresco/service/cmis/p {path}/content {property}?a = {action?}

有帮助吗?

解决方案

我找到了问题,感谢@gagravarr的提示:

我必须使用 显示路径, 但是抛弃 /公司%20 home / 在路径中,因为请求URL中使用的路径相对于 /Company%20 home节点被视为。

这起作用:

http://<host:port>/alfresco/service/cmis/p/Data%20Dictionary/Cleaner%20Configs/cleaner.properties/content?a=false
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top