views:

685

answers:

4
+2  Q: 

EDI Library

What library have you guys used to create and parse X12 documents?

+1  A: 

www.xmlconverters.com has X12 converters that convert from XML to X12 (and many other EDI formats) and vice versa.

A small sample shows that the API is pretty simple:

using System;
using DDTek.XmlConverter;
public class ConverterOne {
    public static void Main(String[] args) {
        ConverterFactory factory = new ConverterFactory();
        ConvertToXml toXML = factory.CreateConvertToXml("converter:EDI");
        toXML.Convert(new UriSource(args[0]), new UriResult(args[1]));
        Console.WriteLine(args[0] + " --> " + args[1]);
    }
}

ConvertFromXml is a parallel class that does the opposite.

It's a library and thread-safe, so it's easy to add to your application. It is streaming, so there are no scalability problems with large files.

There are separate versions for .Net and Java, both written in native code. The .Net version can also be used with BizTalk for cases where BizTalk doesn't have the appropriate converter.

lavinio
I need to take raw data from sql server table and convert to X12. Can I put the data in a dataset and then convert to X12?
Saif Khan
Yes. Here is an example of doing the opposite, going from X12 to SQL. But both directions are possible. http://blogs.datadirect.com/2009/03/storing-information-from-edi-messages.html
lavinio
Nice solution, but the asking price for the runtime license was a show stopper for us.
David Taylor
A: 

If your business has it already, you should consider using a BizTalk orchestration. BizTalk is definitely not for the faint of heart, however, and may be overkill for your solution.

Josh E
+1  A: 

Altova's MapForce is awesome. It's flexible, doesn't require royalties, and generates c# libraries that you can use to map to databases, files, and/or in-memory xml objects.

Jacob Proffitt
A: 

try RDPCrystal EDI Library. It's got to be the best!!

kingkong