Emre Yılmaz wrote:
> Hello,
>
> We are trying to reimplement our already running ISO Server (that we
> have built from scratch using Java) using JPOS. Since this ISO Server
> is used for some firm-specific messages, and since we have built it
> ourselves, we have some little differences from ISO8583 message
> structure. These are:
>
> - our field 48 uses length-tag-value subfields with packed 2 byte
> length and packed 1 byte tags and unpacked data.
> - subfields can have the same tag. ie we have messages where we have a
> field 48 information with 10 tag 80 subfields etc.
>
> Now, to solve the first problem, I created a custom field packager and
> it worked like a charm.
Of course, this works with the jPos approach and only needed a subfield
class handler 8).
> However, I am not sure how to go around the
> second problem, or if it there can be a solution for that at all.
The second problem is that the value of the last subfield found in 48 is
the only one that the resultant ISOMsg holds?
If so, you are going to have to extend GenericSubFieldPackager to notice
and track the repeating tags (on pack and unpack). You will need to
evolve a mechanism of accessing and writing to the multiple repeating
subfields as needed.
Effectively you need your 'GenericRepeatingSubFieldPackager' to provide
Lists of values for a given subfield tag/id for read/write/delete. This
way the class that handles the overall field 48 controls the repeating
subfields, something each subfield cannot do on it's own.
Alternatively, as this is an internal format with - I would imagine -
hardships at each end with the repeating subfields, can you change the
approach and use different tags for each subfield value?
--
Mark