Native Format Translator Returns Invalid Value for Zero-Padded Integer Zero
Last updated on NOVEMBER 03, 2016
Applies to:Oracle(R) BPEL Process Manager - Version: 10.1.3.4 to 10.1.3.4 - Release: AS10gR3 to AS10gR3
Information in this document applies to any platform.
When using the Native Format translation (in a file adapter) to convert a fixed-length format file to XML, if a field is defined in XSD as an integer, padded with zeros, and its value is zero, then the XML document will contain an empty element, rather than an element with a zero. This then fails schema validation.
The Native Format translator strips all padding from the input field, even when this results in an invalid value. In this specific case, a field is defined as:
<xsd:element name="UnidentifiedTransactions" type="xsd:nonNegativeInteger"
nxsd:style="fixedLength" nxsd:length="6" nxsd:padStyle="head" nxsd:paddedBy="0"/>
In the source file (input file), the field has the value "000000". Rather than setting the element in the resulting XML document to:
It is set to:
Which is not schema conforming, and thus fails validation. This is incorrect behavior for any numeric type. The XML schema validation error returned is:
Invalid xml document.
According to the xml schemas, the xml document is invalid. The reason is:
Error::cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
Error::cvc-type.3.1.3: The value '' of element 'UnidentifiedTransactions' is not valid.
Please make sure that the xml document is valid against your schemas.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms