Java library for converting Java to EDI

I am looking for a Java library that makes converting Java to EDI more specifically the EDI 835 format used by Healthcare. Although many libraries promise to convert Java to EDI , there is no documentation or code samples available for them on their sites. Here is the list of libraries I've tried so far with no luck:

1. EdiReader (EdiWriter is commercial and does not have a trial download).
2. Smooks (the trial download and documentation do not mention Java to EDI conversion).
3. Open business objects - OBOE with americancoders.com (has a trial download, but Java for EDI is not mentioned).
4. Auckland data converter (this does not even allow me to load the library and documents).

>

Does anyone know other solutions that might be helpful? I am also open to any commercial solution.

Thanks!

+8
source share
5 answers

SMOKES ARE NOT LONG UNDER ACTIVE DEVELOPMENT

Trial download for smuks ?! You do not need a license. Theres also good documentation. Check it out: http://www.smooks.org/

IMHO I would go with smooks if you do not want a commercial solution.

0
source

If you are open to a commercial solution, you can take a look at Altova MapForce. It has a drag and drop map that you can create, and then generates code to connect to your application. MapForce

"Java to EDI" seems to be a popular bug. In your case, you create a standardized text document (in this case, an EDI 835 document) from the source data (RDBMS, XML, flat file, iDoc, etc.). Java is a channel . You basically try to invent the wheel 30+ years ago by writing your own translator / parser, and this is usually done without the benefit of checking EDI syntax / FA reconciliation / reliable partner tools. If I wanted to stop such madness, I would look at Liaison and their tools, in particular ECS and Delta. These tools are based on Windows, so this may not be an option, but for a low-cost commercial tool that integrates seamlessly with your architecture, your ROI will quickly show up.

+5
source

I agree that there are very few open source libraries on the market that can help convert EDI to xml. Many of them have not been updated for years. I visited the Smooks website and it seems that the project has been discontinued.

If you agree to pay for the solution, you can try the EDI parser from Progress .

It comes with a free trial for 15 days, and the API is very easy to use and integrate into your project.

It not only supports the conversion of EDI to xml, but also the conversion of EDI to CSV (you have the option to select a separator).

+1
source

There are not many open source Java EDI APIs. But still, there are some, as you have provided.

I also searched for many.

Smook needs some XML configuration to read a specific EDI file.

Then I tried EDI Reader . In fact, an EDI reader is available for download from the Internet.

For me, this is the only thing that helped me convert one EDI file to XML. Even the generated XML was somewhat complicated. But you can use any other API for XML parsing. Here is the download link for EDI Reader .

Read about EDI Reader and, for example, programs, downloads.

This is a ZIP file. Contains JAR files and some sample JAVA codes.

0
source

If you decide to implement the solution using Smooks, I simply refer to the helpful information from the Smooks documentation:

Java for text (XML, CSV, EDI, etc.)

As stated in other parts of this guide, Smooks runs most of its time by processing a stream of SAX events generated by an input source of some type (XML, EDI, Java, etc.) and using these events to trigger the visitors logic. In the case of a Java source (see the previous section, β€œJava to Java”), Smooks uses an XStream to create this SAX event stream.

Sometimes, however, you just want to apply a template (like FreeMarker) to the Java Source object model and create XML, CSV, EDI, etc. You do not want to incur overhead by generating a stream of SAX events that you are not going to use. To do this, you must say that the main Smooks runtime does not generate an event stream. This can be done in one of two ways.

Calling setEventStreamRequired (false) on the JavaSource instance is delivered to Smooks.filterSource:

JavaSource javaSource = new JavaSource(orderBean); // Turn streaming off via the JavaSource... javaSource.setEventStreamRequired(false); smooks.filterSource(javaSource, result); 

Or by disabling " http://www.smooks.org/sax/features/generate-java-event-stream " in the Smooks configuration:

 <reader> <features> <setOff feature="http://www.smooks.org/sax/features/generate-java-event-stream" /> </features> </reader> <!-- Other Smooks configurations eg a FreeMarker template... --> 

When applying the FreeMarker template, the name of the beans context template (i.e. the names used in your template) depends on the type of object in the JavaSource:

If the object is a Map, then the map instance becomes the context template, and so you can simply use the map input keys as bean names in your template. For non-map objects, the JavaSource class takes an Object Class SimpleName and creates a JavaBean property name from it. This is the name of the bean context used for the templates. So if the bean class name is com.acme.Order and then the bean context name, there will be an β€œorder” for the purpose of the templates.

Source: http://www.smooks.org/guide

0
source

Source: https://habr.com/ru/post/959380/


All Articles