Problem with UN/EDIFACT message interchange (Missing Interchange Factory and bindingconfig)

118 views
Skip to first unread message

Isabel Barth

unread,
Jan 23, 2017, 7:48:33 AM1/23/17
to Smooks Users
Hi all,

we are trying to process an UNEDIFACT-message interchange that contains multiple messages.
We cannot use the existing smooks mapping and binding jars for EDIFACT messages out-of-the box, because we need to use our own custom model.
According to the documentation, we need to use a specific InterchangeFactory for our model, as well as an interchange-bindingconfig.
We tried to make ejc generate it (using ant as a build-tool). 
But the ejc-build target only generates such bindingconfig.xml and edimappingconfig.xml files for the individual messages types (not for the interchange), 
so we can process individual messages but not an interchange with multiple messages.

We'd greatly appreciate any hints on how to go about processing a message interchange based on a custom mapping.

Thanks in advance,

Isabel

ha...@worldticket.net

unread,
Jun 21, 2017, 7:37:10 AM6/21/17
to Smooks Users
Hi,

In order to trigger the generation of an InterchangeFactory you need to package your edi mappings in a jar or zip file and include an interchange.properties file. See the source files of EJCExecutor and EJC.

  1. Create common edimapping file, must be named __modelset_definitions and local version
  2. Create an edimap file per message
  3. List all edimap files in mapping-model.lst (/META-INF/services/org/smooks/edi/mapping-model.lst)
  4. write interchange.properties file (/META-INF/services/org/smooks/edi/interchange.properties)
  5. write urn file (/META-INF/services/org/smooks/edi/urn)
  6. package everything as jar (or zip)
  7. run EJCExecutor
Take a look at how the un/edifact mapping/binding are created.
Reply all
Reply to author
Forward
0 new messages