Giter VIP home page Giter VIP logo

unedifact's Introduction

Smooks UN/EDIFACT Bindings

Here are some slides about the philosophy behind this project.

THIS PROJECT IS NO LONGER UNDER ACTIVE DEVELOPMENT.

Please contact the Mailing list if you wish to adopt the project and continue it's evolution.

Building

Pre-requisites

  1. JDK 1.5
  2. Apache Maven 3 (v3.0.5 recommended)

Maven

For the moment, if you try to build all modules in the same reactor you will most likely run into an out-of-memory error (Permgen space to be precise). If you still want to build all modules in a single step, cd to the parent folder and run

> mvn clean install

If you want to build just a part or you have tried the method above and failed, cd to the parent folder and

cd ../d96a
mvn clean install

build.sh

To build all packages without deploying them to Nexus (Maven Central), simply run ./build.sh with no parameters (equivalent to running mvn clean install). To build a specific set of packages, supply the package name(s) as a space separated list of parameters e.g. ./build.sh d00a d00b.

To build all packages and deploy to the Nexus repository (Maven Central) (read more here).


Release strategy

A new version of this project is published to Maven Central along with every new version of Smooks Core. This version has the same version number as the Smooks Core version number, suffixed with .0. For example, when Smooks Core version 1.7.1 was released, a corresponding version 1.7.1.0 of this project was also released. Releases made alongside Smooks Core releases contain all EDIFACT releases available up to that point.

Additional releases made in between Smooks Core releases due to addition of new EDIFACT releases increment the most minor version number in sequential order (n.n.n.1, n.n.n.2, n.n.n.3, and so on).

Adding a new UN/EDIFACT specification

Find your specification on the UNECE site then create a directory named after the specification (you can copy-paste an older one) where you will download the ZIP file for the desired specification.


unedifact's People

Contributors

alexproca avatar bhangun avatar manish-in-java avatar tfennelly avatar zubairov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unedifact's Issues

Error reading [IFTSAI][D:99A:UN] message

Hello, I am trying to use this library to parse D99A message running following kotlin code:

val file = this::class.java.classLoader.getResource("EDIFACT_D99A_IFTSAI.txt").openStream()
val factory: D99AInterchangeFactory = D99AInterchangeFactory.getInstance()
val interchange = factory.fromUNEdifact(file)

I am getting an error:

Caused by: org.milyn.edisax.EDIParseException: EDI message processing failed [IFTSAI][D:99A:UN]. Reached end of mapping model but there are more EDI segments in the incoming message. Read 220 segment(s). Current EDI segment is [LOC+7+JPHBK:139:6]
at org.milyn.edisax.EDIParser.parse(EDIParser.java:434)
at org.milyn.edisax.EDIParser.parse(EDIParser.java:410)
at org.milyn.edisax.unedifact.handlers.UNHHandler.process(UNHHandler.java:97)
at org.milyn.edisax.unedifact.handlers.UNBHandler.process(UNBHandler.java:75)
at org.milyn.edisax.unedifact.UNEdifactInterchangeParser.parse(UNEdifactInterchangeParser.java:114)
at org.milyn.smooks.edi.unedifact.UNEdifactReader.parse(UNEdifactReader.java:75)
at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:76)
at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86)

I am unable to find what could be wrong with the message and why it incorrectly detects the end of mapping before 'LOC+7+JPHBK:139:6' segment.
The message is:

