Hi lingan,
usually it is a good advice to first try to marshal an object and tune
your mapping that the output looks like you want it to. The advatage is
that you see the influence of your mapping to the output. In most cases
you will also be able to unmarshal these documents thereafter.
Regards
Ralf
lingan schrieb:
Hi
I am trying to unmarshall an XML like this
<schooling>
<grade type="5">
</schooling>
the java classes are like
Class School {
Grade grade ;
}
Class Grade {
Type type ;
}
Class Type {
String value;
Getter/Setter for Value
}
The Mapping I did
<class name = "src.Schooling" >
<map-to xml="schooling"/>
<field name ="grade" type = "src.Grade">
<bind-xml name="grade" />
</field>
</class>
<class name = "src.Grade" >
<map-to xml="grade"/>
<field name = "type" type = "src.Type" >
<bind-xml name="type" />
</field>
</class>
<class name = "src.Type" >
<map-to xml="type"/>
<field name = "value" type = "string" set-method="setValue">
<bind-xml name="type" node="attribute" location="grade"/>
</field>
</class>
No Exception is thrown but School.getGrade().getType().getValue() returns
Null .
Any input is higly appreciated .
Thanks.
--
Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany
Tel. +49 7071 3690 52
Mobil: +49 173 9630135
Fax +49 7071 3690 98
Internet: www.syscon.eu
E-Mail: [EMAIL PROTECTED]
Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email