Comments (10)
@benisantos, thanks for the report. I'll be looking into this shortly.
from staedi.
@benisantos - when the TOO_MANY_DATA_ELEMENTS
error occurs, can you confirm that the segment involved is the SRC
?
from staedi.
After doing some additional research on this issue, I believe that your configuration that includes the following schema type should work. At this point, I suspect that there is some other data error in the input file you are processing that is causing the ELEMENT_OCCURRENCE_ERROR
.
<segmentType name="SRC">
<sequence />
</segmentType>
from staedi.
Hi @MikeEdgar and thank you for your time. I attach a simple test with the TOO_MANY_DATA_ELEMENTS failure.
The test fails with:
java.lang.AssertionError: ELEMENT_OCCURRENCE_ERROR: TOO_MANY_DATA_ELEMENTS (seg=SRC, elemPos=1, compoPos=-1, textOnError=null)
from staedi.
@benisantos , thank you for the example. I will be providing a fix for the issues you flagged with TODO comments as well in your test case related to the UNA segment.
from staedi.
@benisantos, the reason you are seeing an issue with the validation of the IATA
in UNB element 1, component 1 and PNRGOV
in the UNH is because the internal control schema is based on the ISO control segments which do not include those values. Are you aware of any publications by IATA that would define the valid values for IATA's message types?
The use of IATA
in the UNB seems to be in conflict with the guidelines here (https://www.gefeg.com/jswg/cl/v4x/40200/cl1.htm), but I understand that the PDF linked in #10 requires that code value and it should be supported somehow.
from staedi.
@MikeEdgar "Are you aware of any publications by IATA that would define the valid values for IATA's message types?"
- No, sorry. I'm only aware of "PNRGOV" and "ACKRES" msg types :(
from staedi.
@benisantos , the following code sample is a way you might be able to "ignore" the code values in the UNB
and UNH
segments. You could alternatively use an EDIStreamFilter
to ignore them and keep your main logic cleaner. I have identified the issues with TOO_MANY_DATA_ELEMENTS
and SEGMENT_NOT_IN_DEFINED_TRANSACTION_SET
for UNA
and will have a new release published soon, hopefully today.
case ELEMENT_DATA_ERROR:
// TODO Change "control schema", because it does not recognise "IATA" (UNB), "PNRGOV:11" (UNH)
if ("DE0001".equals(reader.getReferenceCode()) && "IATA".equals(reader.getText())) {
break;
}
if ("DE0065".equals(reader.getReferenceCode()) && "PNRGOV".equals(reader.getText())) {
break;
}
if ("DE0052".equals(reader.getReferenceCode())) {
break;
}
// Handle the error
from staedi.
@benisantos - the fix for the two issues here has been release and is now available in version 1.4.0.
<dependency>
<groupId>io.xlate</groupId>
<artifactId>staedi</artifactId>
<version>1.4.0</version>
</dependency>
from staedi.
Thank you so much @MikeEdgar
from staedi.
Related Issues (20)
- Repetition Elements are not being correctly identified HOT 3
- Error reported when reading ANSI encoded txt file HOT 27
- Missing Mandatory Segments HOT 8
- Does enumerated elements really requires minLength and maxLength? HOT 12
- Reporting a vulnerability HOT 2
- How to apply relational condition in schema HOT 11
- X12 unexpected segment error occurred when first segment of loop is missing HOT 5
- Support multiple ISA segments in an X12 EDI file
- Validator should be reset at end of interchange
- titles for segments like BGN, ST, INS are not accessible in 834 EDI HOT 1
- Adding condition to writeSegment HOT 4
- Option to ignore repetition separator in the ST/SE segments HOT 8
- default decimal mark is point (.) when UNA segment is not present HOT 2
- HL Segment is not interpreted correctly by ReaderService HOT 17
- How to define element inside element in schema? HOT 7
- How to process large EDI files in reader service HOT 5
- staedi api : EDIStreamReader fail to parse if segment element has accent marks . HOT 12
- Edi 835 Never Emitting a START_TRANSACTION HOT 3
- dots in an element in the ISA results in ELEMENT_OCCURRENCE_ERROR HOT 2
- Improper parse of simple 837 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from staedi.