Running JBoss 4.2.3.GA with RestEasy 1.1.GA and am/was getting 'Invalid JSON 
namespace..." error.   I am trying to return a bean that has a collection in 
it.  Without the JAXB annotation, it runs fine, but I am missing the data for 
that collection.   After reading the docs, I added the below annotations to my 
bean.  I also made sure that all beans referenced further down in the object 
graph were all annotated one way or another.   Now, with the annotation below, 
I get almost a full object returned in JSON and XML EXCEPT for the collection 
that I annotated.

@Mapped(namespaceMap = {@XmlNsMap(namespace = 
"",jsonName = "")})

Sorry for asking this here as it seems to be a JAXB issue but I would like to 
understand what I amdoing wrong or not doing.

 The doc says "For example, if you defined your JAXB namespace within your class like this: "  but I am not doing that, so I thought I 
would be 'exempt', but apparently not.  I would appreciate it if someone could 
point me in the right direction to understand what is going on.  I have a lot 
of beans to expose thru REST and would really like to understand what is going 
on and not just cut/paste my way thru this.

Thanks in advance,

Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today!
Resteasy-users mailing list

Reply via email to