Using Apache Camel CMIS with Sharepoint 2013

三世轮回 提交于 2019-12-07 00:53:57

问题


I can successfully access Sharepoint 2013 AtomPub interface from Chrome REST clients, the following URL gives me the file I want:

http://ourintranet:100/personal/myname/_vti_bin/cmis/rest/5612e38e-a324-4030-9fee-7d05cd9053a4?getContentStream&objectId=4-512

However, using the same URL in the Camel CMIS route gets me HTTP 302 (File not found) and diverts me to an error page.

The route I tried is:

from("cmis:http://ourintranet:100/personal/myname/_vti_bin/cmis/rest/5612e38e-a324-4030-9fee-7d05cd9053a4?getContentStream&objectId=4-512")
.to("file:c:/myFolder")

Running Wireshark to see what is going on, it seems that Camel CMIS is not passing the query string part to the server, and may consider it options to the CMIS component (as per the component's usage guide).

So, what is the correct way of using Camel CMIS component with Sharepoint?


回答1:


Have you tried adding parameter "query" to the uri like this

from("cmis:http://ourintranet:100/personal/myname/_vti_bin/cmis/rest/5612e38e-a324-4030-9fee-7d05cd9053a4?query=getContentStream&objectId=4-512")
.to("file:c:/myFolder")

According to http://camel.apache.org/cmis.html :

query | The cmis query to execute against the repository. If not specified, the consumer will retrieve every node from the content repository by iterating the content tree recursively



来源:https://stackoverflow.com/questions/29621858/using-apache-camel-cmis-with-sharepoint-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!