Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.1
-
Fix Version/s: JiBX 1.1.6
-
Component/s: core
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
I am trying to use flexible="true", which requires ordered="false". When setting these 2 attributes on a mapping or structure tag, it throws an exception if a nested structure element is not optional (taken from the example in the tutorial):
<?xml version="1.0" encoding="UTF-8"?>
<binding>
<mapping name="customer" class="Customer" ordered="false" flexible="true">
<structure name="person" field="person" ordered="false" flexible="true">
<value name="cust-num" field="customerNumber"/>
<value name="first-name" field="firstName"/>
<value name="last-name" field="lastName"/>
</structure>
<value name="street" field="street"/>
<value name="city" field="city"/>
<value name="state" field="state"/>
<value name="zip" field="zip"/>
<value name="phone" field="phone"/>
</mapping>
</binding>
[bind] *** Error during code generation - please enter a bug report for this error in Jira if the problem is not li
sted as fixed on the online status page ***
[bind] org.jibx.runtime.JiBXException: All items in unordered structure must be optional at tag "structure"(line 4,
col 75, in mapping/TestMapping.xml)
[bind] at org.jibx.runtime.impl.UnmarshallingContext.throwStartTagException(Unknown Source)
i cant the result of this bug. can u provide me the details abt this how its fixed.