Hello, I'm a JiBX newbie, so I hope that I'm not asking something that is obvious but it's not obvious to me!
I have a Collection of objects and I want to marshal into XML. The examples on SourceForge seem to have an object, and the Collection is on a property of that object. But that's not what I have -- I have a Collection and am trying to marshal it and it's contents. Here is my binding: <binding> <mapping name="customers" class="java.util.ArrayList"> <collection add-method="add" factory="com.domain.app.CustomerValue.listFactory"> <structure name="customer" type="com.domain.app.CustomerValue" > <value name="name" field="customerName"/> </structure> </collection> </mapping> </binding> My listFactory method is: public static List listFactory() { return new ArrayList(); } When I try to bind it, I get the following: [java] Error running binding compiler [java] *** Error during code generation for file 'jibx_bindings/ExceptionCu stomer.xml' - please enter a bug report for this error in Jira if the problem is not listed as fixed on the online status page *** [java] org.jibx.runtime.JiBXException: One or more <mapping> elements must be defined in <binding> [java] at org.jibx.binding.Utility.loadBinding(Utility.java:322) [java] at org.jibx.binding.Utility.loadFileBinding(Utility.java:413) [java] at org.jibx.binding.Compile.compile(Compile.java:296) [java] at org.jibx.binding.Compile.main(Compile.java:385) I'm getting all this with JiBX 1.1.5. I think the mapping element is in the right place. Is it? How do I bind this correctly? Thanks for helping me out . . -- Mike Hostetler http://mike.hostetlerhome.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users