Vik*_*ram 4 rest apache-camel marklogic spring-dsl
我正在尝试从文件系统中获取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>
Run Code Online (Sandbox Code Playgroud)
用户名和密码为:admin/admin,用于在8005上运行的MarkLogic REST实例
小智 5
有一些Camel/MarkLogic集成示例,请访问https://github.com/rjrudin/ml-camel-client.那些只是使用mlcp(作为嵌入式库)和XCC - 我现在将添加一个REST API示例并回复.
https://github.com/rjrudin/marklogic-camel-demo显示了进一步的集成,虽然配置是用Java而不是XML(我觉得Java在Camel中更容易使用) - 请注意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
| 归档时间: |
|
| 查看次数: |
166 次 |
| 最近记录: |