Announcement Announcement Module
No announcement yet.
Sping, Hibernate, and XML marshalling Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sping, Hibernate, and XML marshalling

    Greetings everybody.

    I just posted the following message on the Hibernate forum, but then decided that it may better fit here.

    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:
    1) No Java-specific beanMappings in my webservice descriptor
    2) No multiple classes corresponding to each Hibernate POJO class (e.g. one POJO class, and one Castor-generated class for this POJO class)

    I would appreciate anybody sharing their solutions to this problem.