custom packager

44 views
Skip to first unread message

pks!!@

unread,
Apr 26, 2017, 2:56:28 AM4/26/17
to jPOS Users
I am using jpos with my custom packager (".java" class) to send a message to another server.

My custom packager previously contained field at 55 as "new IFA_LLLCHAR (999, "RESERVED ISO")," .With this filed message was not receiving at receiver but, when i changed this field as "new IFA_LLCHAR (99, "RESERVED ISO")," message get received by client.

Will you please guide me the effect & why the message was not receiving previously or guide me some useful links to get more guidelines on this.

Please find the attachment for custom packager class

Thanks & Regards

pkS
CustomPackager.txt

chhil

unread,
Apr 26, 2017, 4:24:07 AM4/26/17
to jpos-...@googlegroups.com
If I tell you a field is 10 bytes but send it as 5 what do you think will happen? you will wait for 10 bytes or use 5 additional bytes from the next field.

Similarly if I send LLLChar as 010ABCDEFGHIJ where 010 is the LLL and ABCDEFGHIJ is the 10 byte character data.
Now the receiver is expecting LLCHAR so when you send 010ABCDEFGHIJ its reading LL as 01 and data as i byte data as 0. You can see how the length of 10 that you intended gets read differently. Then it looks at the packager for the next field and uses ABCDE..... to extract fields, and chances are very high it will not be able to parse future fields due to misalignment and err out and possibly discard the data received.

-chhil

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/40025d40-be34-4b50-a839-1c4898b2eed1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages