Error parsing IFTMIN D99B

Jun 6, 2014 at 3:21 PM
I am trying to parse the following file and it fails on the line in bold. I fails with a NullReferenceException. Any help will be greatly appreciated.

UNB+UNOC:2+Sender ID:ZZZ+NYKS:ZZZ+080221:1544+100004274'
UNH+1+IFTMIN:D:99B:UN'
BGM+340:::SI_LINK+6907611:1.28+9'
DTM+137:200802211544:203'
TSR+30+2'
FTX+AAI+++PLS SEND FOR APPROVAL'
FTX+AAI+++SEND B/L TO THE MILL ATTN?:MAJ KAMMARBO'
FTX+AAI+++MARK THE INV. WITH?:F3PH-886186-88'
FTX+AAI+++SEND INV. TO?:'
FTX+AAI+++STORA ENSO LOGISTICS GMBH'
FTX+AAI+++POSENER STR.30'
FTX+AAI+++23554 LUEBECK'
FTX+AAI+++GERMANY'
FTX+AAI+++PLS ADD VESSEL,PORT,DATE'
FTX+AAI+++SEND 1 COPY TO US'
FTX+AAI+++REGARDS'
FTX+AAI+++CAROLINE'
CNT+7:21704:KGM'
CNT+11:20'
CNT+16:1'
LOC+57+BEZEE::6:ZEEBRUGGE'
LOC+73+SEGOT::6'
DTM+95:20080227:102'
RFF+FF:3150,33167'
RFF+BN:Booking Number'
RFF+SI:F3PH-886186-88'
CPI+4++P'
TDT+20+046E+1++NYKS:172+++:::MOL INTEGRITY'
LOC+7+PHMNS::6'
LOC+9+BEZEE::6'
LOC+11+PHMNS::6'
LOC+88+BEZEE::6'
NAD+CA+NYKS:160:87++N Y K (NIPPON YUSEN KAISHA)'
NAD+HI+808053:160:ZZZ++Stora Enso Logistics AB+Box 2556:Sydatlanten 17:SE-40317 Goeteborg:Sweden'
CTA+IC+:Caroline Andersson'
COM+?+46-10-4615850:TE'
DOC+706+:26++3'
DOC+707+:26++5'
NAD+FW+808053:160:ZZZ++Stora Enso Logistics AB+Box 2556:Sydatlanten 17:SE-40317 Goeteborg:Sweden'
NAD+CN+++FIL-ANCHOR PAPER CO INC+434436 RIVERSIDE STREET:NAVOTAS,METROMANILA:MANILA:PHILIPPINES'
NAD+CZ+++STORA ENSO FORS AB+SE-774 89 FORS:SWEDEN'
NAD+NI+++FIL-ANCHOR PAPER CO INC+434436 RIVERSIDE STREET:NAVOTAS,METROMANILA:MANILA:PHILIPPINES'
GID+1+20:RL::6:REELS'
FTX+AAA+++Coated Board'
FTX+AAA+++FCL/FCL'
FTX+AAA+++THC AT BOTH ENDS TO BE'
FTX+AAA+++PREPAID BY SHIPPER.'
FTX+AAA+++SHIPPED ON'
FTX+AAA+++BOARD/VESSEL/PORT/DATE'
FTX+AAA+++FREIGHT PREPAID'
MEA+AAE+WT+KGM:21704'
PCI++FIL-ANCHOR:MANILA:MADE IN SWEDEN:F3PH-886186 001:F3PH-886187 001:F3PH-886188 001'
SGP+NYKU5973119+20'
MEA+AAE+AAW+MTQ:33.04'
MEA+AAE+WT+KGM:21704'
EQD+CN+NYKU5973119+45G0'
SEL+332531'
UNT+58+1'
UNZ+1+100004274'
Coordinator
Jun 9, 2014 at 7:55 AM
Edited Jun 9, 2014 at 7:56 AM
Hi,

This is a known issue. Please go to issues page, I've uloaded the correct definition for you to use.

What happens is that xsd2code doesn't generate the element type containing the element name, but with a name of the sub element, only when there is a single child.
Marked as answer by dkazubek on 6/11/2014 at 5:39 AM
Jun 11, 2014 at 12:40 PM
It worked. Thanks a lot.