-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISA not found #32
Comments
Hi DennisEdiEngine doesn’t support EdiFact unfortunately. I don’t have maps and parser implemented. Only X12 is supported.Best regards,OlegOn 3 Nov 2022, at 12:06, Dennis Wetterlund ***@***.***> wrote:
Hi,
Im fairly new to EDI and tries to convert an EDIFACT message to json or XML with EdiEngine, however the files I receives does not start with ISA (since it's EDIFACT and not X12 i think?).
Is there a way to work around or fix this with EdiEngine?
The structure in the files I receive looks like this (https://learn.microsoft.com/en-us/biztalk/core/edi-headers-and-trailers):
UNA Service String Advice
UNB Interchange Control Header
UNG Functional Group Header
UNH Message Header
UNT Message Trailer
UNE Functional Group Trailer
UNZ Interchange Control Trailer
Code:
var edi = File.ReadAllText(path);
EdiDataReader r = new EdiDataReader();
EdiBatch b = r.FromString(edi.Trim());
//Serialize the whole batch to JSON
JsonDataWriter w1 = new JsonDataWriter();
string json = w1.WriteToString(b);
//OR Serialize selected EDI message to Json
string jsonTrans = JsonConvert.SerializeObject(b.Interchanges[0].Groups[0].Transactions[0]);
//Serialize the whole batch to XML
XmlDataWriter w2 = new XmlDataWriter();
string xml = w2.WriteToString(b);
Best regards!
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
See above |
^^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Im fairly new to EDI and tries to convert an EDIFACT message to json or XML with EdiEngine, however the files I receives does not start with ISA (since it's EDIFACT and not X12 i think?).
Is there a way to work around or fix this with EdiEngine?
The structure in the files I receive looks like this (https://learn.microsoft.com/en-us/biztalk/core/edi-headers-and-trailers):
Code:
Best regards!
The text was updated successfully, but these errors were encountered: