JiBX
  1. JiBX
  2. JIBX-143

empty tags are created even though the values are null in the sub-element tags & mentioned mapping as "optional"

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows XP
    • Number of attachments :
      1

      Description

      Hi,
      I have a binding file as follows :
      <mapping name="ADR_ENTR" class="com.dnb.dlws.binding.SubjBusinessAddressEntryVO">
      <value name="ADR_USG_CD" field="adrUsgCd" usage="optional" />
      <structure name="ADR_ENTR_VW" usage="optional">
      <structure name="ADR_LINE" usage="optional">
      <value name="TEXT" field="adrLine1Text" usage="optional" />
      <value name="TEXT_CD" field="adrLine1TextCode" usage="optional" />
      <value name="DSPL_SEQ_NBR" field="adr1dsplSeqNbr" usage="optional" />
      </structure>
      <structure name="ADR_LINE" usage="optional">
      <value name="TEXT" field="adrLine2Text" usage="optional" />
      <value name="TEXT_CD" field="adrLine2TextCode" usage="optional" />
      <value name="DSPL_SEQ_NBR" field="adr2dsplSeqNbr" usage="optional" />
      </structure>
      <value name="POST_TOWN" field="postTown" usage="optional" />
      <value name="POST_CODE" field="postCode" usage="optional" />
      <value name="CNTY" field="cnty" usage="optional" />
      <value name="TERR" field="terr" usage="optional" />
      <value name="GEO_REF_ID" field="geoRefId" usage="optional" />
      <value name="LANG_CD" field="langCd" usage="optional" />
      </structure>
      </mapping>

      Please find attached corresponding java file to map the fileds.

      if adrLine1Text , adrLine1TextCode and adr1dsplSeqNbr ( Address Line 1) fileds are null in the java object, JiBX should not create empty tag <ADR_LINE/> . Here <ADR_LINE> is mentioned as "optional" tag.

      In our project, there should not be any empty tags like <ADR_LINE/>. Because of this requirement, we are evaluating other binding APIs.
      It should be handleded in the subsequent release.
      Please let me know if you require additional information.

      Thanks
      Maruthee

        Activity

        Hide
        Maruthee Adipudi added a comment -

        Additional Info:

        The above mentioned <ADR_ENTR> tag is a collection as described below:

        <mapping name="ASSN" class="com.dnb.dlws.binding.ChildTreeLinkAssnVO" usage="optional">
        <value name="DUNS_NBR" field="dunsNbr" usage="optional" />
        <value name="ASSN_TYPE_CD" field="assnTypeCd" usage="optional" />
        <collection field="childTreeBusNme" item-type="com.dnb.dlws.binding.BusinessNameEntryVO" usage="optional" />
        <collection name="ADR_ENTR" field="childTreeBusAdr" item-type="com.dnb.dlws.binding.BusinessAddressEntryVO" usage="optional" />
        <structure name="OTH_RAT_SCR" usage="optional">
        <value name="SCR" field="othRatScr" usage="optional" />
        <value name="SCR_CD" field="othRatScrCd" usage="optional" />
        </structure>
        </mapping>

        Show
        Maruthee Adipudi added a comment - Additional Info: The above mentioned <ADR_ENTR> tag is a collection as described below: <mapping name="ASSN" class="com.dnb.dlws.binding.ChildTreeLinkAssnVO" usage="optional"> <value name="DUNS_NBR" field="dunsNbr" usage="optional" /> <value name="ASSN_TYPE_CD" field="assnTypeCd" usage="optional" /> <collection field="childTreeBusNme" item-type="com.dnb.dlws.binding.BusinessNameEntryVO" usage="optional" /> <collection name="ADR_ENTR" field="childTreeBusAdr" item-type="com.dnb.dlws.binding.BusinessAddressEntryVO" usage="optional" /> <structure name="OTH_RAT_SCR" usage="optional"> <value name="SCR" field="othRatScr" usage="optional" /> <value name="SCR_CD" field="othRatScrCd" usage="optional" /> </structure> </mapping>
        Hide
        Dennis Sosnoski added a comment -

        This is an example of the known issue prominently described at http://jibx.sourceforge.net/bugs.html I do consider it a bug, but there's no practical way of fixing it before the 2.0 rewrite of the binding compiler code generation.

        Show
        Dennis Sosnoski added a comment - This is an example of the known issue prominently described at http://jibx.sourceforge.net/bugs.html I do consider it a bug, but there's no practical way of fixing it before the 2.0 rewrite of the binding compiler code generation.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Maruthee Adipudi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: