如何创建 Apache cxf 简单 Web 服务使用者?

发布于 2024-08-21 18:24:13 字数 381 浏览 3 评论 0原文

我能够从 wsdl 文件生成客户端。 现在我需要在 Eclipse 中运行它。

当我使用 Eclipse 创建 Axis2 客户端时,我只需创建一个 DynamicWebProject 它会自动将必要的库添加到 ClassPath 中。

ApacheCXF 怎么样?有谁有需要手动添加到构建路径的所有必需库的列表吗?

在 apache 网站上,他们建议使用 Maven 来实现该功能,但我猜, 有没有更简单的方法?

据我所知,通过 Eclipse WTP 创建 Axis2 客户端不那么痛苦, 通过几个步骤,我将所有必需的库添加到项目文件夹中。

如何将 WSDL2Java Apache CXF 客户端存根与运行客户端所需的库绑定在一起,最简单的分步解决方案是什么?

I'm able to generate a client from a wsdl file.
Now I need to run it in Eclipse.

When I create a Axis2 Client using Eclipse, I just create an DynamicWebProject
and it automatically adds the neccessary libraries to the ClassPath.

What about ApacheCXF? Does anyone have the list of all the neccessary libraries one needs to add to the BUILD PATH manually?

On the apache web site they recommend to use Maven to achieve that functionality, but I guess,
is there a simpler way?

As far as I see, the creation of Axis2 client by means of Eclipse WTP is less painful,
in a few steps I get all the neccessary libraries added to the project folder.

WHAT IS the most simple step-by-step solution how to bind the generated by WSDL2Java Apache CXF client stub with the neccessary libraries TO RUN THE CLIENT?

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

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

发布评论

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

评论(1

空心↖ 2024-08-28 18:24:13

如果您想在 Eclipse 下使用 CXF 获得类似“Apache Axis2”的体验,您可以安装 JAX-WS工具项目。实际上,该项目是 Web Tools Platform(在孵化器中)的一部分,因此要安装它,只需转到 Web Tools 更新站点 (http://download.eclipse.org/webtools/updates)并安装CXF Web 服务(孵化)

安装后,转到窗口>;偏好>网络服务> CXF 2.x 首选项并设置CXF Home的路径(即它需要“安装”在您的计算机上)。

然后,创建一个新建>;其他>网络服务> Web 服务客户端,设置服务定义 (WSDL),将运行时更改为Apache CXF 2.x,然后按照向导的步骤操作。

If you want an "Apache Axis2"-like experience with CXF under Eclipse, you can install the JAX-WS Tools Project. Actually, this project is part of the Web Tools Platform (in the incubator) so, to install it, just go to the Web Tools update site (http://download.eclipse.org/webtools/updates) and install CXF Web Services (Incubation).

Once installed, go to Window > Preference > Web Services > CXF 2.x Preferences and setup the path to your CXF Home (i.e. it needs to be "installed" on your machine).

Then, create a New > Other > Web Services > Web Service Client, set the Service definition (WSDL), change the runtime to Apache CXF 2.x and follow the steps of the wizard.

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