Bonjour,
J'essai de générer un fichier XML à partir d'une grappe d'objets. J'utilise pour cela l'API Castor XML.
J'ai généré mon fichier de mapping, et lorsque je lance le marshalling , j'ai une exception du type :
Exception in thread "main" java.lang.IllegalArgumentException: list is not a valid FieldMappingCollectionType
ci-dessous une partie du fichier de mapping :
En vérifiant le tutorial sur le site de castor, il me semble que tout est bien configuré.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 <?xml version="1.0" encoding="UTF-8"?> <mapping> <class name="monpackage.Report" auto-complete="false"> <map-to xml="report"/> <field name="topMargin" type="string" required="false" direct="false" transient="false"> <bind-xml name="topMargin" node="attribute" reference="false"/> </field> <field name="isSummaryNewPage" type="string" required="false" direct="false" transient="false"> <bind-xml name="isSummaryNewPage" node="attribute" reference="false"/> </field> <field name="orientation" type="string" required="false" direct="false" transient="false"> <bind-xml name="orientation" node="attribute" reference="false"/> </field> <field name="parameters" type="java.util.List" required="false" direct="false" transient="false" arraylist="list"> <bind-xml name="parameter" node="element" reference="false"/> </field> </class> </mapping>
Il y a t'il une personne pour éclairer ma lanterne ?
Merci d'avance !
Partager