首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Camel CXF Rest SSL握手错误

Camel CXF Rest SSL握手错误
EN

Stack Overflow用户
提问于 2015-04-23 04:32:12
回答 1查看 663关注 0票数 0

我们使用Camel CXF API与安全服务器进行通信。这是双向SSL,我们通过Netscaler与3个不同的系统对话。2系统公开SOAP WS,我们能够建立双向SSL并交换消息。第三个系统公开了REST API,并在SSL握手时给出了一个非常奇怪的问题。当我们在熔丝中驼峰CXF时出现错误。在自己的JVM中运行的独立Java程序能够成功地与REST服务对话。

我们已经启用了SSL调试标志,并在日志中得到以下错误。

代码语言:javascript
运行
复制
Camel thread #0 - timer://foo, WRITE: TLSv1 Change Cipher Spec, length = 1
Camel thread #0 - timer://foo, handling exception: java.net.SocketException: Connection reset
%% Invalidated:  [Session-11, SSL_RSA_WITH_RC4_128_MD5]
Camel thread #0 - timer://foo, SEND TLSv1 ALERT:  fatal, description = unexpected_message
Camel thread #0 - timer://foo, WRITE: TLSv1 Alert, length = 2
Camel thread #0 - timer://foo, Exception sending alert: java.net.SocketException: Broken pipe
Camel thread #0 - timer://foo, called closeSocket()

下面是Camel REST svc中的配置。

代码语言:javascript
运行
复制
<!-- Key Manager & Trust Manager -->
<bean id="keyManagersBean" 
          class="test.IntegrationKeyManagerFactory" 
          factory-method="getKeyManager">
    <argument value="${security.keystorepassword}"/>
    <argument value="${security.keystorelocation}"/>
</bean> 

<bean id="trustManagersBean" 
      class="test.IntegrationKeyManagerFactory" 
      factory-method="getTrustManager">
    <argument value="${security.keystorepassword}"/>
    <argument value="${security.keystorelocation}"/>
</bean>

<!-- ==================== security configuration =================== -->
<http:conduit name="*.http-conduit">
    <http:tlsClientParameters>
        <sec:keyManagers ref="keyManagersBean"/>
        <sec:trustManagers ref="trustManagersBean"/>
    </http:tlsClientParameters>
</http:conduit>

<!-- ====================== Camel Context & Routes ====================== -->
<camel:camelContext id="camel.test.context">
    <camel:route id="testRoute">
        <camel:from uri="timer://foo?fixedRate=true&amp;period=30s" />
        <camel:transform>
            <camel:constant>""</camel:constant>
        </camel:transform>
        <camel:removeHeaders pattern="CamelCxfMessage" />
        <camel:setHeader headerName="Exchange.HTTP_METHOD">
            <camel:constant>GET</camel:constant>
        </camel:setHeader>
        <camel:to uri="cxfrs:{{protocol}}://{{host}}:{{port}}/{{context}}/getList" />
        <camel:log message="${body}"/>
    </camel:route>
</camel:camelContext>

有人知道问题出在哪里吗?完全相同的配置可以通过netscaler与SOAP WS通信,但不能通过netscaler与REST WS通信。

EN

回答 1

Stack Overflow用户

发布于 2015-04-23 20:54:12

我能够通过从camel cxf rsClient切换到使用普通的camel-http调用来修复这个问题。但是我认为在cxfrsClient中使用HttpConduit会有一些问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29808211

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档