Hello all,

I'd like to move Hibernate generated objects (generated with hbm2java, of course) across the wire with SOAP.

There are two problems:

First, Hibernate generates collection accessors. This is great, but these are, by necessity, untyped. The Axis serializer cannot handle this.

Second, it often comes to pass that we are only interested in a subset of the object. In particular, we often do NOT want to move an entire collection accross the wire. Unfortunately, the serializer will call all accesors on the hibernate object, and CGLIB will, of course, do it's job and get everything known about that object.

We have so far tried to solve these problems by writing an additional code generator that creates so-called "Data Transfer Objects" (Fowler's term, also abreviated DTO) that have a) typed array accessors, and b) the ability to specify a subset of interesting properties. We aren't quite done with this effort, but it's so far working out well. The DTOs are generated by delegating work to an underlying hibernate class.

Has anyone faced and solved, these probelms? If so, I'd like to hear about it. In particular, I was hoping that there is something obvious that I may have missed.

With kind regards,
Josh Rehman



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to