JSON Web Service over simple HTTP GET/POST
Can you suggest a way or a framework or etc. for Java EE in order to make simple HTTP GET/POST calls to some web services like in SOAP web services but transport format must be JSON; not XML and there must not be any wrapper around(may be some vey lightweight 开发者_JAVA技巧header) like SOAP etc.
In short, my purpose is to serve web services using JSON and HTTP Get/Post in a maximum possible lightweight solution.
A JSON Web Service can be as simple as a servlet that parses the JSON text data from the request, and outputs text in JSON format in the response. JSON is a pretty simple format - you might not need a framework.
My favorite RESTful web services framework is Restlet.
If you want the ability to support a SOAP service as well as a RESTful one, check out Apache CXF.
Both of these frameworks support JSON, and either are suitable for both client side and server side applications.
Have a look at Dropwizard. Their documentation is very good and should have you writing REST services using JSON as transport very quickly.
Saw the date of the post just now oops...
精彩评论