UNA:+.? 'UNB+UNOA:2+XXXXXXXXXXX+YYYYYY+190106:0100+182182'UNH+1+IFTSAI:D:99A:UN'BGM+TS2+002429+9'DTM+137:201901060100:203'FTX+AAI+++BUS ARRIVAL/DEPARTURE SCHEDULE'FTX+TRA+++EC1'TDT+20+224632+1++HLCU:172:20+++9424900:146:11:MOL MAGNIFICENCE:MH'RFF+VON:051E'LOC+9+JPUKB:139:6'DTM+180:201902191630:203'DTM+141:201902191630:203'DTM+133:201902210600:203'LOC+11+CNNGB:139:6'DTM+180:201902230600:203'DTM+411:201902230600:203'DTM+141:201902230600:203'DTM+132:201902230600:203'LOC+11+CNSHA:139:6'DTM+180:201902240800:203'DTM+411:201902240800:203'DTM+141:201902240800:203'DTM+132:201902240800:203'DTM+133:201902250300:203'LOC+7+CNYIB:139:6'DTM+132:20190313:102'LOC+7+CNCKG:139:6'DTM+132:20190312:102'LOC+7+CNLUZ:139:6'DTM+132:20190312:102'LOC+7+CNFLG:139:6'DTM+132:20190309:102'LOC+7+CNWZH:139:6'DTM+132:20190308:102'LOC+7+CNYYA:139:6'DTM+132:20190306:102'LOC+7+CNJGZ:139:6'DTM+132:20190306:102'LOC+7+CNCSX:139:6'DTM+132:20190306:102'LOC+7+CNCGD:139:6'DTM+132:20190306:102'LOC+7+CNWUH:139:6'DTM+132:20190305:102'LOC+7+CNYIC:139:6'DTM+132:20190304:102'LOC+7+CNYZH:139:6'DTM+132:20190303:102'LOC+7+CNJIU:139:6'DTM+132:20190303:102'LOC+7+CNMAA:139:6'DTM+132:20190303:102'LOC+7+CNTZO:139:6'DTM+132:20190303:102'LOC+7+CNWHI:139:6'DTM+132:20190303:102'LOC+7+CNKHN:139:6'DTM+132:20190303:102'LOC+7+CNHFE:139:6'DTM+132:20190303:102'LOC+7+CNCZX:139:6'DTM+132:20190303:102'LOC+7+CNAQG:139:6'DTM+132:20190302:102'LOC+7+CNZJG:139:6'DTM+132:20190302:102'LOC+7+CNHSI:139:6'DTM+132:20190302:102'LOC+7+CNTAC:139:6'DTM+132:20190302:102'LOC+7+CNNTG:139:6'DTM+132:20190302:102'LOC+7+CNJIA:139:6'DTM+132:20190302:102'LOC+7+CNCGS:139:6'DTM+132:20190302:102'LOC+7+CNCHI:139:6'DTM+132:20190301:102'LOC+7+CNZHE:139:6'DTM+132:20190301:102'LOC+7+CNNKG:139:6'DTM+132:20190301:102'LOC+7+CNTOL:139:6'DTM+132:20190301:102'LOC+7+CNANJ:139:6'DTM+132:20190228:102'LOC+7+CNDEI:139:6'DTM+132:20190227:102'LOC+11+KRPUS:139:6'DTM+180:201902260200:203'DTM+411:201902260200:203'DTM+141:201902261200:203'DTM+132:201902261200:203'DTM+133:201902270600:203'LOC+7+USPEF:139:6'DTM+132:20190328:102'LOC+7+USBOS:139:6'DTM+132:20190324:102'LOC+7+RUMAG:139:6'DTM+132:20190314:102'LOC+7+CNRZH:139:6'DTM+132:20190307:102'LOC+7+CNSHD:139:6'DTM+132:20190306:102'LOC+7+CNJTG:139:6'DTM+132:20190306:102'LOC+7+CNJNZ:139:6'DTM+132:20190305:102'LOC+7+JPHIC:139:6'DTM+132:20190305:102'LOC+7+CNYIK:139:6'DTM+132:20190305:102'LOC+7+CNLKU:139:6'DTM+132:20190305:102'LOC+7+CNSHP:139:6'DTM+132:20190305:102'LOC+7+CNDDG:139:6'DTM+132:20190305:102'LOC+7+CNWZO:139:6'DTM+132:20190304:102'LOC+7+JPTHS:139:6'DTM+132:20190304:102'LOC+7+JPMUR:139:6'DTM+132:20190304:102'LOC+7+JPKUH:139:6'DTM+132:20190304:102'LOC+7+JPHHE:139:6'DTM+132:20190304:102'LOC+7+CNWEI:139:6'DTM+132:20190304:102'LOC+7+CNZPU:139:6'DTM+132:20190303:102'LOC+7+RUKOR:139:6'DTM+132:20190303:102'LOC+7+JPKNZ:139:6'DTM+132:20190303:102'LOC+7+JPONA:139:6'DTM+132:20190303:102'LOC+7+JPISI:139:6'DTM+132:20190303:102'LOC+7+JPKIJ:139:6'DTM+132:20190303:102'LOC+7+JPKCZ:139:6'DTM+132:20190303:102'LOC+7+JPAXT:139:6'DTM+132:20190303:102'LOC+7+JPHKD:139:6'DTM+132:20190303:102'LOC+7+CNHME:139:6'DTM+132:20190303:102'LOC+7+RUVVO:139:6'DTM+132:20190302:102'LOC+7+RUVYP:139:6'DTM+132:20190302:102'LOC+7+JPIYM:139:6'DTM+132:20190302:102'LOC+7+JPTAK:139:6'DTM+132:20190302:102'LOC+7+JPTOY:139:6'DTM+132:20190302:102'LOC+7+JPTRG:139:6'DTM+132:20190302:102'LOC+7+JPSKT:139:6'DTM+132:20190302:102'LOC+7+JPOIT:139:6'DTM+132:20190302:102'LOC+7+JPNGS:139:6'DTM+132:20190302:102'LOC+7+JPNGO:139:6'DTM+132:20190302:102'LOC+7+JPNAO:139:6'DTM+132:20190302:102'LOC+7+JPIMB:139:6'DTM+132:20190302:102'LOC+7+JPHSM:139:6'DTM+132:20190302:102'LOC+7+CNYNT:139:6'DTM+132:20190302:102'LOC+7+JPABU:139:6'DTM+132:20190302:102'LOC+7+CNTXG:139:6'DTM+132:20190302:102'LOC+7+JPHMD:139:6'DTM+132:20190301:102'LOC+7+JPMYJ:139:6'DTM+132:20190301:102'LOC+7+JPSMN:139:6'DTM+132:20190301:102'LOC+7+JPUBJ:139:6'DTM+132:20190301:102'LOC+7+JPYOK:139:6'DTM+132:20190301:102'LOC+7+JPYKK:139:6'DTM+132:20190301:102'LOC+7+JPYAT:139:6'DTM+132:20190301:102'LOC+7+JPTKS:139:6'DTM+132:20190301:102'LOC+7+JPTKY:139:6'DTM+132:20190301:102'LOC+7+JPSEN:139:6'DTM+132:20190301:102'LOC+7+JPOSA:139:6'DTM+132:20190301:102'LOC+7+JPNAN:139:6'DTM+132:20190301:102'LOC+7+JPIWK:139:6'DTM+132:20190301:102'LOC+7+JPMAI:139:6'DTM+132:20190301:102'LOC+7+CNDLC:139:6'DTM+132:20190301:102'LOC+7+CNTAO:139:6'DTM+132:20190228:102'LOC+7+JPKMJ:139:6'DTM+132:20190228:102'LOC+7+JPSHS:139:6'DTM+132:20190228:102'LOC+7+JPHIJ:139:6'DTM+132:20190228:102'LOC+7+JPHBK:139:6'DTM+132:20190228:102'LOC+7+KRINC:139:6'DTM+132:20190227:102'LOC+11+JPTYO:139:6'DTM+180:201902281630:203'DTM+141:201902281630:203'DTM+132:201903011300:203'LOC+11+PAMIT:139:6'DTM+180:201903181700:203'DTM+411:201903181700:203'DTM+141:201903181700:203'DTM+132:201903191900:203'DTM+133:201903201700:203'LOC+7+LCCAS:139:6'DTM+132:20190408:102'LOC+7+MXPGO:139:6'DTM+132:20190406:102'LOC+7+MXVER:139:6'DTM+132:20190401:102'LOC+7+MXATM:139:6'DTM+132:20190331:102'LOC+7+GYGEO:139:6'DTM+132:20190328:102'LOC+7+HNPCR:139:6'DTM+132:20190325:102'LOC+7+PRSJU:139:6'DTM+132:20190325:102'LOC+7+AWORJ:139:6'DTM+132:20190324:102'LOC+7+GTSTC:139:6'DTM+132:20190324:102'LOC+7+HTPAP:139:6'DTM+132:20190323:102'LOC+7+VEMAR:139:6'DTM+132:20190323:102'LOC+7+VEGUT:139:6'DTM+132:20190323:102'LOC+7+VEGUA:139:6'DTM+132:20190322:102'LOC+7+CWWIL:139:6'DTM+132:20190322:102'LOC+7+CRLIO:139:6'DTM+132:20190320:102'LOC+11+USSAV:139:6'DTM+180:201903221600:203'DTM+411:201903221600:203'DTM+141:201903221600:203'DTM+132:201903241700:203'DTM+133:201903251800:203'LOC+7+USMOB:139:6'DTM+132:20190416:102'LOC+11+USJAX:139:6'DTM+180:201903251600:203'DTM+411:201903251600:203'DTM+141:201903251600:203'DTM+132:201903261300:203'LOC+11+USCHS:139:6'DTM+180:201903261600:203'DTM+411:201903261600:203'DTM+141:201903261600:203'DTM+132:201903271900:203'LOC+11+USORF:139:6'DTM+180:201903291600:203'DTM+411:201903291600:203'DTM+141:201903291600:203'DTM+132:201903300700:203'DTM+133:201903310300:203'LOC+7+USBAL:139:6'DTM+132:20190331:102'UNT+289+1'UNZ+1+289'

