BusinessWorks protocol throwing a parsing error when EDI file contains a 0x1F character as a delimiter.

BusinessWorks protocol throwing a parsing error when EDI file contains a 0x1F character as a delimiter.

book

Article ID: KB0089465

calendar_today

Updated On:

Products Versions
TIBCO BusinessConnect EDI Protocol Powered by Instream -
Not Applicable -

Description

Description:
When processing an inbound EDI X12 document that uses a non-printable character (such as 0x1F) as a delimiter, BusinessWorks throws a parsing error when parsing the translated XML that is generated.
Symptoms:
When processing the inbound document, a character such as 0x1F in ISA16, BusinessConnect processes the file without error. However, when processing the file through BusinessWorks, the following error occurs:

An error occurred while parsing: An invalid XML character (Unicode: 0x1f) was found in the element content of the document.. at com.tibco.plugin.xml.XMLParseActivity.for(Unknown Source) at com.tibco.plugin.xml.XMLParseActivity.eval(Unknown Source) at com.tibco.pe.plugin.Activity.eval(Unknown Source) at com.tibco.pe.core.TaskImpl.eval(Unknown Source) at com.tibco.pe.core.Job.a(Unknown Source) at com.tibco.pe.core.Job.k(Unknown Source)     .
   .
   .
   .
 


Cause:
If you are using the standard EX map generated by EDISIM, the XML generated by the translator engine is incorrect. The following XML is generated:

<E-I15_ISA_16>( . . . 0x15  . . .)</E-I15_ISA_16>

The 0x15 is an illegal XML character, so the XML parser throws the error.


Issue/Introduction

BusinessWorks protocol throwing a parsing error when EDI file contains a 0x1F character as a delimiter.

Resolution

Modify the .EX map file as follows:

Find this line:


    <Map>
      <From key="//ISA//16" />
      <To key="T-811/L-ISA/S-ISA/E-I15_ISA_16" />
    </Map>

and modify it to substitute a valid XML character for the invalid one. In this example, "$"  is substituted for for the 0x15 character.

    <Map>
      <From key="//ISA//16" />
      <To key="T-811/L-ISA/S-ISA/E-I15_ISA_16">
        <Rule value="RULES.Value.ReplaceWith { &quot;$&quot; &quot;&quot;}" />
      </To>
    </Map>



This substitution will produce a parse-able XML payload for BW to process.

Additional Information

TIBCO Foresight EDISIM Using Standards Editor Manual