JiBX
  1. JiBX
  2. JIBX-193

CLONE -All items in unordered structure must be optional at tag "structure"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major 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 :
      0

      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)

        Activity

        Hide
        lokesh added a comment -

        i cant the result of this bug. can u provide me the details abt this how its fixed.

        Show
        lokesh added a comment - i cant the result of this bug. can u provide me the details abt this how its fixed.
        Hide
        Dennis Sosnoski added a comment -

        The current code has this check removed, since it's no longer needed.

        Show
        Dennis Sosnoski added a comment - The current code has this check removed, since it's no longer needed.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            lokesh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: