I've seen this kind of thing work fine for Hibernate things, but haven't tried 
with OpenJPA.   Definitely sounds like an issue on their side.   Please let us 
know how it works out with them and if a solution can be found.

Thanks!
Dan

On Sat December 12 2009 5:15:15 pm KARR, DAVID (ATTCINW) wrote:
> I'm building an app that retrieves data with JPA (OpenJPA right now) and
> tries to serialize it in xml or json with CXF.  I'm using annotations on
> the domain class to specify both the logical JPA (not physical) and JAXB
> behavior (with the physical JPA in XML config).  In theory I would think
> this should work, but in my first test I found that CXF didn't serialize
> the object that I retrieved from JPA.
> 
> After some thinking, I thought to write some debug code that prints out
> the runtime annotations on the class, both for the class of the returned
> instance, and the class that it's declared as.  What I found (because I
> realized I should have expected this) is that the runtime class didn't
> have the required annotations that the declared class did.  When JPA
> enhanced the classes, it didn't copy the annotations.  I'm going to ask
> about this on the OpenJPA list, but I was wondering if someone has some
> experience with this kind of thing from the CXF/JAXB point of view.
> 

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

Reply via email to