Well, so, I've been working on the soggy saga of JAX-RS + Aegis + Jettison. I won't repeat other recent messages too much.
Aegis likes to write namespaces. There is no option to use it unqualified. Jettison is really weak on namespaces. It someone to know all the namespaces and prefixes in advance of creating a StaX stream. That's not very realistic for Aegis. Jettison doesn't write out the definition of namespaces for you. You tell it that namespace X maps to prefix P, and it writes strings of the form P.qqqq, and never writes a definition of P. I have danced around all of this by making the JAX-RS Aegis provider write to DOM first, and then collect all the namespace prefixes, and then push it to jettison. I have no idea how to make the read side work consistently in any non-brittle way. Given that any sort of object, in any package, could turn up as a subclass, there's just no way to know what all the namespaces will be in advance. More to the point, when reading, seeing 'ns3.bloop', there's no way to tell what namespace should go with ns3. Very simple cases work where there's only one namespace. This might be addressed by prefixing an actual namespace map, and reading it. Alternatively, we could use a completely different scheme for handling namespaces than Jettison. Instead of adding prefixes to the element names, put them all in attributes (say, well, 'xmlns' attributes, by URI). Then we wouldn't lose any information. It could be argued that this combination is just a really bad idea. If you want JSON, you want a binding that can do unqualified elements. And if the DOSGi gang wants to avoid JAX-B that badly, perhaps someone from in there would like to add unqualified support to Aegis?