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

Can't find defnition for EdiFabric.Definitions.Edifact_D99B_INVOIC.M_INVOIC

May 20, 2014 at 8:16 PM
I can't figure out what I am doing wrong.
I compiled the framework and added the D99B folder to the Definitions project and compiled it, took quite some time to compile the definitions project.

I have referenced in my visual studio project both DLLs.
I can see the D99B_Invoic class in the object browser.
 Dim objSR As Stream

        objSR = New FileStream(dtmFile, FileMode.Open)

        Dim Parser As IEdiParser
        Parser = New EdiParser

        Try
            Dim interchange = Parser.ToInterchange(Of EdiFabric.Framework.InterchangeEnvelopes.Edifact.INTERCHANGE)(objSR, Nothing)
            ' Dim xml As XElement = Parser.Serialize(interchange)
        Catch ex As Exception
            vErrdesc = Err.Description
        End Try
When I get to the Parser.ToInterchange call I receive back the error.

Any ideas would be really appreciated.
Thanks in advance.
May 21, 2014 at 8:30 AM
Hi,

Odd isn't it. Could you please let me know of the namespace of D99B Invoic definition class ?
btw - you don't need to add the full D99B folder, only the definitions you will be using, e.g. D99B Invoic. Add it to Definitions project.

Cheers,
Don
May 21, 2014 at 12:37 PM
Thanks for the reply Don.

Namespace is this

namespace EdiFabric.Definitions.Edifact_D99B_INVOIC

the class is there as well.
public partial class M_INVOIC

I have the DLLS in the bin folder where the running app is compiled (copy local true).
May 21, 2014 at 1:46 PM
Have you got references to both Framework and Definitions project from your calling application ?
May 21, 2014 at 1:48 PM
yes both references are there.
May 21, 2014 at 2:07 PM
Do the unit tests work ? Or the sample application ? They shoud be doing what you are doing - just referencing the two projects.
btw - any chance the is an old dll somewhere without that new definition ? Can you try and delete both bin and obj folders and try to rebuild.
May 21, 2014 at 8:15 PM
The unit tests work fine.
I cleaned out all the old dlls from my system and still am getting the same error.

I decided to and take D00A file from the unit tests and try and run it through the same command and received a similar error except it was now unable to find the definitions for D00A.

I then created a C# project similar to the vb.net project.
I was then able to load the D00A file successfully, but with the D99B file I receive this error.


{"Last processed line was: COM+0800 3 302828:TE"}
[EdiFabric.Framework.Exceptions.ParserException]: {"Last processed line was: COM+0800 3 302828:TE"}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
HResult: -2146233088
InnerException: {"Object reference not set to an instance of an object."}
Message: "Last processed line was: COM+0800 3 302828:TE"
Source: "EdiFabric.Framework"
StackTrace: "   at EdiFabric.Framework.Parsers.Message.MessageDirector.ToParsingContext(ParseTree ediParseTree) in .......

The beginning of the edifact file I am working with

UNA:+.?*'
UNB+UNOA:4+D--01DTMD1+ELMO005481+20130213:1016+ELMO/3745621'
UNH+ELMO0000001+INVOIC:D:99B:UN+++ETEB01:3:B00+DT:1:14:212'
BGM+380+D--01/35500215516051+9'
DTM+3:20130202:102'
DTM+167:20130101:102'
DTM+168:20130131:102'
PAI+::3'
FTX+ACB++++DEU'
FTX+SUR+++AUFSICHTSRAT TIMOTHEUS HOTTGES (VORSITZENDER):GESCHAFTSFUHRUNG NIEK JAN VAN DAMME (SPRECHER)- THOMAS DANNENFELDT- THOMAS FREUDE- MICHAEL HAGSPIHL- DR BRUNO JACOBFEUERBORN- DIETMAR WELSLAU- DR DIRK WOSSNER'
FTX+INV+1++HINWEISTEXT ZUR RECHNUNG:SIE HABEN DAS RECHT EINWENDUNGEN GEGEN DIESE RECHNUNG BEZIEHUNGSWEISE EINZELNE IN DER RECHNUNG ERHOBENEN FORDERUNGEN ZU ERHEBEN. FUR DIESE EINWENDUNGEN HABEN SIE ACHT WOCHEN NACH RECHNUNGSZUGANG ZEIT. IM ANDEREN FALL GELTEN DIE RECHNUNGSBETRAGE ALS GENEHMIGT. BEI REDUZIERTEN PREISEN BILDEN DIE AKTUELLEN RAHMEN- UND KONDITIONSVEREINBARUNGEN DIE GRUNDLAGE FUR DIE BERECHNUNG:WIR SIND ALS RECHNUNGSERSTELLER VERPFLICHTET- SIE DARAUF HINZUWEISEN- DASS SIE BERECHTIGT SIND- BEGRUNDETE BEANSTANDUNGEN GEGEN EINZELNE FORDERUNGEN BEI DEN JEWEILS BENANNTEN ANBIETERN GELTEND ZU MACHEN:HINSICHTLICH DER IN RECHNUNG GESTELLTEN LEISTUNGEN DRITTER TEILEN WIR IHNEN UNTER UNSERER KOSTENFREIEN KURZWAHL 2828 (VOM HANDY IM INLAND) DIE NAMEN UND LADUNGSFAHIGEN ANSCHRIFTEN DER DRITTEN UND BEI DIENSTEANBIETERN MIT SITZ IM AUSLAND ZUSATZLICH DIE LADUNGSFAHIGE ANSCHRIFT EINES ALLGEMEINEN ZUSTELLUNGSBEVOLLMACHTIGTEN IM INLAND MIT.'
RFF+ADE:0000055250612'
RFF+PQ:5525061202150'
May 23, 2014 at 10:21 AM
I never tried it from a VB project, but glad you made it work . Could you please send the full EDI file ? The section that fails is not in the part you published.
What I assume is happening is that there is an ' symbol somewhere in the text (like a street name), which is not properly escaped and the parser considers it as a segment split.
Please search for COM+0800 3 302828:TE in you EDI message and I'm pretty sure the symbol just before it is '. Edifact escaping in your UNA segment is ?, therefore it should be ?'COM+0800 3 302828:TE to work properly and not just 'COM+0800 3 302828:TE

