Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any easy REST tutorials for Java? [closed]

Tags:

java

rest

Every tutorial or explanation of REST just goes too complicated too quickly - the learning curve rises so fast after the initial explanation of CRUD and the supposed simplicity over SOAP. Why can't people write decent tutorials anymore!

I'm looking at Restlet - and its not the best, there are things missing in the tutorial and the language/grammar is a bit confusing and unclear. It has took me hours to untangle their First Steps tutorial (with the help of another Java programmer!)

RESTlet Tutorial Comments

Overall I'm not sure exactly who the tutorial was aimed at - because there is a fair degree of assumed knowledge all round, so coming into REST and Restlet framework cold leaves you with a lot of 'catchup work' to do, and re-reading paragraphs over and over again.

  1. We had difficulty working out that the jars had to be in copied into the correct lib folder.

  2. Problems with web.xml creating a HTTP Status 500 error -

The server encountered an internal error () that prevented it from fulfilling this request

, the tutorial says:

"Create a new Servlet Web application as usual, add a "com.firstStepsServlet" package and put the resource and application classes in."

This means that your fully qualified name for your class FirstStepsApplication is com.firstStepsServlet.FirstStepsApplication, so we had to alter web.xml to refer to the correct class e.g:

original:

<param-value>          firstStepsServlet.FirstStepsApplication </param-value> 

should be:

<param-value>          com.firstStepsServlet.FirstStepsApplication </param-value> 

Conclusion

I was under the impression that the concepts of REST were supposed to be much simpler than SOAP - but it seems just as bad if not more complicated - don't get it at all! grrrr

Any good links - much appreciated.

like image 234
Vidar Avatar asked Dec 02 '08 11:12

Vidar


People also ask

What is REST API in Java example?

Java RESTful Web Services API Java API for RESTful Web Services (JAX-RS) is the Java API for creating REST web services. JAX-RS uses annotations to simplify the development and deployment of web services. JAX-RS is part of JDK, so you don't need to include anything to use it's annotations.

Which API is available from Java if you want to create RESTful applications?

Jersey is a Java framework for creating RESTful services that also support JAX-RS APIs. It has various useful features and utility functions that simplify the development of RESTful services.

Is REST API Java?

The Representational State Transfer (REST) is an architectural style for designing distributed hypermedia systems. A REST API is an API that conforms to the constraints of REST architectural style. There are several ways to make a REST API in Java.


1 Answers

Could you describe precisely what caused you troubles in our Restlet tutorials? We are interested in fixing/improving what needs to.

Did you check the screencasts? http://www.restlet.org/documentation/1.1/screencast/

Otherwise, there is a Restlet tutorial in the O'Reilly book that we wrote in their Chapter 12.

If you still have troubles, please contact our mailing list: http://www.restlet.org/community/lists

Best regards, Jérôme Louvel

Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com

like image 95
Jerome Louvel Avatar answered Oct 14 '22 00:10

Jerome Louvel