This project has moved and is read-only. For the latest updates, please go here.

Getting the following error

Oct 25, 2013 at 5:31 PM
Hi there,

Im quite new to EDI and have come across ediFabric, and it looks great.

Im getting one error though trying to process an EDIFACT D96A ORDER. I get the following error:
Can't find defnition for EdiFabric.Definitions.Edifact_D96A_ORDERS.M_ORDERS

when in the parserHelper when trying to do this:
        var result = new ParseTree
                Name = ediElement.Name,
                Children = new List<ParseTree>(),
                TypeName = typeName,
                AssemblyName = assemblyName

Any idea what this could be?

Nov 4, 2013 at 7:03 PM
Edited Nov 4, 2013 at 7:03 PM

I've only played around with X12, but processing should be the same.

Make sure that your XSD's are marked as Embedded Resources in Visual Studio and your NameSpaces in XSD2Code are correct

for me I am building X12 214's

My namespace in XSD2CODE is EdiFabric.Definitions.EF_X12_004010_214
And my Files are in \MyProject\Definitions\X12\EF_X12_004010_214.xsd (& designer.cs)

First I Create an Interchange and Group
private INTERCHANGE interchange = new INTERCHANGE();
private GROUP Group = new GROUP();

then I create a 214 class and fill it with data.

then add Group to interchange and 214 messages into Groups

Then I write the EDI using below and FTP with EDTFTP see

using EdiFabric.Framework.InterchangeEnvelopes.X12;
using EdiFabric.Framework.Parsers;
using EdiFabric.Framework.Exceptions;

           public void SaveEDI(string filename, string SegmentTerminator = null)
               IEdiParser ediParser = new EdiParser();
                var interchangeContext = new EdiFabric.Framework.Entities.InterchangeContext();

               var parsedXml = ediParser.ToEdi(interchange, null , interchangeContext);
               using (TextWriter tw = File.CreateText(filename))
                   tw.Write(string.Join(SegmentTerminator, parsedXml));

Hope it Helps
Mike Pisano
Nov 4, 2013 at 8:55 PM
I've added a test application that I was working on prior to writing my current software

I've buried it under patches since it's the only place on codeplex I can upload.

Hope it Helps
Nov 7, 2013 at 2:12 PM
Edited Nov 8, 2013 at 9:14 AM
Hi Neil,

Please download the definition for EDIFACT D96A ORDER (a.cs file) from!111&parid=root

Then add this file to the Definitions project and rebuild.

Nov 7, 2013 at 2:14 PM
Hi Mike,

Actually you don't need xsd files at all, they are only for reference on how to build xpaths against the generated xml messages.
Please do not include any xsd in the projects - the definition files are plain c#.

btw - thanks for the contribution.

Nov 7, 2013 at 2:38 PM
Thanks for that that does solve my problem! :) sorry i should have seen that!
Nov 7, 2013 at 3:07 PM
Thanks Kamen,

I had the XSD's in there from the early beta versions that had the database of them, I was wondering now in 1.0 if they were needed - Thanks!

Your welcome for the contrib, know your a busy man and trying to help. If you get some time maybe you can clean up my test project and post it, think starting people would benefit from it.