Get packager dynamically using the TPDU content

436 views
Skip to first unread message

kelvin

unread,
Nov 10, 2009, 12:13:03 AM11/10/09
to jPOS Users
Hi all,

Thanks for your opinion in my previous post!

Finally, our system would connect to a NAC vendor to receive the
iso8583 message. The protocol used would be: [2byte Message length]
+[5byte TPDU]+[iso 8583 message], so I think the NACChannel would be a
good starting point for my work.(Please comment if I am wrong).
However, I got another problem: How can I set the packager dynamically
according to the content of TPDU? Can you give me some hints?

Kelvin



Mark Salter

unread,
Nov 10, 2009, 4:18:09 AM11/10/09
to jpos-...@googlegroups.com
kelvin wrote:
>
> Finally, our system would connect to a NAC vendor to receive the
> iso8583 message. The protocol used would be: [2byte Message length]
> +[5byte TPDU]+[iso 8583 message], so I think the NACChannel would be a
> good starting point for my work.(Please comment if I am wrong).
Can you give the format of the length (binary and endian, character etc)?

Your vendors way of indicating the message length might not match
NACChannels...

> However, I got another problem: How can I set the packager dynamically
> according to the content of TPDU? Can you give me some hints?

1. Look at the source.
2. Look at the source again 8).
3. extend NACChannel - if that matches your network protocol, the
override getDynamicPackager(header, b) to return the packager based upon
the header (5 byte TPDU) content and/or the binary message content.


--
Mark

kelvin

unread,
Nov 10, 2009, 9:13:15 PM11/10/09
to jPOS Users
Hi Mark,

Thanks~! I understand that I might need to extend the NACChannel to
fit the vendor's protocol. I am still waiting for my NAC vendor to
confirm the details. By the way, I know Alejandro Revilla has added
the patch r2791 for adding method getDynamicPackager(header, b) to
BaseChannel but it seems receive() method still calling
getDynamicPackager(b). It seems there is another patch r2793 to fix
this right?


Kelvin

Mark Salter

unread,
Nov 11, 2009, 3:08:07 AM11/11/09
to jpos-...@googlegroups.com
kelvin wrote:
> It seems there is another patch r2793 to fix
> this right?

The combination of the two should provide what is needed. Patch r2793
is available in SVN, as discussed in thread :-

http://groups.google.com/group/jpos-users/browse_thread/thread/bd4daac7a2e901b1?hl=en#


--
Mark

kelvin

unread,
Nov 11, 2009, 4:42:00 AM11/11/09
to jPOS Users
Reply all
Reply to author
Forward
0 new messages