简体   繁体   English

如何部署具有Web服务的Java EE项目

[英]How to deploy a Java EE project that has web services

I already have an enterprise Java EE application. 我已经有一个企业Java EE应用程序。 I want expose some of the existing EJBs as web services. 我想将一些现有的EJB公开为Web服务。

I wanted to know how to organize the Java EE project. 我想知道如何组织Java EE项目。 I mean where does the web services sit in the Java EE EAR file hierarchy and how to invoke the deployed webs services? 我的意思是Web服务在Java EE EAR文件层次结构中的什么位置,以及如何调用已部署的Web服务?

It depends upon exactly how you implement your WebService and also on which Java EE version you are using. 这完全取决于您如何实现WebService以及所使用的Java EE版本。 Simplest, with JAX-WS your webservice implementation and interface are all packed in the WAR. 最简单的是,使用JAX-WS,您的Web服务实现和接口都打包在WAR中。 See the sun tutorial . 参见sun教程 Possibly you may implement your service as an EJB and in which case you can simply use the @WebService annotation. 可能您可以将服务实现为EJB,在这种情况下,您可以简单地使用@WebService批注。 In which case you're delivering the EJB jar. 在这种情况下,您将交付EJB jar。

Recommend you work through a few tutorials for the specific App Server you are using. 建议您通读一些针对所用特定App Server的教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM