问题
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