Question

I'm looking for suggestions on selecting an Open Source technology stack for Java REST/SOAP Web service implementation.

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

This is for a PoC so ease of configuration and use is very important. If the chosen technologies are carried forward to production then obviously scalability will become a priority but for the time being it's not (showcasing other parts of the project is the main objective).

Any recommendations would be much appreciated.

Was it helpful?

Solution

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

  • tomcat and jetty are both Java Application Server. They don't provide specific support for REST/SOAP technologies. They are just Servlet Container. But : your webservices will be implemented by one or more servlets. So a ServletContainer is certainly something that will be part of your stack. (Tomcat is widely used).

  • once you have an ServletContainer you can choose some framework to help you. Spring framework is a lightweight framework helping you to bring everything together. Configuring all your components etc... It provide built-in support for REST/SOAP, but it can also be integrated with more powerful-webservice-dedicated frameworks.

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

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

So, you can look at : Tomcat + Spring + Jersey + CXF. In my opinion it's a good opensource stack to start with webservices.

OTHER TIPS

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's touchy.

I have recently built REST APIs with the Spring MVC framework, it is easy to get started with. http://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch18s02.html

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

If your proof of concept is potentially going to 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 is easy to either production harden AS or migrate your application to the enterprise offering (EAP). Additionally, there is a wealth of tools for Eclipse to ease development.

I agree with all answers so far; let me just note that any Java EE 6 application server (or greater) contains a JAX-RS implementation (REST) and a JAX-WS (SOAP), so any (JBoss, Glassfish, etc) will do. A full blown application server may be more heavyweight that a simple servlet container (e.g. Tomcat), but that depends on usage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top