【问题标题】:How to access a remote web service by Camel CXF endpoint?如何通过 Camel CXF 端点访问远程 Web 服务?
【发布时间】:2015-04-02 21:08:02
【问题描述】:

我在网上查找如何创建 Camel 的 CXF 生产者(即创建一个 CXF 端点,该端点会产生对某些本地/远程 Web 服务的请求)。一般来说,我能找到的所有示例都会列出以下步骤:

首先定义cxfEndpoint属性:

<cxf:cxfEndpoint
id="orderEndpoint"
address="http://localhost:9000/order/"
serviceClass="camelinaction.order.OrderEndpoint"/>

然后将请求发送到那个端点:

...to("cxf:bean:orderEndpoint");

嗯。我不明白这个概念。如果这是一个远程 Web 服务,我通常只有 WSDL 的 URL。我可以从中获取服务的地址...但我不知道 serviceClass 是什么,并且我的类路径中没有它。

那么如果我只有 WSDL 的 URL,我该如何定义那个 cxfEndpoint?

或者在这种情况下我应该使用另一种类型的端点吗?

【问题讨论】:

    标签: apache-camel cxf


    【解决方案1】:

    我建议首先研究 WSDL 以了解 cxf。以下是我认为应该对您有很大帮助的两个链接,并且过去也对我有所帮助。

    http://code.notsoclever.cc/camel-cxf-component-wsdl-first-example/

    https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.0/html-single/Web_Services_and_Routing_with_Camel_CXF/index.html#ImplWs-WsdlFirst

    在 Red Hat 网站上,您需要从第 3 章开始。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2016-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-11
      • 2015-05-06
      • 1970-01-01
      • 1970-01-01
      • 2012-11-13
      相关资源
      最近更新 更多