When abstract mapping defines both optional attributes and content, content may 
be skipped if attributes are missing
--------------------------------------------------------------------------------------------------------------------

                 Key: JIBX-227
                 URL: http://jira.codehaus.org/browse/JIBX-227
             Project: JiBX
          Issue Type: Bug
          Components: core
    Affects Versions: JiBX 1.1.6
            Reporter: Dennis Sosnoski
            Assignee: Dennis Sosnoski


With the following binding snippet:

  <mapping abstract="true" type-name="tns:PreferencesType" 
class="anything.PreferencesType">
    <collection field="prefCollectionList" create-type="java.util.ArrayList">
      <structure type="anything.PreferencesType$PrefCollection" 
usage="optional" name="PrefCollection">
        <collection field="commonPrefList" create-type="java.util.ArrayList">
          <structure map-as="tns:CommonPrefType" name="CommonPref"/>
        </collection>
        <collection field="vehicleRentalPrefList" 
create-type="java.util.ArrayList">
          <value style="element" name="VehicleRentalPref" 
type="java.lang.String"/>
        </collection>
        <structure map-as="tns:PrivacyGroup" field="privacyGroup" 
usage="optional"/>
        <value style="attribute" name="TravelPurpose" field="travelPurpose" 
usage="optional"/>
      </structure>
    </collection>
    <structure map-as="tns:PrivacyGroup" field="privacyGroup" usage="optional"/>
  </mapping>
  <mapping abstract="true" type-name="tns:ProfileType" 
class="anything.ProfileType">
    <value style="element" name="Accesses" field="accesses" usage="optional"/>
    <structure map-as="tns:PreferencesType" field="prefCollections" 
usage="optional" name="PrefCollections"/>
    <value style="attribute" name="RPH" field="RPH" usage="optional"/>
  </mapping>

the generated code skips unmarshalling the prefCollectionList value if neither 
of the (optional) attributes in tns:PrivacyGroup are present.

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

        

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to