Comments (1)
The field gets broken because its content is invalid. And since field 61 in particular does not have any subfield (component) separators (slashes, semicolon, line break) then it is impossible for the parser to recreate the same object you have originally build.
When you build the field instance with new Field61()
and you set the internal components individually, each value you provide is store in inner attributes of the class. So far, so good.
However, when you append the field to the message, in the actual message structure the field value is a plain String. For your particular test this becomes:
:61:230510C1,S//dummy
Then, when you retrieve the field from the message, the parser will do a best effort to split the string into field 61 internal components. But if the value has missing or not well-formed content, there is no way to do a proper match.
When you set the values, you should make sure they are compliant with the field specification:
DATE2 [DATE1] 2a [1a] NUMBER <SUB-6> <VAR-SEQU-1>
I suggest you do the test taking into consideration field 61 samples from compliant messages. For example:
081027C858,28NOPT12716219\n1524/6006/TESORO NACIONAL
1001060106D341,34N422NONREF\r\nFURTHER REFERENCE
090227C291553,62NAYG13391140\n1524/6009/TRASPASO AUTOMATICO AL
020626D120000,NCOLABCD//12345
1512290201EDZ0000000002,2222FBNKNONREF
170717D203336,94NTRFR016341554//2395200\n01P
from prowide-core.
Related Issues (20)
- Major issue in parse field values algorithm HOT 2
- Invalid ConstraintValidator annotation on CurrencyValidator HOT 1
- MT540 CANC should return the SEME when method getField20C() is called HOT 3
- Parsing MT942 without block 4 HOT 1
- Trouble parsing multiline into components HOT 1
- Empty tag removed when parsing HOT 2
- MT566 - USECU / FIA is not repetitive HOT 1
- MT535 Extraction : Parent vs Child field values HOT 4
- AbstractMT parser - Field 50F (MT103 ) is not removing the forward slash HOT 2
- Field 71B in MT590 component narrative HOT 3
- Field 71B in MT590 component narrative HOT 1
- MT103
- Update the javax.xml.bind:jaxb-api to Jakarta EE apis (supporting Spring Boot 3 releases) HOT 1
- MT940 Swift message unable to return double value with decimals HOT 1
- Incorrect LT identifier handling (AbstractMT) HOT 3
- Distinguishing Tag86 in MT940 HOT 1
- Faulty field 253 in MT020Test HOT 1
- Make Field methods non-final to allow subclassing HOT 7
- Harmonize source code indentation style HOT 1
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 prowide-core.