cardsharp wrote:
I've done it and it works great.
Short answer: Hibernate and Axis both deal with POJO's so you'll be fine.
Long(er) answer: You'll want to watch out for Lazy Initialization Exceptions because when Axis serializes the Hibernate object, chances are good that it will try to serialize the WHOLE object. If your Hibernate Session is not open, you may see Lazy Initialization Exceptions. The solution is to keep your session open and limit the methods accessible to the object in Axis. Also, you'll want to watch out for too much data being serialized. Axis can go crazy and serialize your whole object graph. You can solve this using Lazy collections and proxied objects and if things get really interesting you might need to use a custom serializer for axis to detect Hibernate proxy objects and only serialize the ID and Version.
You just saved my day with this reply, it was really helpful.
I couldn't keep my session opened and the @Proxy annotation didn't work fine (I think I'm too dumb to get this working), so I looked for other solutions.
I specified the @XmlAccessorType annotation to my entity and to the fields I didn't want to bring I put @XMLTransient annotation so axis don't try to serialize them.
The post bellow helped me a lot:
http://blog.bdoughan.com/2011/06/using-jaxbs-xmlaccessortype-to.html
I hope this helps others with the same problem.
I am really sorry for my awful spelling, just wanted to help.