Hi, I'm doing just that. I've got a web application that has the axis2 libraries. It provides a web service as well as a web application that maintains a database. I use the Spring library to provide both the web service and the application with a DAO that interfaces with Hibernate. I use Spring's OpenSessionInViewFilter to keep the session open until the final result is rendered, whether it's axis or a jsp doing the rendering. If you don't want to use spring, you can write your own servlet filter that opens a Hibernate session coming in and closes it going out. Michael Davis from sunny Ottawa
-----Original Message----- From: Steve S [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 21, 2007 4:36 PM To: [email protected] Subject: Returning Hibernate detached objects in Axis2 Has anyone tried to return a Hibernate detached object in an Axis2 web service? I have an object with lazy-loaded collections of objects. When I try to call the web service, I get a LazyInitializationException because the serializer (Axiom? StAX?) is trying to iterate over the collection. What I need is a way to skip the attribute if it is a PersistentSet that hasn't been initialized. I suspect that the actual coding is pretty simple, the trick is figuring out where to put it, and how to get Axis to use it. Does anyone have any ideas? Thanks, Steve
