Unmarshalling Dozer mapping files to provide a mapping library

blouge

New Member
I'm trying to unmarshall some dozer mapping files in order to provide a mapping availability library to a number of applications. But i cant get the JaxB annotations to work correctly. Either the list of mappings us unmarshalled as null or emptyFrom the mapping file, all i'm interested in is. \[code\]<?xml version="1.0" encoding="UTF-8" standalone="no"?><mappings> <mapping> <class-a>package.MySourceClass</class-a> <class-b>other.package.DestinationClass</class-b> </mapping></mappings>\[/code\]I have a mappings class\[code\]@XmlRootElement(name="mappings")@XmlAccessorType(XmlAccessType.FIELD)public class Mappings { @XmlElementWrapper(name="mappings") private List<Mapping> mappingEntries = null;//Getters and setters omitted\[/code\]and A mapping class\[code\]@XmlRootElement(name="mapping")@XmlAccessorType(XmlAccessType.FIELD)public class Mapping { @XmlElement(name ="class-a") private String classA; @XmlElement(name = "class-b") private String classB;\[/code\]I've tried numerous combinations of the annotations and I cant figure out what i'm doing wrong.Can someone point me in the right direction.
 
Back
Top