JiBX
  1. JiBX
  2. JIBX-203

Jibx needs to create the empty element when the field value becomes null and the usage attribute is required

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: JiBX 1.1.5
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      WindowsXP, Weblogic Server 8.1
    • Number of attachments :
      0

      Description

      Hi,
      Below is a piece of scrab of my binding xml.
      <mapping class="com.proj.isw.valueobjects.SSPFirmSaleValue" abstract="true" type-name="account_address">
      <value name="AddressLine1" field="blCntCN" usage="required"/>
      <value name="AddressLine2" field="blCntTP"/>
      <value name="UnitType" field="blCntEX" default=""/>
      <value name="UnitValue" field="blCntFN" usage="optional" default=""/>
      <value name="City" field="blCntFN" usage="optional" default=""/>
      <value name="State" field="blCntEM" default=""/>
      <value name="Zip" field="blCntFN" default=""/>
      <value name="Country" constant="840"/>
      <value style="attribute" name="geoCode" constant="89830983098"/>
      <value style="attribute" name="skipValidation" constant="Y"/>
      <value style="attribute" name="checkId" constant=""/>
      <value style="attribute" name="statusCode" constant=""/>
      <value style="attribute" name="statusCategory" constant=""/>
      <value style="attribute" name="statusDescription" constant=""/>
      </mapping>

      When the field blCntCN value becomes null and usage="required", I expect jibx marshalling should create the empty tag <AddressLine1/>. But its not happening. When do the marshalling jibx missing out element completly.

      <AccountAddress geoCode="89830983098" skipValidation="Y" checkId="" statusCode="" statusCategory="" statusDescription="">
      <AddressLine2>APt 1100</AddressLine2>
      <UnitValue>CTG</UnitValue>
      <City>Irving</City>
      <Zip>75038</Zip>
      <Country>840</Country>
      </AccountAddress>

      Our requirement is, If any of the value becomes null and its a required field then we need to send the empty tag of that element. Is it a bug in Jibx 1.1.5? or do we have someother way to accomplish this. Your help would be help ful

        Activity

        Hide
        Dennis Sosnoski added a comment -

        It would help if you could supply a sample project to demonstrate the problem, including an Ant build.xml for the project.

        Show
        Dennis Sosnoski added a comment - It would help if you could supply a sample project to demonstrate the problem, including an Ant build.xml for the project.
        Hide
        Ajay added a comment -

        hello

        I am having some probelms with jibs implementation . Can I post here ?

        It is very very important for me ..please if someone can help me ?getting it to work ?

        thanks

        [ Show ] Ajay - 09/Jun/08 08:56 PM hello I am having some probelms with jibs implementation . Can I post here ? It is very very important for me ..please if someone can help me ?getting it to work ? thanks

        Show
        Ajay added a comment - hello I am having some probelms with jibs implementation . Can I post here ? It is very very important for me ..please if someone can help me ?getting it to work ? thanks [ Show ] Ajay - 09/Jun/08 08:56 PM hello I am having some probelms with jibs implementation . Can I post here ? It is very very important for me ..please if someone can help me ?getting it to work ? thanks

          People

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

            Dates

            • Created:
              Updated:
              Resolved: