Web 服务:JAX-WS、CXF、WSDL...这是什么意思?

发布于 2024-09-13 10:50:15 字数 182 浏览 4 评论 0原文

很抱歉他的新手问题。但我真的需要从这件事开始。 我想访问我的 Java EE 项目中的 Web 服务。此 Web 服务提供 WSDL 文件。所以我知道我可以使用它来构建 Java 代码来访问 Web 服务。 现在我了解到 Apache CXF 是我可以使用的一个很好的框架。但与 JAX-WS 有什么区别呢?

有人可以向我解释一下吗?

Sorry fot his newbie question. But I really need a start on this one.
I want to access a webservice in my Java EE project. This webservice offers a WSDL file. So I understand I can use this to build Java code from it to access the web service.
Now I read that Apache CXF is a good framework that I can use. But what's the difference to JAX-WS?

Could someone please explain this to me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

甜扑 2024-09-20 10:50:20

其他答案是正确的,但使用 CXF 或 Metro,您将获得一个实施 Web 服务堆栈,并且具有 JAX-WS api 之外的额外功能。这就是为什么 JAX-WS RI 还具有比 JAX-WS 更多的可用功能。

我认为这篇文章非常详细地解释了这一点。

http://www.predic8.com/axis2-cxf-jax-ws -比较.htm

The other answers are correct, but with CXF or Metro you are getting an implementation web services stack and with that are extra features beyond the JAX-WS api. That is why JAX-WS RI also has more features available than just JAX-WS.

I think this article explains this very well in detail.

http://www.predic8.com/axis2-cxf-jax-ws-comparison.htm

放肆 2024-09-20 10:50:19

JAX-WS 是使用注释定义 Web 服务的规范(由 Sun Oracle 提供)。

Apache CXF 是一个实现 JAX-WS 以生成 Web 服务定义和 Java 代理(从 Web 服务定义)的框架

Apache Axis 2 也是一个现在支持 JAX-WS(最高可达 JAX-WS 2)的框架。它是 Apache Axis 的改进。 CXF 最高支持 JAX-WS 1.2。

可以在此处找到简要教程。

JAX-WS is a Specification (provided by Sun Oracle) to defining Web Services by use of Annotations.

Apache CXF is a framework that implements JAX-WS to generate Web Services Definitions and Java Proxy (from a Web Service Definitions)

Apache Axis 2 is also a framework that now supports JAX-WS (up to JAX-WS 2). It's an improvement from Apache Axis. CXF supports up to JAX-WS 1.2.

Brief tutorial can be found here.

罪#恶を代价 2024-09-20 10:50:19

JAX-WS 是一个 API(或规范),CXF 是该 API 的实现。 此处还提供了一个参考实现

JAX-WS is an API (or specification) and CXF is an implementation of that API. There is also a reference implementation available here

叫思念不要吵 2024-09-20 10:50:19

CXF 很好,但您不需要它来解决您的问题。您可以使用 wsimport,它作为一部分JDK 的一部分,从 WSDL 生成类来访问 Web 服务。

CXF is good but you don't need it to solve your problem. You can use wsimport, which comes as part of the JDK, to generate classes from the WSDL to access the web service.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文