开发者

RESTful Services Samples Generation

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