[ 
http://jira.codehaus.org/browse/JIBX-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski updated JIBX-151:
---------------------------------

    Priority: Minor  (was: Major)
    Assignee: Dennis Sosnoski

This is a bug, but I'm considering it a minor one since you can easily change 
your unmarshaller code to handle the <citizenship> wrapper element as well as 
the <code> element. Considering that there's a workaround, I probably won't fix 
this until the 2.0 rewrite of the code generation.

> 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
>         Assigned To: 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

        

-------------------------------------------------------------------------
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-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to