Can't use test-method in strucutures in a collection
----------------------------------------------------

                 Key: JIBX-424
                 URL: http://jira.codehaus.org/browse/JIBX-424
             Project: JiBX
          Issue Type: Bug
          Components: BindGen
    Affects Versions: JiBX 1.2.3
            Reporter: aahmed
         Attachments: testjibxmvn.zip

I have a binding like this:

        <collection name="SomeList" get-method="getElementList" 
set-method="setElementList" create-type="java.util.ArrayList" 
item-type="test.Element" ordered="false">
            <structure name="ElementA" map-as="ElementAMapping" 
test-method="isA" usage="optional" />
            <structure name="ElementB" map-as="ElementBMapping" 
test-method="isB" usage="optional" />
            <structure name="ElementC" map-as="ElementCMapping" 
test-method="isC" usage="optional" />
        </collection>


This results in the following error:
Caused by: org.jibx.runtime.JiBXException: Property definition not allowed for 
collection items at tag "structure"(line 5, col 102, in binding.xml)
        at 
org.jibx.runtime.impl.UnmarshallingContext.throwStartTagException(UnmarshallingContext.java:2847)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalStructure(BindingBuilder.java:1227)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalStructureChildren(BindingBuilder.java:1039)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalStructure(BindingBuilder.java:1495)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalStructureChildren(BindingBuilder.java:1041)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalMapping(BindingBuilder.java:1847)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalMappings(BindingBuilder.java:1170)
        at 
org.jibx.binding.def.BindingBuilder.unmarshalBindingDefinition(BindingBuilder.java:2169)
        at org.jibx.binding.Utility.loadBinding(Utility.java:300)
        ... 23 more



A maven project is attached, run "mvn compile process-classes".

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

        

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to