The message was extracted from a larger file so it might not correct about UNZ segment.
I would appreciate any help.

Was the mapping file generation change intentional?

Hi,

There seems to be an issue with how EDI is converted to XML regarding the tag names. Using mappings from version 1.4 you get tag names like "Equipment_details" and "Name_and_address", but after running the maven build on version 1.6 you get tag names like EQD and NAD.

Was this change intentional or is it a configuration issue on my part?

Unable to deploy to Maven Central

The Maven artifacts, in their current form cannot be deployed to Maven Central through the Sonatype open-source Nexus repository. The artifacts get uploaded to the Nexus repository just fine and get staged there. However, they are rejected at the time of promotion from staging to release stage, with the following errors:

  1. No Javadocs attached.
  2. No source code attached.
  3. Not signed.

As explained by Sonatype, these are mandatory requirements for Sonatype to accept Maven artifacts for promotion to Maven Central. Given that the Sonatype Nexus repository is the preferred and probably the easiest and most straight-forward route for deploying to Maven Central, these errors must be fixed so that artifacts can be published to Maven Central.

Can't build module with maven

Hello,

I tried to build master and tag v1.6.0 with Java 1.8, maven 3.3.9.
I cd into main directory, and try "mvn clean install" command.
I get the following output:

[ERROR] Failed to execute goal org.milyn:maven-ect-plugin:1.6:generate (default) on project d93a-mapping: Execution default of goal org.milyn:maven-ect-plugin:1.6:generate failed: A required class was missing while executing org.milyn:maven-ect-plugin:1.6:generate: org/eclipse/emf/ecore/EStructuralFeature
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.milyn:maven-ect-plugin:1.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/artaxerxe/.m2/repository/org/milyn/maven-ect-plugin/1.6/maven-ect-plugin-1.6.jar
[ERROR] urls[1] = file:/home/artaxerxe/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[ERROR] urls[2] = file:/home/artaxerxe/.m2/repository/org/jfrog/maven/annomojo/maven-plugin-anno/1.3.1/maven-plugin-anno-1.3.1.jar
[ERROR] urls[3] = file:/home/artaxerxe/.m2/repository/org/milyn/milyn-smooks-ect/1.6/milyn-smooks-ect-1.6.jar
[ERROR] urls[4] = file:/home/artaxerxe/.m2/repository/org/milyn/milyn-smooks-edi/1.6/milyn-smooks-edi-1.6.jar
[ERROR] urls[5] = file:/home/artaxerxe/.m2/repository/org/milyn/milyn-edisax-parser/1.6/milyn-edisax-parser-1.6.jar
[ERROR] urls[6] = file:/home/artaxerxe/.m2/repository/org/milyn/milyn-commons/1.6/milyn-commons-1.6.jar
[ERROR] urls[7] = file:/home/artaxerxe/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
[ERROR] urls[8] = file:/home/artaxerxe/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[9] = file:/home/artaxerxe/.m2/repository/org/freemarker/freemarker/2.3.20/freemarker-2.3.20.jar
[ERROR] urls[10] = file:/home/artaxerxe/.m2/repository/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar
[ERROR] urls[11] = file:/home/artaxerxe/.m2/repository/org/milyn/milyn-smooks-javabean/1.6/milyn-smooks-javabean-1.6.jar
[ERROR] urls[12] = file:/home/artaxerxe/.m2/repository/org/milyn/milyn-smooks-core/1.6/milyn-smooks-core-1.6.jar
[ERROR] urls[13] = file:/home/artaxerxe/.m2/repository/com/thoughtworks/xstream/xstream/1.4.1/xstream-1.4.1.jar
[ERROR] urls[14] = file:/home/artaxerxe/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
[ERROR] urls[15] = file:/home/artaxerxe/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
[ERROR] urls[16] = file:/home/artaxerxe/.m2/repository/org/mvel/mvel2/2.0.17/mvel2-2.0.17.jar
[ERROR] urls[17] = file:/home/artaxerxe/.m2/repository/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar
[ERROR] urls[18] = file:/home/artaxerxe/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
[ERROR] urls[19] = file:/home/artaxerxe/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
[ERROR] urls[20] = file:/home/artaxerxe/.m2/repository/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar
[ERROR] urls[21] = file:/home/artaxerxe/.m2/repository/xom/xom/1.0/xom-1.0.jar
[ERROR] urls[22] = file:/home/artaxerxe/.m2/repository/dtdparser/dtdparser/1.21/dtdparser-1.21.jar
[ERROR] urls[23] = file:/home/artaxerxe/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar
[ERROR] urls[24] = file:/home/artaxerxe/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
[ERROR] urls[25] = file:/home/artaxerxe/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar
[ERROR] urls[26] = file:/home/artaxerxe/.m2/repository/org/eclipse/xsd/org.eclipse.xsd/2.7.0-v20110606-0949/org.eclipse.xsd-2.7.0-v20110606-0949.jar
[ERROR] urls[27] = file:/home/artaxerxe/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore/2.7.0-v20110605-0747/org.eclipse.emf.ecore-2.7.0-v20110605-0747.jar
[ERROR] urls[28] = file:/home/artaxerxe/.m2/repository/org/eclipse/emf/org.eclipse.emf.common/2.6.0.v20100614-1136/org.eclipse.emf.common-2.6.0.v20100614-1136.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>org.milyn.edi:unedifact-gen-parent:1.6, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.eclipse.emf.ecore.EStructuralFeature
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :d93a-mapping

