Prowide-Core Library - Unable to get Sequence E tags in an MT564 swift message

397 Views Asked by At

I am parsing a swift MT564 message and I am able to fetch all sequences(A, B, C, D, F) using getSequence() but I am getting null whenever I try to fetch sequence E despite the fact that the message I am parsing contains sequence E.

SwiftMessage mssg = SwiftMessage.parse(mssgString);
AbstractMT mt = mssg.toMT();
SwiftTagListBlock block = mt.getSequence("E");
1

There are 1 best solutions below

0
Niket Singh On

Got it after looking at the source code of the library's AbstractMT class. As sequence E is an optional repetitive one, we will use getSequenceList() method to get the list SwiftTagListBlock elements.