Hello All,
I’m have a problem, that the XML contains the same name on both the element name as well in the xsi:type like
<Versions>
<PartVersion uid="prtvrs--6" xsi:type="bom:PartVersion">
I want them only in case of subtyping like
<ShapeDependentProperty uid="gsdp--9" xsi:type="bom:GeneralShapeDependentProperty">
The annotation used on all classes looks like this:
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name =
"PartVersion")
@XmlType( name="PartVersion",
namespace=http://standards.iso.org/iso/ts/10303/-4442/-ed-1/tech/xml-schema/domain_model,
propOrder = {"classifiedAs","description","id",
…})
public class
PartVersionImpl<T
extends
PartVersion>
extends
BaseObjectImpl<PartVersion>
implements
PartVersion
{
The annotation on the attribute containing the PartVersions looks like
@XmlElement(name = "PartVersion")
@XmlElementWrapper(name = "Versions")
public SetOfPartVersionNonEmpty getVersions( ) {
return versions;
}
Where SetOfPartVersionNonEmpty is just an extension of a Set without further annotations.
There is no package info, the marshaller is created like this
Marshaller marshaller = ctx.createMarshaller();
marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );
marshaller.setProperty( Marshaller.JAXB_SCHEMA_LOCATION, „…“ );
Does anyone have an idea, of how to get rid of these superflous xsi:types ?
Thank you, Carsten