使用 CXF 和 Camel 调用安全网络服务 [英] Calling secure webservice using CXF and Camel

查看:35
本文介绍了使用 CXF 和 Camel 调用安全网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在需要客户端身份验证 (SSL) 的 https URL 上调用 SOAP 网络服务.

I am trying to call a SOAP webservice on an https URL, where client authentification (SSL) is required.

现在我正在使用 spring(从蓝图切换)配置我的骆驼上下文,并使用带有码头作为传输的骆驼 CXF 组件创建我的端点.

Right now I am configuring my camel context using spring (switched away from blueprint) and creating my endpoints using the Camel CXF component with jetty as transport.

我找不到任何很好的例子.也许我应该使用 http4 而不是 Jetty.我试图设置一些 Camel sslContextParameters,但我看不到它与 CXF 和/或 Jetty 一起使用.

I can't find any good examples for this out there. Maybe I should be using http4 in stead of Jetty. I was trying to set up some Camel sslContextParameters, but I can't see this working with CXF and/or Jetty.

谁能指出我正确的方向?

Can anyone point me in the right direction?

推荐答案

首先,如果您要调用 SOAP 服务,则需要使用 camel-cxf 组件,而不是 camel-cxfrs.后者用于 REST 端点.

First, if you're invoking a SOAP service, you need to use the camel-cxf component, not camel-cxfrs. The latter is for REST endpoints.

您说需要客户端授权,但您没有指定哪种类型.鉴于您谈论的是 SSL,我假设您需要同时配置 SSL 和 HTTP 身份验证.

You say that client authorization is required, but you don't specify which type. Given that you talk about SSL, I will assume you need to configure both SSL and HTTP Auth.

对于 SSL,请查看:https://camel.apache.org/camel-configuration-utilities.htmlhttps://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Security_Guide/files/CamelCXF-SecureClient.html.

For SSL, have a look at: https://camel.apache.org/camel-configuration-utilities.html and https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Security_Guide/files/CamelCXF-SecureClient.html.

对于 HTTP 基本身份验证,请查看此处的 usernamepassword 选项:https://camel.apache.org/cxf.html.

For HTTP Basic Auth, have a look at the username and password options here: https://camel.apache.org/cxf.html.

RedHat安全指南 6.1

这篇关于使用 CXF 和 Camel 调用安全网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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