【问题标题】:Apache Camel Spring Web ServicesApache Camel Spring Web 服务
【发布时间】:2015-12-12 10:20:27
【问题描述】:

几个月以来,我一直在学习在 Fuse ESB 中构建应用程序。

直到今天我还在想,骆驼没有任何网络服务,如果我想创建一些网络服务来为我做代理服务器,我必须使用 CXF。

CXF 运作良好,我认为这是很棒的员工。

今天我在http://camel.apache.org/spring-web-services.html页面上找到了“spring web service”

我的问题是:

当我使用 cxf 构建 web 服务时,有一个 web 服务,我可以在下面找到它:

http://localhost:8181/cxf/mywebservice

如果我要使用 Spring Web 服务构建一些东西,它也会为我创建一些我可以发送一些数据的 URL?

在 apache 网站上我找到了信息,骆驼会消耗发送到“example.com/GetFoo”地址的数据,但我不知道骆驼是否会为我创建 GetFoo 网络服务,如果是,我应该在下面找到它:

http://localhost:8181/GetFoo ?

感谢您的帮助

【问题讨论】:

    标签: java apache-camel fuseesb jbossfuse


    【解决方案1】:

    要使用 Spring WS 公开 web 服务,请阅读公开 web 服务部分,这基本上意味着您公开 web 服务的方式与使用 Spring WS 的方式相同。 http://camel.apache.org/spring-web-services.html 然后从那里读取。

    还可以查看 Camel 附带的示例,该示例展示了如何公开 Spring WS:http://camel.apache.org/spring-ws-example.html

    【讨论】:

    • 只是在克劳斯的回答之上构建一点——Spring WS(以及 Camel 对 Spring WS 的支持)需要一个契约优先的 Web 服务(例如 WSDL)。如果您正在寻找更 RESTful 的东西,请查看 CXFRS (camel.apache.org/cxfrs.html)
    • 感谢您的回答,@Roy - 正如一开始所写的那样,现在我正在使用 cxf (CXFRS),它工作得很好,但我认为骆驼没有任何网络服务。再次感谢
    • Apache CXF 可以同时做 WS 和 RS。 camel-cxf 组件支持两者。
    猜你喜欢
    • 2015-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-16
    • 2016-12-31
    • 2015-03-30
    相关资源
    最近更新 更多