IBM Support

RS01408: ILRXMLDATADRIVER GENERATES A WRONG XML VALUE FOR DECIMAL

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using a decimal type, the IlrXmlDataDriver generates the
    following XML output after execution:
    
    <ns0:product
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://www.sample.org/model/"><price>2.0E-8</price><q
    uantity>1.0E+7</quantity></ns0:product>
    
    
    which is not compatible against the XSD:
    
    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:s="http://www.sample.org/model/"
    targetNamespace="http://www.sample.org/model/">
    
        <element name="product" type="s:product" />
    
        <complexType name="product">
         <sequence>
         <element name="price" type="decimal" />
         <element name="quantity" type="decimal" />
         </sequence>
        </complexType>
    
    </schema>
    
    
    =>  '2.0E-8' (the scientific notation) is not a valid value for
    decimal in XML
    

Local fix

  • Workaround:
    Handle the BigDecimal value at the end of the ruleflow using
    scale and rounding, so that the result can be like 1.00 :
    
    request.price = request.price.setScale(2,
    request.price.ROUND_FLOOR);
    

Problem summary

  • Decimal numbers are not processed specifically and the value
    passed is directly transformed into XML.
    

Problem conclusion

  • a processing is added into the code to make sure decimal follow
    the XML format
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS01408

  • Reported component name

    WS DECISION SVR

  • Reported component ID

    5725B6901

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-09-23

  • Closed date

    2013-09-30

  • Last modified date

    2013-09-30

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • 999
    

Fix information

  • Fixed component name

    WS DECISION SVR

  • Fixed component ID

    5725B6901

Applicable component levels

  • R801 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
09 February 2022