On Tue October 13 2009 12:54:05 pm KARR, DAVID (ATTCINW) wrote:
> I currently use @Xml annotations to specify the fields I want to include
> in my REST responses.  I'm seeing a situation where I might need to
> augment that with either XML config, or even dynamic code.  The only
> changes I would make in the XML config or dynamic code would be to
> exclude certain fields.  If it's too hard to use both annotations and
> XML config, I would use XML config entirely.
> 
> Can someone describe my choices for how I might get this done?

I had a chat with Alessio on IRC about this.   JBoss has a project called 
JAXBIntroductions that provides controlling the JAXB context via an XML 
properties file.   See:
http://www.jboss.org/community/wiki/JAXBIntroductions

The main issue is it doesn't currently support XmlTransient and several other 
annotations.   There is a jira for it:
https://jira.jboss.org/jira/browse/JBWS-2751

Anyway, that's probably the place to start looking for solutions on how to do 
this. 

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

Reply via email to