【问题标题】:Not able to get output from camel routing无法从骆驼路由中获得输出
【发布时间】:2013-03-22 04:27:09
【问题描述】:

我已经用骆驼路线定义了骆驼上下文,并且我有以下代码。

from("jetty:http://localhost:9090/camelcxfdemo/rest/cxf/camelRouter?matchOnUriPrefix=true").
    to("jetty:http://localhost:9090/camelcxfdemo/rest/cxf/getPersonData?bridgeEndpoint=true&throwExceptionOnFailure=false")
    .to("jetty:http://localhost:9090/camelcxfdemo/rest/cxf/processPersonData?bridgeEndpoint=true&throwExceptionOnFailure=false")
    .to("log:output");

上面显示的所有三个 url 都是 Rest 服务,它们接受一些 post xml 并返回 xml 响应。

我希望我的骆驼路由器在调用 /camelRouter 时开始工作,它的输出应该转到 /getPersonData url,而 /getPersonData 的输出转到 /processPersonData。对于用户,我最终应该显示 /processPersonData 的输出。

所以每个 url 都依赖于它之前的 url 输出。

但问题是当我调用 /camelRouter url 时,我总是得到 /camelRouter 响应,而不是最终输出。输出不是从一个服务路由到另一个服务。

那么我的代码中有问题吗?希望得到一些帮助。

谢谢

【问题讨论】:

    标签: rest cxf apache-camel cxfrs


    【解决方案1】:

    在我看来,Jetty 组件既可以用作生产者也可以用作消费者,但不能同时用作您似乎试图使用它的两者。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多