views:

31

answers:

1

What is the fastest way to create a list of RESTful services from data structure or simple XML files? (even with configuration files.) Is there any tools that can read a DB or a Python/Java/.Net class and generate RESTful services? Prefer something that runs on Apache or Tomcat.

Programming language is not a concern, I just need to generate a list of samples in a short amount of time.

Thanks a bunch!

A: 

Since you're using Java I would look at the JAX-RS specification, it is JSR-311 (http://jcp.org/en/jsr/detail?id=311). Part of the specification is the ability to annotate classes (called resources in the spec) to indicate that the methods of the class should be REST endpoints.

Sun/Oracle has produced a reference implementation called Jersey that, in my opinion, is very good.

I wrote a little tutorial a while back describing how to do this. It is at: http://blogs.captechconsulting.com/blog/jack-cox/implementing-iphone-friendly-rest-service-jersey-spring-and-jaxb

Jack

Jack Cox