我正在尝试从文件系统中提取一个JSON文件,并尝试将该文件插入到MarkLogic数据库中。
<route id="file_upload">
<!-- incoming requests from the file is routed -->
<from uri="file:/E:/camel/input"/>
<to uri="http://localhost:8005/v1/documents?uri/patents/test.json"/>
</route>
用户名和密码为: admin/admin用于在8005上运行的MarkLogic REST实例
发布于 2016-08-03 20:30:15
在https://github.com/rjrudin/ml-camel-client上有一些Camel/MarkLogic集成的例子。那些只是使用mlcp (作为嵌入式库)和XCC -我现在将添加一个REST API示例并回复。
https://github.com/rjrudin/marklogic-camel-demo显示了进一步的集成,尽管配置是用Java而不是XML (我发现在Camel中使用Java更容易)-注意HTTP头和查询字符串需要作为Camel头传递,而不是作为URI - https://github.com/rjrudin/marklogic-camel-demo/blob/master/src/main/java/org/example/util/RunCamel.java#L76的一部分。这也记录在Camel http4页面中-- http://camel.apache.org/http4.html
https://stackoverflow.com/questions/38728114
复制相似问题