Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Apache Camel CMIS with Sharepoint 2013

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?

like image 226
Jalal Almutawa Avatar asked Apr 14 '15 07:04

Jalal Almutawa


1 Answers

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

like image 51
jnupponen Avatar answered Nov 09 '22 07:11

jnupponen