EDI Reader Configurator

35 views
Skip to first unread message

kar...@gmail.com

unread,
Jun 10, 2021, 1:21:39 PM6/10/21
to Smooks Users
Hello,
I'm testing the changes in the Smooks upgrade from 1.x to 2.0-M3. In previous versions was possible to process EDI by setting up the Smooks reader configurator, now the examples are coming to use dfdl but if I try to do the same, the EDIReaderConfigurator class doesn't exist anymore. Is there some othe way to specify the configuration?
Before I was able to create an external file with the schema of the EDI I'd like to process and the configuration was explicit there, like this:

<?xml version="1.0" encoding="UTF-8"?>
<medi:description name="EDI 214 Message Definition" version="1.0" />
<medi:delimiters segment="~" field="*" component=":" />
<medi:segments xmltag="Segments">
             ...
             ...
             ...
        <medi:segments />
------------------------------------------------------------
and the call from inside the code was like:

Smooks smooks = new Smooks(); 
smooks.setReaderConfig(new EDIReaderConfigurator("/edi/models/invoice.xml")); 
smooks.filterSource(....);

Now how do I do something similar in version 2.0 using dfdl?

Claude

unread,
Jun 11, 2021, 7:18:56 AM6/11/21
to Smooks Users
A few classes were renamed in Smooks 2. In this case, EDIReaderConfigurator was renamed to EdiReaderConfigurator. You can find EdiReaderConfigurator usage examples in the smooks-edi-cartridge's test cases.

Claude
Reply all
Reply to author
Forward
0 new messages