Hi Richard,

On my project, we have two "transport" layers (and we also provide a Java
Client):
- SOAP
- REST (which can return several representations of the same data).

So, we used the POJO serialization/deserialization way.
Since we provide a client API, we realized that our "client" POJOs could
be slightly different than our "persisted" POJOs. I agree there is some
redundancy, but, for example, there is no need to expose the technical id
or the (Hibernate) version to the "transport" layer. All our "client"
POJOs have natural keys.

For some objects (mainly the exceptions), we used XSD+XSLT to generate the
actual Java exceptions and their REST envelope (JAXB does not like the
Exception ;-).

Hope this help.
-- 
Vincent Ricard

Reply via email to