As you may have guessed from the subject line, I'm attempting to map xml with refs. I've read all of the previous posts about IdRefMapperBase and IdDefRefMapperBase, but am still struggling. Does anyone have a complete, working example that they can share?
I'm primarily interested in doing two things: 1. Marshalling / unmarshalling a full object on first occurence, and a ref on subsequent occurrences. In the partial examples that I've seen so far, the "first occurence" has always been in a different part of the schema, as in example 11 in the jibx distribution: <?xml version="1.0" encoding="UTF-8"?> <timetable> <carriers> <carrier code="NL" rating="4"> <url>http://www.northleft.com</url> <name>Northleft Airlines</name> </carrier> <carrier code="CL" rating="9"> <url>http://www.classyskylines.com</url> <name>Classy Skylines</name> </carrier> </carriers> <airports> <airport code="BOS"> <location>Boston, MA</location> <name>Logan International Airport</name> </airport> <airport code="SEA"> <location>Seattle, WA</location> <name>Seattle-Tacoma International Airport</name> </airport> <airport code="LAX"> <location>Los Angeles, CA</location> <name>Los Angeles International Airport</name> </airport> </airports> <routes> <route from="BOS" to="SEA"> <flight carrier="CL" number="796" depart="4:12a" arrive="1:26a"/> <flight carrier="NL" number="328" depart="2:54a" arrive="1:29a"/> <flight carrier="CL" number="401" depart="4:12a" arrive="1:25a"/> </route> <route from="SEA" to="BOS"> <flight carrier="CL" number="634" depart="7:43a" arrive="9:13a"/> <flight carrier="NL" number="508" depart="4:38p" arrive="6:12p"/> <flight carrier="CL" number="687" depart="1:38p" arrive="3:08p"/> </route> </routes> </timetable> All of the carriers appear first, then are referenced in routes. I'm wondering how the situation might be handled where this is not the case, as in, say: <timetable> <routes> <route from="BOS" to="SEA"> <flight number="796" depart="4:12a" arrive="1:26a"> <carrier code="CL" rating="9"> <url>http://www.classyskylines.com</url> <name>Classy Skylines</name> </carrier> </flight> <flight carrier="NL" number="328" depart="2:54a" arrive="1:29a"/> <carrier code="NL" rating="4"> <url>http://www.northleft.com</url> <name>Northleft Airlines</name> </carrier> </flight> </route> <route from="SEA" to="BOS"> <flight carrier="CL" number="634" depart="7:43a" arrive="9:13a"/> <flight carrier="NL" number="508" depart="4:38p" arrive="6:12p"/> </route> </routes> </timetable> I'd like to support this pattern for both marshalling and unmarshalling. Any ideas? 2. Marshalling / unmarshalling lists of refs. I understand that IdDefRefMapperBase is supposed to handle this (with subclassing), but I've been having trouble making it work. I'm hoping that someone has a working example that they can share? Any help would be greatly appreciated. Thanks in advance! -Rich ================ Rich Freedman Talk America [EMAIL PROTECTED] ================ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users