Don
May 23, 2014 at 1:30 PM
Thanks for your help.
The next line is COM+0180 5 212211:FX'


The entire file
UNA:+.?*'
UNB+UNOA:4+D--01DTMD1+ELMO005481+20130213:1016+ELMO/3745621'
UNH+ELMO0000001+INVOIC:D:99B:UN+++ETEB01:3:B00+DT:1:14:212'
BGM+380+D--01/35500215516051+9'
DTM+3:20130202:102'
DTM+167:20130101:102'
DTM+168:20130131:102'
PAI+::3'
FTX+ACB++++DEU'
FTX+SUR+++AUFSICHTSRAT TIMOTHEUS HOTTGES (VORSITZENDER):GESCHAFTSFUHRUNG NIEK JAN VAN DAMME (SPRECHER)- THOMAS DANNENFELDT- THOMAS FREUDE- MICHAEL HAGSPIHL- DR BRUNO JACOBFEUERBORN- DIETMAR WELSLAU- DR DIRK WOSSNER'
FTX+INV+1++HINWEISTEXT ZUR RECHNUNG:SIE HABEN DAS RECHT EINWENDUNGEN GEGEN DIESE RECHNUNG BEZIEHUNGSWEISE EINZELNE IN DER RECHNUNG ERHOBENEN FORDERUNGEN ZU ERHEBEN. FUR DIESE EINWENDUNGEN HABEN SIE ACHT WOCHEN NACH RECHNUNGSZUGANG ZEIT. IM ANDEREN FALL GELTEN DIE RECHNUNGSBETRAGE ALS GENEHMIGT. BEI REDUZIERTEN PREISEN BILDEN DIE AKTUELLEN RAHMEN- UND KONDITIONSVEREINBARUNGEN DIE GRUNDLAGE FUR DIE BERECHNUNG:WIR SIND ALS RECHNUNGSERSTELLER VERPFLICHTET- SIE DARAUF HINZUWEISEN- DASS SIE BERECHTIGT SIND- BEGRUNDETE BEANSTANDUNGEN GEGEN EINZELNE FORDERUNGEN BEI DEN JEWEILS BENANNTEN ANBIETERN GELTEND ZU MACHEN:HINSICHTLICH DER IN RECHNUNG GESTELLTEN LEISTUNGEN DRITTER TEILEN WIR IHNEN UNTER UNSERER KOSTENFREIEN KURZWAHL 2828 (VOM HANDY IM INLAND) DIE NAMEN UND LADUNGSFAHIGEN ANSCHRIFTEN DER DRITTEN UND BEI DIENSTEANBIETERN MIT SITZ IM AUSLAND ZUSATZLICH DIE LADUNGSFAHIGE ANSCHRIFT EINES ALLGEMEINEN ZUSTELLUNGSBEVOLLMACHTIGTEN IM INLAND MIT.'
RFF+ADE:0000055250612'
RFF+PQ:5525061202150'
NAD+IV+941082416++HERR:BPROFI:1348759BPROFI+UHLANDSTR.:5+HOCHHEIM++65239+DE'
FII+IV+1012105621+10000000::::::BUNDESBANK+DE'
NAD+BY+941082415++HERR ROBOT:GROSK:1348759BYARAR-8933:MAPID?:782461+UHLANDSTR.:5+HOCHHEIM++65239+DE'
NAD+SE+MOB:003:193++TELEKOM DEUTSCHLAND GMBH+LANDGRABENWEG:151+BONN++53227+DE'
FII+BK+DE68700202700667302269+HYVEDEMMXXX'
RFF+AHL:DE93ZZZ00000078611'
RFF+FC:205/5777/0518'
RFF+VA:DE 122265872'
RFF+XA:DE 60800328'
RFF+ALV:SITZ DER GESELLSCHAFT BONN'
RFF+AHO:AMTSGERICHT BONN HRB 5919'
NAD+PK+++TELEKOM DEUTSCHLAND GMBH:KUNDENSERVICE:GESCHAFTSKUNDEN+POSTFACH 300464+BONN++53184+DE'
CTA+IC'
COM+0800 3 302828:TE'
COM+0180 5 212211:FX'
TAX+9+VAT+++:::19.0'
CUX+1:EUR'
PAT+5++5:3:CD:60'
LIN+1++++0'
RFF+CT:18703'
LIN+2+++:1+1'
LIN+3+++:2+2'
IMD+C++88:004:193:880300010000'
IMD+F++88:004:193:ZUSATZANGABEN ZUM RECHNUNGSBETRAG'
LIN+4+++:3+3'
IMD+C++09:004:193:090000011596'
IMD+F++09:004:193:15% VERGUNSTIGUNG AUF BETRAG:TELEKOM DEUTSCHLAND GMBH'
MOA+38:-7.76'
LIN+5++++0'
IMD+F++06:006:193:12509184:TNN'
ALC+H++++:::KOMFORT EVN'
DTM+194:20091210:102'
ALC+H++++:::BUSINESSDATA 50'
DTM+194:20110412:102'
LIN+6+++:5+1'
LIN+7+++:6+2'
IMD+C++01:004:193:010100000001'
IMD+F++01:004:193:GRUNDPREISE'
LIN+8+++:7+3'
IMD+C++01:004:193:010000011565'
IMD+F++01:004:193:M2M ONLINE ANSCHLUSS'
DTM+194:20130101:102'
DTM+206:20130131:102'
MOA+38:7.95'
LIN+9+++:7+3'
IMD+C++01:004:193:010000011242'
IMD+F++01:004:193:BUSINESSDATA 50'
DTM+194:20130101:102'
DTM+206:20130131:102'
MOA+38:41.00'
LIN+10+++:5+1'
IMD+F++F88:005:193:(0175)6215271:DATENSERVICE 9,6'
DTM+163:20091210213740:204'
LIN+11+++:10+2'
IMD+C++02:004:193:020100000005'
IMD+F++02:004:193:VERBINDUNGSPREISE DATENSERVICE 9,6'
LIN+12+++:11+3'
IMD+C++02:004:193:020000000408'
IMD+F++02:004:193:VERBINDUNGEN ZUM TELEKOM MOBILFUNKNETZ'
DTM+194:20130115:102'
DTM+206:20130115:102'
MOA+38:2.76'
LIN+13+++:5+1'
LIN+14+++:13+2'
IMD+C++88:004:193:881100011254'
IMD+F++88:004:193:INFO ZUM VOLUMENBUDGET BUSINESSDATA 50'
LIN+15+++:14+3'
IMD+C++88:004:193:881000010005'
IMD+F++88:004:193:IHR (ANTEILIGES) BUDGET IM ABRECHNUNGSMONAT'
QTY+107:51200:2P'
LIN+16+++:14+3'
IMD+C++88:004:193:881000010006'
IMD+F++88:004:193:IHR GENUTZTES BUDGET IM ABRECHNUNGSMONAT'
QTY+107:0:2P'
UNS+S'
MOA+264:0.00'
MOA+132:0.00'
MOA+125:43.95'
MOA+124:8.35'
MOA+77:52.30'
MOA+9:52.30'
TAX+3+VAT+++:::19.0'
MOA+125:43.95'
MOA+124:8.35'
UNT+96+ELMO0000001'
UNZ+1+ELMO/3745621'
May 23, 2014 at 2:13 PM
I tried loading through a different more recent file and it fails on a similar COM+800 :TE line as well.
May 23, 2014 at 3:26 PM
Hi,

