> I am just using jPOS to implement my company's payment system which
> need to unpack iso8583 messages from different banks. However, all
> different messages would be come from the same connection(say, same
> socket).
Is this fixed? A dedicated port per bank would be less complicated and
would allow you greater control over access and monitoring activity? A
*much* cleaner solution.
> So I just wonder if there is any simple way to identify which
> bank the message come from so that I can apply the corresponding bank
> packager for unpacking.
If you cannot adjust the port setup, you will need to identify the
source from indicators in the stream - at the channel level, perhaps
length formats or header content. If some banks share the same message
structure, then the message field contents will be used.
You have the detail of the different message structures?
I think you could also get the socket from the channel and base your
packager decision upon the socket.getInetAddress().getHostAddress() value.
If possible I would tend to go for a port per connection, it allows much
greater control and independent processing for each client.
PS, make sure you take care of any commercial license obligations.
--
Mark
>
>> You have the detail of the different message structures?
> Actually, identifying the source directly from iso8583 message is our
> prefered approach(if it is feasible) but I am not sure if there is any
> field in the iso8583 message that would be used to identify the source
> of message(actually, I got 2 banks message structure only). Please
> share your experience for this.
The fields within your ISO8583 structured messages can vary from bank to
bank. Thus your packagers *and* the field(s) you need to check for
presence or perhaps for content may also vary.
ISO8583 for bank 1 !(necessarily)= ISO8583 for bank 2
Which is where you started:-
"
So I just wonder if there is any simple way to identify which
bank the message come from so that I can apply the corresponding bank
packager for unpacking.
"
The detail of the message content and possible indicators you will
already have, we do not.
--
Mark
'We' may find both kelvin's banks don't use field 32 either.
8)
--
Mark
> Mark's reply is what I am concerning: whether ALL banks would use
> field 32?
All interfaces and message structures vary in format and content, often
there are similarities; they are rarely the same, especially at the
interface level.
> If anybody who had seen a bank that did not use field 32, please tell
> us.
Why not check both your banks message specification to test this?
At this stage I 'hear' you do believe that ISO8583 defines the field
content and field use. I would humbly suggest ISO8583 defines the
message structure and possible field structures. The field *use* is
often decided by the interface owner.
Please check your two bank's message specifications for field 32, and
work from there.
Just remember to check all future additions (of bank *and* vendor)
conform to this position.
--
Mark
Field 2 - often used for PAN - is also usually variable length. So your
statement is wrong I'm afraid.
> so I think we may get the content of field 32 only by
> just skipping the first 31 fields' total byte length of the iso
> message.(Of course, the premise is that all banks would use field 32)
As David indicates this is not a universal approach - many things will
stop it working. Having said that, it might work for your vendor's
interface, especially if the document you are 'quoting' from is from
your vendor (or bank(s)) and not a version from iso.org.
--
Mark
-Chhil