When using JAXB, I\'d like to remove the excess namespaces/types from my XML elements when using Generics. How can I do this or what am I doing wrong? I\'d like to use Gen
i get the same problem, and resolved it by the advice from Programmatically determine if a JAXB annotation will result in a xsi:type annotation?
just using @XmlAnyElement(lax=true) instead of using @XmlElement on the generic class object (value for this sample).
@XmlAnyElement(lax=true)
@XmlElement