I have a requirement where I need to set some subelements in the private data
field 127, specifically subfield 22.
I am unsure of how to actually set the data of field 127 as it needs to
contain a bitmap specifying which subfields are populated (in this case only
subfield 22).
I have looked through the documentation, but there is not much mention of
setting up subfields.
My logic tells me that it should be as simple as creating a IsoValue, setting
the needed stuff on it, and adding that value to the message. Or am I missing
the plot completely? :P
Could someone please explain to me how to accomplish this using j8583?
Thank you in advance!
---Jaco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can implement a CustomField encoder for your field 127 data and pass it to
the MessageFactory. When a message is parsed, your CustomField will be called
to parse that data and return a custom object which is stored in field 127,
and when a message is encoded, the CustomField will be called to encode the
object in field 127 as a String.
This is independent of the datatype used for the field (which could be ALPHA
or LLLVAR, etc)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a requirement where I need to set some subelements in the private data
field 127, specifically subfield 22.
I am unsure of how to actually set the data of field 127 as it needs to
contain a bitmap specifying which subfields are populated (in this case only
subfield 22).
I have looked through the documentation, but there is not much mention of
setting up subfields.
My logic tells me that it should be as simple as creating a IsoValue, setting
the needed stuff on it, and adding that value to the message. Or am I missing
the plot completely? :P
Could someone please explain to me how to accomplish this using j8583?
Thank you in advance!
---Jaco
Ugh, my apologies for the horrible formatting. :/
You can implement a CustomField encoder for your field 127 data and pass it to
the MessageFactory. When a message is parsed, your CustomField will be called
to parse that data and return a custom object which is stored in field 127,
and when a message is encoded, the CustomField will be called to encode the
object in field 127 as a String.
This is independent of the datatype used for the field (which could be ALPHA
or LLLVAR, etc)
Hello,
Thank you for the speedy response. :)
I assume that the test case for CustomField48 would be a good starting point
as far as having an example of what you are describing?
Thank you!
---Jaco
Yes, CustomField48 is a very simple example of a custom field codec.
Can this be done with the "Composite field" feture introduced in 1.9 ?
My requirement for field 48 is below :
Length followed by,
At 0 bitmap (length 16) followed by,
different fields (1,2,3,4 till 62)
I tried to do it, however the bitmap was not sent.
You can use a composite field, but you have to do the bitmap yourself.
Or you can simply create a separate IsoMessage, get its debugString and put that inside field 48.