I'm using CXF 2.3.3 and Jackson 1.6.2.

I asked about this on the Jackson list, but perhaps there's a different
way to look at this from the JAXB or CXF point of view.

I have some attributes defined as type "id" in my XML schema.  When CXF
renders this as XML, it just renders the ID value, which is what I need.
When this is rendered as JSON, it appears Jackson is trying to be a
little more intelligent than I would have liked.  Instead of just
rendering the ID value, it's rendering the object the ID value refers
to.  I can see this would be useful in some circumstances, but it's not
useful for how we're using it.  I could punt and just change my ID
attributes to "string", but I'd prefer not to do that.

How would I configure the Jackson interface in CXF so that ID attributes
are rendered as the value, not as the object it refers to?

I suppose it's likely that I'm going to have to implement a JAXB binding
file that specifies for particular attributes that are of type ID, to
generate a specific annotation that will cause it to be rendered as a
raw value, instead of an object.  Are there some examples of doing this
somewhere?  I briefly read about the "annox" plugin.  Is that the way to
go here?

Reply via email to