-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate and Axis
PostPosted: Sun Apr 10, 2005 12:15 pm 
Regular
Regular

Joined: Fri Mar 26, 2004 11:45 am
Posts: 75
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 10, 2005 1:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Have you tried the XML mapping features of HB3?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 10, 2005 1:55 pm 
Regular
Regular

Joined: Fri Mar 26, 2004 11:45 am
Posts: 75
As far as I understand Hibernate3 allows generating XML documents from POJOs based on the metadata information in the mapping files. Those XML documents must conform to the XSD schema types, which I register with my web service definition.
What would be the best way to ensure this?

Even if I get POJOs to be marshalled correctly to XML on the server side, I am not sure if HB3 allows converting XML back to the POJO on the client side so that my server and client use the same POJO classes.
Can HB3 take an XML document and populate corresponding POJO object with that data?

Thanks.

Alec


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 10, 2005 2:06 pm 
Regular
Regular

Joined: Fri Mar 26, 2004 11:45 am
Posts: 75
As a follow up, it would be really nice to have Hibernate generate an XSD schema based on the information from the Hibernate mapping files.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.