使用 EJB 的 Glassfish v3 上的 Java Web 服务
我有一个库,我想将其公开为 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,您可以在部署服务的同一地址+
?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.
部署时的 Web 服务器将发布 WSDL,并为您提供已发布的 WSDL 文件的 URL。现在客户端可以使用该 WSDL 访问 Web 服务
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