JAX-RS Services on Google App Engine

I am developing a Google App Enigne application that uses some REST services and in turn offers web services. I am using the GAE Eclipse plugin. I have 2 questions:

  • What is the best JAX-RS library to use with GAE at present? I would like to use Jersey because I understand that this is the most β€œstandard” library (right?), But I can use any in principle ... I searched the documentation, but I only found samples on blogs that only work with old versions of jersey etc.

  • For the web services I have to offer, I was thinking about using JAX-RS, but now I'm not sure if this is the best option ...

+4
source share
2 answers

You can use Jersey 1.5. You can see all the frameworks that will play on GAE at http://code.google.com/p/googleappengine/wiki/WillItPlayInJava

But GAE implemented version 1.7.5 as an experimental service endpoint, which in the long run is a leisure service. Check out https://developers.google.com/appengine/docs/java/endpoints/

For a web service, I don't know if you have the value of soap service. JAX-RS is a leisure service specification, you should use JAX-WS instead. I am not trying to combine with this specification.

+3
source

After doing a little research on this issue, I found out that the best way to offer web services from the Google App Engine is to use Google Cloud Endpoints , which is still an experimental technology, but as far as I tried, it works well. In addition, it is very well integrated with GAE and Google Plugin for Eclipse .

To enable the REST services from Google App Engine, I decided to use only the built-in Java HTTP client library, as described here . I don’t know if this is the best, but it is very simple and you avoid the compatibility issues that might arise between the GAE API and JAX-RS , such as Jersey .

To work with JSON in GAE (very useful for RESTful services), I use Google gson , which is a Java library that can be used to convert Java objects to their JSON representation and vice versa.

+2
source

All Articles