Why can't I create a RESTful web service in an ejb module?

I am using Netbeans 6.8. I can see the possibility of creating a web service in my independent ejb module, but I cannot find a way to create a RESTful web service in my ejb module. Are there any limitations in the ejb module that I can create SOAP-based web services rather than RESTful? or is this a Netbeans 6.8 bug?

+3
source share
4 answers

Chapter 2.6 of the EJB3 Specifications:

Support for web services interoperability, the EJB specification requires compatible implementations; support for web services based on XML calls using WSDL and SOAP; or simple XML code for HTTP inconsistency with JAX-WS [32], JAX-RPC [25], web services for JavaEE [31] and web services Metadata for the Java platform [30] Specific cations.

In other words: EJB3 can only be displayed as a SOAP web service.

+3
source

REST is just HTTP, usually implemented with servlets, so it is naturally added to the WAR file, which may or may not be packaged in an EAR with EJB.

I don’t think EJBs know or care about SOAP or REST. EJBs use RMI as their communication protocol.

+2
source
+2

- EJB, web- Jax-rs CXF rest api Jersey api.

0

Source: https://habr.com/ru/post/1748748/


All Articles