smooks / smooks-edi-cartridge

Smooks EDI & EDIFACT cartridges for reading as well as writing EDI
https://www.smooks.org
Other
20 stars 14 forks source link

EDIFACT D97A doesn't have valid enumerations #185

Closed sankethpb closed 1 year ago

sankethpb commented 2 years ago

Dear All,

We are trying to create EDIFACT DELFOR D97A messages using Smooks 2.0.0-RC1. We found that few of the qualifier enumerations are not valid for D97A messages. Kindly advice on how this could be fixed?

pom.xml is attached for reference, the D97A XSD Schema also has only invalid enum values.

Example: E1153ReferenceQualifier --> has only one value AAA in the enumeration E3035PartyQualifier E7143ItemNumberTypeCoded E2013FrequencyCoded

Thanks a lot in advance pom.xml.txt

sankethpb commented 2 years ago

@claudemamo kindly request your support here. Thank you in advance.

bnORISHA commented 2 years ago

Hi,

I have the same problem with D96A. I found many missing enumerations : E4451TextSubjectQualifier.PMD E4451TextSubjectQualifier.SUR E4451TextSubjectQualifier.REG E1153ReferenceQualifier.ON E1153ReferenceQualifier.AAK E1153ReferenceQualifier.IV E1153ReferenceQualifier.VA E1153ReferenceQualifier.GN E1153ReferenceQualifier.XA E3035PartyQualifier.IV E3035PartyQualifier.BY E3035PartyQualifier.DP E3035PartyQualifier.SE E3035PartyQualifier.RE E5463AllowanceOrChargeQualifier.C E7161SpecialServicesCoded.FP E7161SpecialServicesCoded.TX E5153DutyTaxFeeTypeCoded.VAT E7143ItemNumberTypeCoded.SA E7143ItemNumberTypeCoded.IN E7077ItemDescriptionTypeCoded.E E5125PriceQualifier.AAB

Can I override this ?

Thanks.

funnydevelop commented 2 years ago

hello , i got the same problem with d01b, have you resoloved it ? There were some E1153ReferenceCodeQualifier enum values were missed ,so that Exception was occured. such as RFF - c506 -1153 ,YC1, AVQ i didn't find them at E1153ReferenceCodeQualifier . If you deal with this problem , please help me . thank you. Expect your reply........

cjmamo commented 2 years ago

Which version of the cartridge are you using @funnydevelop ?

funnydevelop commented 2 years ago

Which version of the cartridge are you using @funnydevelop ? hi, @claudemamo : The cartridge version is 2.0.0-RC1</smooks.edifact.cartridge.version>

cjmamo commented 2 years ago

The EDIFACT directories are notorious to parse since they are, for the most part, described in free-form text. There are numerous subtleties which the directory parser must take into account before it can generate the DFDL schemas. D96A has some difference/s in the way it describes its code lists which the directory parser doesn't factor in leading to the missing enums.

funnydevelop commented 1 year ago

@claudemamo Do you have solutions to deal with this problem in other ways rather than change edifact protocol version (D01B -> D96A .......)? such as re-build the smooks-edi-cartridge project or wait for the latest release etc...

bnORISHA commented 1 year ago

@claudemamo So there is no way to override this ?

funnydevelop commented 1 year ago

The XXXX Qualifiers are enum type(e.g. E1153ReferenceCodeQualifier etc....). So, There's no way to override it or extend it within java grammer... i have an idea ,that's to modify the .class file and re-package it to jar ,but i didn't try it yet... So , I am not sure this solution is worked fine...

sankethpb commented 1 year ago

@funnydevelop based on #125 We modified the XSD files of D97A to include the required ENUM and added settings in maven to generate the Java Classes and use the generated classes instead of default. Temporarily this was the only way to use smooks Example as given in #125 https://github.com/claudemamo/smooks-java-to-edifact/blob/master/pom.xml#L56-L93