SSL自签名apache camel https4 [英] SSL self signed apache camel https4

查看:556
本文介绍了SSL自签名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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