RESTful service with HyperJaxb3 (Part 3 – Benefits)

What advantages does this RESTful XML based CRUD have over conventional methods like AL DSP or SOAP/WSDL?

First and foremost, it’s really, really, really simple. But also…

  • Having the XSD at the core of the project makes the data model very easy to control.
  • HyperJaxB3 makes the generation of marshal-able Java sources and JPA entities really easy.
  • REST’s flexibility around content formats opens the application up for use by many different clients.
  • Using JEE6’s simplified WAR packaging model makes the application project small and easy to package and deploy.
  • JPA takes the effort out of entity persistence code and opens up lots of vendor choice.

Overall the service I have created here does basic XML based ‘CRUD’ persistence over HTTP using RESTful web-services in just 1 XSD, 2 Java classes and 4 xml configuration files. Very simple.

Finally REST with XML gives you the benefits of having a structured symantic model without the costs of using WSDL’s to define the service interface. Not using WSDL precludes you from using WS-* standards, but many people get on just fine without them.