views:

100

answers:

4

Hi all! I'm will build a web service. I'd rather like REST/JSON than SOAP. Anybody can tell me what is the best Java EE framework for that? Thanks!

+1  A: 

JAX-RS is the Java EE standard for RESTful web services. For an example check out my blog:

Blaise Doughan
Thanks! your blog is useful!
Thành Lê
A: 

For a different approach to RESTful web services, have a look at RESTx. The focus there is on reusable components and the ability to quickly create new web services, simply by posting configurations (or filling out a small form in a browser) on a running server.

That way, you can quickly create many variations of the same service. For example, every posted configuration to a "database component" could contain a different query. The user of the resulting web service doesn't need to know about the underlying component and the specific parameters you used to create the new RESTful web service.

If you need to write your own components, you can do so in Java, Python or server-side JavaScript.

The site has a link to a life demo as well.

jbrendel
A: 

For a REST framework, I'd recommend JAX-RS (it's a part of the Java EE 6 API, or you can use it on its own). Jersey is the reference implementation, but there are others.

For JSON handling, you have two options:

  1. Use the Jersey-JSON extension, with JAXB annotations on your entity classes.

  2. Jackson. Setting it up will be slightly more work at the start, but I found it easier to deal with in the long run.

Mike Baranczak
Thanks for your answer!
Thành Lê
A: 

I would also suggest having a look at the Restlet Framework which supports JAX-RS but has much more capabilities thanks to its Restlet API (client-side and server-side). It is also available in 5 consistent editions for Java SE, Java EE, GWT, GAE and Android!

Best regards,

Jerome

Restlet ~ Founder and Technical Lead

Jerome Louvel