There is a bug in the definition, very peculiar in fact. As this segment has a single complex element it's not generated correctly.
I'll create an issue and will attach the definition file there for you to download.
May 23, 2014 at 3:31 PM
You can download a working definition from here
https://edifabric.codeplex.com/workitem/1305

Please replace the one you currently have.
May 23, 2014 at 3:51 PM
Ah, the new class fixed the issue.

Thanks!
May 28, 2014 at 3:44 PM
I figured out something.

I normally build all my parsers as .net dll's. When coding I have a testing form project in my solution to execute the code in the dll. Every time I was running I received back the missing definitions error.

I figured out that I needed to add a reference to the definitions dll inside the test form project. I already had the reference in the regular DLL parser application.

I always have only ever added references to the main application and not the test form. So that's a new one for me.
Aug 3, 2014 at 11:57 PM
Edited Aug 4, 2014 at 12:29 AM
Hi,

I am having a very similar issue with D96B\CUSCAR.cs definition.

Error: Last processed line was: GOODS IN TRANSITTO RIO GRANDE,:ARGENTINA'CNI+89

Lines before and after:

SGP+HLXU5055327'
PCI++638147 FCL/FCL:?'GOODS IN TRANSITTO RIO GRANDE,:ARGENTINA?''
CNI+89'

Is it possible that it is the same bug?

Thank you
Guillermo Da Silva

I really appreciate your help
Aug 5, 2014 at 2:33 PM
Hi,

Unfortunately it's not related to this bug, it's another one :)
I've just checked in a fix - please get the latest version for file EdiHelper.cs only. This should have resolved escaping terminators correctly.

Cheers,
Don