Greetings everybody.
I am working on a project architecture, which uses Hibernate, Axis and Spring. I use Hibernate tools to generate POJOs from an existing database schema. I also implemented a DAO layer, which runs queries and returns collections of those POJOs. I am trying to expose my DAO layer as a webservice, but am not sure what would be the best way to do this.
My current intension is to use Castor (or any other XML-to-Java framework) to marshal and unmarshal POJOs to and from XML. I would then register Castor serializers and deserializers with Axis to send Hibernate POJOs over the wire.
It seems pretty straightforward, but I would like to avoid using Castor classes generated for the Hibernate POJOs.
So, my question is what is the best way to get Hibernate-generated POJOs sent over SOAP using Axis? I am not adamant about using Castor, so I alternative solutions would be more then welcome.
My requirements are that I don't want to have Java-specific beanMappings in my webservice descriptor and I don't want to have multiple classes (e.g. one POJO class, and one Castor-generated class for this POJO class) corresponding to each Hibernate POJO class.
I would appreciate anybody sharing their solutions to this problem.
Thanks.
Alec
|