【问题标题】:how to configure Camel transport for CXF with Blueprint如何使用蓝图为 CXF 配置 Camel 传输
【发布时间】:2020-03-19 22:44:49
【问题描述】:

带有蓝图的 CXF 骆驼运输文档 https://camel.apache.org/components/latest/cxf-transport.html 说,配置看起来像:

客户: <camel:conduit id="*.camel-conduit" camelContextId="camel1" />

服务器: <camel:destination id="*.camel-destination" camelContextId="camel1" />

但蓝图投诉:'*.camel-destination' is not a valid value for 'NCname''*.camel-conduit' 也一样。

如果我省略了id 属性,CXF 客户端或 CXF 服务器就会启动。 但是在调用时,它并没有找到 Camel 上下文。

CXF 客户端: org.apache.camel.component.cxf.transport.CamelConduit 说 IllegalAgumentException "CamelContext must be specified on: conduit:"

CXF 服务器: org.apache.camel.component.cxf.transport.CamelDestination 说 IllegalAgumentException "CamelContext must be specified on:"

在 Fuse 6.3 上运行。

有人知道我必须如何在蓝图中为 Camel 配置 CXF 传输吗?

【问题讨论】:

    标签: apache-camel jbossfuse blueprint camel-cxf


    【解决方案1】:

    尝试使用"name" 属性而不是"id" 属性。 似乎文档页面(https://camel.apache.org/components/latest/cxf-transport.html)表明这两个属性都可以使用我认为"name"是正确的。

    【讨论】:

    • 这也是我的第一个想法,因为“名称”用于 Spring DM。但是:属性“名称”不允许出现在元素“管道”中
    • 另外,指定一个完整的 "QName.camel-conduit" 来支持 "*.camel-conduit" 也不起作用,因为这也不是有效的 NCname。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-14
    • 1970-01-01
    • 2016-04-14
    • 1970-01-01
    • 2019-02-16
    相关资源
    最近更新 更多