XmlBeans
Résolu/Fermé
bourbia
Messages postés
1
Date d'inscription
Statut
Membre
Dernière intervention
-
crapoulou Messages postés 28195 Date d'inscription Statut Modérateur, Contributeur sécurité Dernière intervention -
crapoulou Messages postés 28195 Date d'inscription Statut Modérateur, Contributeur sécurité Dernière intervention -
Bonjour,
I'm getting a problem using newIstance of SchemaTypeLoader.
Here is my code:
The problem is that I have another class a.b.AnotherPrefixEventNameDocument (same root element in 2 XML buffers), so I'm getting this exception:
java.lang.ClassCastException: a.b.impl.AnotherPrefixEventNameDocumentImpl
Can you help please?? (I'd like to avoid using namespaces if possible :) )
Hamdi
I'm getting a problem using newIstance of SchemaTypeLoader.
Here is my code:
SchemaTypeLoader stl = XmlBeans.typeLoaderUnion( new SchemaTypeLoader[] { x.y.MyPrefixEventNameDocument.type.getTypeSystem(), XmlBeans.getContextTypeLoader()} ) ; SchemaType st = stl.findDocumentType(new QName("","EventName","MyPrefix")); //I don't use namespace EventName evt = (MyPrefixEventNameDocument)stl.newInstance(st, null);
The problem is that I have another class a.b.AnotherPrefixEventNameDocument (same root element in 2 XML buffers), so I'm getting this exception:
java.lang.ClassCastException: a.b.impl.AnotherPrefixEventNameDocumentImpl
Can you help please?? (I'd like to avoid using namespaces if possible :) )
Hamdi