Can anybody help me on how to build this?

Thanks in advance,
Andrei M.

Unable to build source code against Smooks version 1.5 with Maven

Attempting to build source code from the 1.4 tag leads to a build failure.

> mvn package
> ...
> Failed to execute goal
> The POM for org.eclipse.xsd:org.eclipse.xsd:jar:2.6.0.v20100914-1218 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

Indeed, version 2.6.0.v20100914-1218 of the said dependency does not exist on Maven Central.

Unable to build source code from the 1.4 tag with Maven

Attempting to build source code from the 1.4 tag leads to a build failure.

> mvn package
> ...
> Failed to execute goal org.milyn:maven-ect-plugin:1.4.1:generate
> Plugin org.milyn:maven-ect-plugin:1.4.1 or one of its dependencies could not be resolved
> Failed to collect dependencies for org.milyn:maven-ect-plugin:jar:1.4.1
> Failed to read artifact descriptor for org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.3.2

Indeed, version 1.3.2 of the said plugin does not exist on Maven Central. The only available versions are 1.4.1 and 1.3.1.

Add bindings for EDIFACT releases D16B-D18A

The latest available version 1.7.0 contains EDIFACT releases up to D16A only. Given that EDIFACT releases D16B-D18A are now available, those releases should be made available for Smooks UN/EDIFACT as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.