[
http://jira.codehaus.org/browse/JIBX-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Sosnoski resolved JIBX-151.
----------------------------------
Resolution: Won't Fix
> Collection which contains a to-be-ignored structure does not work correctly
> ---------------------------------------------------------------------------
>
> Key: JIBX-151
> URL: http://jira.codehaus.org/browse/JIBX-151
> Project: JiBX
> Issue Type: Bug
> Affects Versions: JiBX 1.1
> Environment: I am using JiBX with JDK 1.4 on Windows XP with Eclipse
> in an JBOSS environment.
> Reporter: J. Witzel
> Assignee: Dennis Sosnoski
> Priority: Minor
>
> I defined my own unmarshaller to translate code-elments like <code>DE</code>
> into existing objects read from my database. The problem occurs when i try to
> unmarshall a collection of such objects:
> Binding:
> <collection set-method="setNationalities" item-type="customizing.Country"
> factory="io.XMLBindingUtils.factorySet">
> <structure name="citizenship">
> <structure name="code" type="customizing.Country"
> unmarshaller="io.CustomizingDataUnmarshaller"/>
> </structure>
> </collection>
> XML-file snipet:
> <citizenship>
> <code>US</code>
> </citizenship>
> <citizenship>
> <code>DE</code>
> </citizenship>
> This code should create a Set of Country objects and call setNationalities
> to store the set in my object.
> However setNationaties is always called with an empty Set. If remove the tag
> <citizenship> from XML-file and from the binding it works (see below) ! Note,
> that my unmarshaller works correctly. It finds and returns Country-Objects as
> expected but the add-method of the Set is called with an java.lang.object
> instead of a customizing.Country object.
> Binding:
> <collection set-method="setNationalities" item-type="customizing.Country"
> factory="io.XMLBindingUtils.factorySet">
> <structure name="code" type="customizing.Country"
> unmarshaller="io.CustomizingDataUnmarshaller"/>
> </collection>
> XML-file snipet:
> <code>US</code>
> <code>DE</code>
> This seems to be a bug. I hope you can tell me a workaround. Is there any
> other way to ignore the citizenship tag ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs