SSL自签名apache camel https4 [英] SSL self signed apache camel https4
问题描述
我尝试与拥有自签名SSL证书的服务器通信。
I try comunicate with server that has a self signed SSL certificate.
我的路由配置:
.setHeader(Exchange.HTTP_METHOD,constant(GET))
.to(https4://192.168.3.15:3000 / getFile)
.marshal(xmlJsonFormat)
.process(camelProcessor)
.to(mongodb:mongoBean?database = eicas& collection = sales& operation = insert)
.to(log:Ok:Se guardo un registro Venta fija)
.doCatch(IllegalArgumentException.class)
.to(log:org.apache.camel.example?level = DEBUG)
.to(log:error? showCaughtException = true& showStackTrace = true);
我不知道set de ssl是如何签名的。我们有什么想法吗?
And I don't know how set de ssl self signed. Do we have any idea?
推荐答案
请参阅 http://camel.apache.org/http4.html
我用XML DSL实现了如下:
I achieved that with XML DSL as follows:
<sslContextParameters id="sslContext" xmlns="http://camel.apache.org/schema/blueprint">
<trustManagers>
<keyStore resource="your-certificate"/>
</trustManagers>
</sslContextParameters>
<bean id="http-ssl" class="org.apache.camel.component.http4.HttpComponent">
<property name="sslContextParameters" ref="sslContext"/>
</bean>
<route>
...
<to uri="http-ssl://192.168.3.15:3000/getFile"/>
..
</route>
这篇关于SSL自签名apache camel https4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!