REST / SOAP Service Technology Stack for Java

I am looking for suggestions on choosing an open source technology stack for implementing the Java REST / SOAP web service.

I looked at Tomcat and Jetty, among others, but, being relatively new to this domain, I was somewhat overwhelmed by the sheer number of options and the lack of documentation for some.

This is for PoC, so the very ease of setup and use is very important. If the selected technologies are transferred to production, it is obvious that scalability will be a priority, but so far it is not (the main goal is to demonstrate other parts of the project).

Any recommendations would be highly appreciated.

+4
source share
5 answers

This is not a very accurate question. But to help you get started, I can say that:

  • tomcat and jetty are Java Application Server. They do not provide specific support for REST / SOAP technologies. It is just a servlet container. But: your web services will be implemented by one or more servlets. This way, ServletContainer will certainly be part of your stack. (Tomcat is widely used).

  • Once you have the ServletContainer, you can select some frameworks that will help you. Spring framework is a lightweight framework that helps you put everything together. Customize all your components, etc. It provides built-in REST / SOAP support, but can also be integrated with more powerful web service-oriented environments.

  • for a REST implementation, I recommend Jersey (reference implementation). It can be easily integrated with Spring.

  • for SOAP: you can look at apache CXF (it also supports REST)

So you can see: Tomcat + Spring + Jersey + CXF. In my opinion, this is a good open source stack to start with web services.

+3
source

For REST, I use Jersey: https://jersey.java.net/ and Grizzly: https://grizzly.java.net/

for SOAP: I use JAX-WS (in Java since 6), but it is touching.

+1
source

I recently created a REST API with the Spring MVC framework, which is easy to get started with. http://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch18s02.html

or using Spring data http://projects.spring.io/spring-data-rest/

+1
source

I agree with all the answers so far; let me note that any Java EE 6 application server (or higher) contains JAX-RS (REST) ​​and JAX-WS (SOAP) implementations, so any (JBoss, Glassfish, etc.) will do. A full-blown application server might be heavier than a simple servlet container (like Tomcat), but it depends on the usage.

+1
source

If your proof of concept would potentially evolve into a production-ready solution, I would suggest starting with JBoss AS 7.1.1 for your container. This container comes with SOAP and REST implementations integrated into the container. It’s easy to either simplify production or transfer the application to an enterprise proposal (EAP). In addition, there is a wealth of tools for Eclipse to simplify development.

+1
source

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


All Articles