Thanks for the answer. I looked at the test-method system before, read on the compile error message that I needed a static method and couldn't figure out how that would work. After your reply, I saw that I misread and it said nonstatic method (just mispelled it in the binding definition at the time). Next time, I'll sleep before sending the question ;-) The test-method works well and is not that big of a problem. Anyway, thanks for all the effort you put in this very usefull and elegant tool.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Sosnoski Sent: Wednesday, March 28, 2007 6:44 PM To: JiBX users Subject: Re: [jibx-users] Marshalling roblem with optional structure Hi Stéphan, This is another form of the documented JiBX issue highlighted on the bugs page: http://jibx.sourceforge.net/bugs.html As that suggests, using a test-method on the containing <structure> should give you what you want. I realize this is an inconvenience, but fixing it with the existing code generation model is more than I'm willing to take on so it'll have to wait until I can do the 2.0 rewrite of the code generation. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Stephan Bourges wrote: > I have a problem with the marshalling result with optional structures. > For example, if I have the following piece in my binding file, and all > elements within are null, I still get a <Authentication/> tag in the > resulting XML. Is this normal? If not, what am I doing wrong? If it > is, how do I ensure the empty tag is not created? > > <structure name="Authentication" usage="optional"> > <value name="status" field="authEnabledStatus" usage="optional" > format="SecurityStatus"/> > <collection name="AuthenticationAlgorithmList" > field="gsmAuthSecAlgorithms" usage="optional" > factory="org.jibx.runtime.Utility.arrayListFactory"> > <structure name="Algorithm" > type="com.tsi.ctp.rmt.aa14.dbobjects.GsmAuthSecAlgorithms"> > <value style="text" field="authAlgorithm" format="AuthAlgorythm" /> > </structure> > </collection> > </structure> > Any help would be greatly appreciated > > Stéphan Bourges > Advisory System Engineer > /Syniverse Technologies/ > Office: 813.637.5464 > Mobile: 813.310.3492 > > > > > ---------------------------------------------------------------------- > -- > > ---------------------------------------------------------------------- > --- 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=DEV > DEV > ---------------------------------------------------------------------- > -- > > _______________________________________________ > jibx-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
