Well, I guess the "normal" way to accomplish this is to make the hibernate and 
jaxb objects to be one in the same.   Basically, don't generate them from the 
xsd.   Add the JAXB annotations (use the generated objects as examples) to all 
the hibernate objects so you can just return them directly.    Not sure how 
well your hibernate objects map to the jaxb/xsd model.   If they are 1:1, that 
might work well.

Dan
 

On Tue November 24 2009 1:57:54 pm Ralf Heydenreich wrote:
> Hi all,
> I'm using CXF for a short time. The task is to read some data from database
>  (using Hibernate) and sending them over a webservice. Now the question is
>  if there is a convenient way to convert the entities from the database
>  (which I got through Hibernate) to the corresponding web service entities
>  (which I've generated from XSDs). Since there are some nested properties
>  (which are in turn Lists) it is not so easy to convert the entities "by
>  hand". I found Springs BeanUtils class which does the basic function for
>  copying some properties. Or is there a completely different approach for
>  this?
> 
> TIA,
> Ralf.
> 
> --
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to