I need to expose some services of the web application to remote clients via XML interfaces over http. A number of provided services is limited (3-7), both request and response should be kept simple and do not require any special data types or cross-entity relations.
My goal is to keep the code clean and clear and have robust and performant application. I would really appreciate your advices regarding the proper XML binding\processing tool to be used for that task.
UPD: My bad, haven't mentioned that restlet is required for implementation, however, as far as I am concerned, it does not impose any restrictions on the xml tool to be used.
Thanks in advance.
The JAX-RS specification (JSR-311) provides a standard means of creating RESTful services over HTTP. There are several JAX-RS implementations: Jersey, RESTEasy, Wink. JAXB (JSR-222) is the standard binding layer (objects to/from XML) for JAX-RS, and there are several implementations: MOXy, Metro, JaxMe, etc.
These implementations are also come pre-bundled with Java EE application servers (i.e. GlassFish and WebLogic contain Jersey).
Here is an example I put together using Jersey & MOXy in GlassFish:
We've done some work recently using Apache CXF, and found its JAX-RS support to be simple and allow us to write very DRY friendly code.
There is a reasonable amount of flexibility, e.g. several different data binding layers to choose from.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With