Hi, Today i want to share about jPOS custom message interchange specifications. When we talk about ISO-8583 over socket messaging, there are many interchange specifications. It is very important to know the interchange specifications, so we can determine a message for every single request/response.
Once we have a binary representation of a given ISO-8583 message, we have to transmit it over the wire using some communication protocol, for example TCP/IP, UDP/IP, SSL, etc.
The communication protocol is not part of ISO-8583 definition, so each vendors may have different communication protocol.
Wire protocol is composed by:
- An optional Header
- Message Body
- An optional Footer
And TCP/IP based implementation may use some a couple of byte to indicate message length. In jPOS framework, the wire protocol is determine in ChannelAdaptor. you can find jPOS wire protocol communication implementation on org.jpos.iso.channel package.
some popular channels:
Channel | Description |
---|---|
CSChannel | LL LL 00 00 <header> ISO-DATA |
NACChannel | LL LL <TPDU> ISO-DATA. LL LL represents the TPDU+ISO-DATA length in network byte order |
NCCChannel | LL LL <TPDU> ISO-DATA. LL LL represents the TPDU+ISO-DATA length in BCD (binary coded decimal) |
ASCIIChannel | LLLL <header> ISO-DATA |
But, sometime we need to create an custom message interchange implementation. you can find some jPOS channel implementation Creating jPOS custom channel. for example, in my post Tutorial Customize JPos NACChannel with Tail, i try to create custom NACChannel that can send and read the message trailer. The NACChannel normally didn’t send and read message trailler, so i need to overide getMessageTrailler(), sendMessageTrailler(), sendMessageLength(), getMessageLength() from BaseChannel. Because we send and receive the message trailler, we need to update the sendMessageLength and getMessageLength.
So, if you want to create jPOS custom message interchange specifications you can do it on Channel level. Hope, this post about jPOS custom message interchange specifications can help you understand about jPOS framework.
Leave a Reply