使用 EJB 的 Glassfish v3 上的 Java Web 服务

发布于 2024-12-20 23:21:54 字数 800 浏览 5 评论 0原文

我有一个库,我想将其公开为 SOAP Web 服务。

我正在使用 GlassFish Server 开源版 3.1.1(内部版本 12)。

我已阅读此处此处 但是这些使用旧版本的 Glassfish。版本 3 没有“Web 服务”节点 如此处所述,这使得教程有些难以理解。

我使用普通 Eclipse 项目创建了一个带注释的 POJO (EJB),将其导出为 jar 文件并部署了它。 Glassfish 将其显示为“Web 应用程序”。我不确定如何将这些作为网络服务访问。我可以通过什么 URL 访问我创建的 Web 方法?

编辑: 使用生成的 WSDL 的问题位于:使用 GlassFish v3、EJB 和 SOAPUI

I have a library which I would like to expose as a SOAP web service.

I am using GlassFish Server Open Source Edition 3.1.1 (build 12).

I have read the tutorial here and here however these use an older version of Glassfish. Version 3 does not have a "Web Services" Node as noted here, which makes the tutorials somewhat hard to follow.

I have created an annotated POJO (EJB) using a normal Eclipse project, exported it as a jar file and have deployed it. Glassfish shows this as a "Web Application". I am unsure how to access these as a web service. At what URL can I access the web methods I have created?

Edit:
Problems with using the generated WSDL are at: Using GlassFish v3, EJB and SOAPUI

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

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

发布评论

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

评论(2

往日 2024-12-27 23:21:54

通常,您可以在部署服务的同一地址+ ?wsdl 后缀中访问生成的 WSDL 文件。例如 http://localhost:8080/myapp/myservice?wsdl

然后您可以使用 SOAPUI< /a> 创建适合该 WSDL 的 XML 请求。

Normally you would acces the generated WSDL file in the same address where the service is deployed + ?wsdl suffix. E.g. http://localhost:8080/myapp/myservice?wsdl

Then you can use tools like SOAPUI to create XML requests suitable for that WSDL.

愛上了 2024-12-27 23:21:54

我不确定如何将这些作为网络服务进行访问。我可以通过什么 URL 访问我创建的 Web 方法?

部署时的 Web 服务器将发布 WSDL,并为您提供已发布的 WSDL 文件的 URL。现在客户端可以使用该 WSDL 访问 Web 服务

I am unsure how to access these as a web service. At what URL can I access the web methods I have created?

Your web server on deployment will pulish a WSDL and will give you URL to that WSDL file published. Now client can access the Webservices from using that WSDL

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