Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] xsi:tpye duplicates elemnt name

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




   <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:


@XmlRootElement(name = "PartVersion")
@XmlType( name="PartVersion",
          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 







PROSTEP AG, Dolivostraße 11, D-64293 Darmstadt
HR: Amtsgericht Darmstadt, HRB 8383
Vorstand: Dr. Bernd Pätzold (Vorsitz),
Dr. Karsten Theis
Aufsichtsrat: Dr. Heinz-Gerd Lehnhoff (Vorsitz)

Back to the top