Code Monkey home page Code Monkey logo

berryworkssoftware / edireader Goto Github PK

View Code? Open in Web Editor NEW
120.0 120.0 46.0 1.18 MB

EDIReader is a flexible and lightweight EDI parser, written in pure Java with many integration options. It has handled millions of transactions in a wide variety of products, services, industries, platforms, and custom integrations. Available as the open source Community Edition and the Premium Edition with added-value modules.

License: GNU General Public License v3.0

Java 97.92% HTML 2.05% Shell 0.03%
270 271 834 835 837 edi edifact edireader java json sax x12 xml

edireader's Issues

publish release notes

Could you please publish the release notes, to provide a brief overview of the changes between each version?

Edifact missing Sender & Receiver qualifier of UNG segment

So I have this EDIFACT UNG
UNG+INVOIC+LOCK:02+CBP-ACE-TEST:02+041013:1901+16+UN+D:98A:'

Expected:
<group GroupType="INVOIC" ApplSender="LOCK" ApplSenderQual="02" ApplReceiver="CBP-ACE-TEST" ApplReceiverQual="02" Date="041013" Time="1901" Control="16" StandardCode="UN" MessageVersion="D" MessageRelease="98A" Code="">

Actual:
<group GroupType="INVOIC" Control="16" StandardCode="UN">

Modify length parameters for ISA elements.

I have EDIx12 837 messages which has wrong length in ISA elements.

For ex. ISA03 should be minimum 10 characters, but in my message, it is only 3 characters.

How can I change the length properties?

Support for transaction 310 and 315 EDI

Hello team,

I attempted to parse the transactions 310 and 315 EDI files using edireader library.

However, it failed with message as

Invalid beginning of segment at segment 58

Line 58 is EOF.

If I use the sample edi file provided in another project - https://github.com/BerryWorksSoftware/edi-json/blob/master/Sample824.edi

then the program runs fine.

I suspect the support is limited to only the specific versions that are mentioned in the readme file - 270, 271, 276, 277, 278, 834, 835, 837 ?

If this is not the case, and if it is expected that edireader library should be able to parse any EDI file then probably I will add the EDI file here by removing sensitive data and the code that I am using so that the issue can be triaged.

Please let me know.
Thanks.

Alternate XML output?

More of a comment about a potential extension. We load the output into a document database and use XPath to access the data. As the elements have an @Id attribute in them, the XPaths get a bit ugly. To that end, we run the output through the following XSLT which moves the @Id into the element name (when a segment or element). It would be fantastic if element naming was an option so we could stop using the XSLT.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="no"/>
    <xsl:strip-space elements="*"/>

    <xsl:template match="@* | node()">
        <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>

    <xsl:template match="segment[@Id]">
        <xsl:element name="{normalize-space(@Id)}">
            <xsl:apply-templates/>
        </xsl:element>
    </xsl:template>

    <xsl:template match="element[@Id]">
        <xsl:element name="{normalize-space(@Id)}">
            <xsl:value-of select="."/>
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>

Trailer Records in 835 not in JSON output

Good Morning, I am using the community edition of the edireader and processing 835 messages to JSON. I'm not seeing where the SE, GE or IEA segments are being written out. Is that by design or is there an option we can enable to output those segments?

Thanks,

Error on EDIScanner xample

I'm new on reading EDI Files, currently i need to understand really fast for my job. I was testing the EDIScanner project but it sends me an error.

Usage: EDIScanner inputfile [-o outputfile]
Exception in thread "main" java.lang.RuntimeException: Missing or invalid command line arguments
at com.berryworks.edireader.demo.EDIScanner.badArgs(EDIScanner.java:149)
at com.berryworks.edireader.demo.EDIScanner.main(EDIScanner.java:139)
C:\Users\Bottago SA\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1

Any suggestion what am i doing wrong?

https://github.com/BerryWorksSoftware/edi-json

I saw the following project you did and I really liked a method here. ediToJson.asJson(reader); Is there a way to convert the same from edi to xml? ediToXml.asXml(String ediData); If there is, can you show it because I want to assign it directly to a variable, not to a file. So using the code below needn't for me.
SAXSource source = new SAXSource(createEDIReader(), new InputSource(inputReader));
StreamResult result = new StreamResult(generatedOutput);
TransformerFactory.newInstance().newTransformer().transform(source, result);

Help with Setup

Any source you can point me to in terms of the Java that will be needed. I operate primarily in C# and JS.

Do we have the ability to customize your xml file?

Hello. First of all, thank you for doing this. There is one more thing I want to add from you. I saw using your project to create an xml that handles data exchange between un edifact passenger and airlines. What I want is this. Do we have the possibility to change the XML tags that are formed, so that we can create special tags for ourselves? Please I want you to help me with this, because I'm working on a project right now and I need to convert the edifact file pnrgov to xml and then java model classes. If it is convenient for you, I can assign you what kind of xml file to create specifically. I can also pay you for it.

Unknown Syntax Identifier in UNB segment: UNOL

I try to parse a file starting with this segments :

UNA:+,? 'UNB+UNOL:3+

I have found that the parser is expecting the "UNO" string to be followed by a character from A to K but I do not understand why ?

The 999 acknowledgement is kept in memory until parsing is ready

EDIAbstractReader.setAlternateAcknowledgment(Writer) uses a BranchingWriter when writing EDI 999 acks. There is a small inconsistency in the code, since BranchingWriter is documented as "not appropriate for arbitrarily large volumes of data" and the parsed files can be of arbitrary length.

For example, with 29k transactions, the in memory size of the trunk and branch StringWriters total to 2.4MB.

How to run EDIReader?

I want to install it on Ubuntu? How can I install this tool and process my EDI messages? Any guidance on this would be great.

Missing Loops when parsing a 837 edi

EdiReader 5.4.3 is not creating loop when converted from edi to xml. I am using EDItoXML.java to convert a sample 837 file to xml which is generating loop structures for version 4.7.3 but not for the latest version. This is issue is caused due to the missing 837 plugin(ANSI_837.java) in 5.4.3 .

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.