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=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

Reply via email to