我正在使用 Netbeans 6.8。我可以在我的独立 ejb 模块中看到创建 Web 服务的选项,但我似乎无法在我的 ejb 模块中找到创建基于 RESTful 的 Web 服务的选项。 ejb 模块中是否有任何类型的限制,我只能创建基于 SOAP 的 Web 服务而不能创建 RESTful?还是Netbeans 6.8的bug?
最佳答案
EJB3 规范的第 2.6 章:
To support web service interoperability, the EJB specification requires compliant implementations to support XML-based web service invocations using WSDL and SOAP or plain XML over HTTP incon- formance with the requirements of the JAX-WS[32], JAX-RPC[25], Web Services for JavaEE[31], and Web Services Metadata for the Java Platform [30] specifications.
换句话说:EJB3 只能作为 SOAP Web 服务公开。
关于java - 为什么我不能在 ejb 模块中创建 RESTful Web 服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2985108/