[Config: Eclipse, JUnit, Spring, 1.1.6a] I have 2 classes: ClipProperties and ClipPropertiesList. Their classes and jibx mappings are listed here.
ClipProperties is an uuid and a map: ============================== clipproperties.jibx.xml ----------------------- <binding> <format type="java.util.UUID" serializer="mycom.Formatter.fromUUID" deserializer="mycom.Formatter.toUUID" /> <mapping name="map" class="java.util.Map" marshaller="mycom.HashMapper" unmarshaller="mycom.HashMapper"/> <mapping name="clipproperties" class="mycom.ClipProperties"> <value name="id" field="id"/> <structure field="properties"/> </mapping> </binding> ClipProperties.java ------------------- class mycom.ClipProperties { UUID id; Map<String, String> properties; ... } ============================== and ClipPropertiesList is a list of ClipProperties instances. ============================== ClipPropertiesList.java ----------------------- class mycom.ClipPropertiesList { List<ClipProperties> list ; ... static List<ClipProperties> create () { return new ArrayList<ClipProperties> () ; } } ============================== Both are used in separate siturations. I am having problems getting them to work together. I have found that doing: ============================== clippropertieslist.jibx.xml --------------------------- <binding> <format type="java.util.UUID" serializer="mycom.Formatter.fromUUID" deserializer="mycom.Formatter.toUUID" /> <mapping name="map" class="java.util.Map" marshaller="mycom.HashMapper" unmarshaller="mycom.HashMapper"/> <mapping name="clippropertieslist" class="mycom.ClipPropertiesList"> <collection field="list" factory="com.quantel.dino.ClipPropertiesList.create"> <structure name="clipproperties" type="mycom.ClipProperties"> <value name="id" field="id"/> <structure field="properties"/> </structure> </collection> </mapping> </binding> ============================== produces the correct output but I would actually like to embed the ClipProperties mapping inside the ClipPropertiesList mapping so that I don't have to maintain both independantly. Each time I try, I either get "no marshaller defined for ClipProperties" or "Multiple bindings defined for ClipProperties" The closest I've come so far is: ============================== <binding> <mapping name="clippropertieslist" class="mycom.ClipPropertiesList"> <collection field="list" factory="mycom.ClipPropertiesList.create"> <structure name="clipproperties"/> </collection> </mapping> </binding> ============================== Which gives the error: org.springframework.oxm.jibx.JibxMarshallingFailureException: JiBX marshalling exception: No marshaller defined for class com.quantel.dino.ClipProperties; nested exception is org.jibx.runtime.JiBXException: No marshaller defined for class com.quantel.dino.ClipProperties Can anyone help with getting them to work together in a more nested configuration? ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users