<?xml version="1.0" encoding="UTF-8"?>
<server name="MRemote" class="org.jpos.q2.iso.QServer" logger="Q2">
<attr name="port" type="java.lang.Integer">6034</attr>
<attr name="maxSessions" type="java.lang.Integer">150</attr>
<channel
class="org.jpos.iso.channel.NACChannel" packager="org.jpos.iso.packager.GenericPackager"
logger="Q2">
<property name="packager-config" value="cfg\packager\iso93ebcdic-custom.xml"/>
</channel>
<request-listener class="org.jpos.q2.iso.TestMe4" logger="Q2">
<property name="my-property" value="ABC"/>
<property name="my-other-property" value="XYZ"/>
</request-listener>
</server>
when the Authorization systems sends an incoming message to the JPOS server, i am getting the following error.
<log realm="channel/xx.xx.xx.xx:xxxx" at="Tue Sep 08 21:28:04.735 CST 2015" lifespan="1170ms">
<receive>
<iso-exception>
org.jpos.iso.IFE_NUMERIC: Problem unpacking field 5 (java.lang.ArrayIndexOutOfBoundsException: 74) unpacking field=5, consumed=65
org.jpos.iso.ISOException: org.jpos.iso.IFE_NUMERIC: Problem unpacking field 5 (java.lang.ArrayIndexOutOfBoundsException: 74) unpacking field=5, consumed=65
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:275)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:965)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:735)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:156)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:76)
</iso-exception>
--- data ---
0000 F0 F8 F0 F0 C2 20 00 00 80 00 00 00 04 00 00 05 ..... ..........
0010 00 00 00 02 F0 F5 F0 F3 F7 F0 F7 F0 F9 F0 F8 F1 ................
0020 F3 F2 F8 F0 F4 F0 F3 F0 F9 F4 F7 F0 F6 F0 F0 F5 ................
0030 F9 F1 F3 F0 F6 F1 C3 C2 F0 40 40 40 40 F0 F0 F0 .........@@@@...
0040 F0 F0 F0 F0 F0 F0 F0 F2 F0 F0 ..........
the message received is 0800 message, when i manually unpacked it there was no field 5. I believe the JPOS server is reading the header and bitmap wrongly.
below is the full message received from Authorization system.
004af0f8f0f0c2200000800000000400000500000002f0f5f0f3f7f0f7f0f9f0f8f1f0f0f9f3f7f0f3f0f2f1f4f0f6f0f0f5f9f1f3f0f6f1c3c2f040404040f0f0f0f0f0f0f0f0f0f0f2f0f0
First four digits is header followed by MTI and then bitmap.
Can you please suggest what channel and packager should i use ?
Thanks,
Alex
--
--
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
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/f05428bc-2a84-4e62-87cb-f1fa12d78c9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
b[0] = 148 mod 255 = 148 = 0x94b[1] = 0 148 div 255 = 0x00
<log realm="channel/xx.x.xx.xx:xxxx" at="Wed Sep 09 14:29:13.137 CST 2015" lifespan="8883ms">
<receive>
<iso-exception>
org.jpos.iso.IFE_LLLBINARY: Problem unpacking field 0 (org.jpos.iso.ISOException: Field length 303 too long. Max: 256) unpacking field=55, consumed=36
org.jpos.iso.ISOException: org.jpos.iso.IFE_LLLBINARY: Problem unpacking field 0 (org.jpos.iso.ISOException: Field length 303 too long. Max: 256) unpacking field=55, consumed=36
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:273)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:965)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:735)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:156)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:76)
</iso-exception>
--- data ---
0000 F0 F8 F0 F0 C2 20 00 00 80 00 00 00 04 00 00 05 ..... ..........
0010 00 00 00 02 F0 F5 F0 F3 F7 F0 F7 F0 F9 F0 F9 F0 ................
0020 F6 F2 F9 F1 F3 F0 F3 F7 F0 F5 F0 F0 F6 F0 F0 F5 ................
0030 F9 F1 F3 F0 F6 F1 C3 C2 F0 40 40 40 40 F0 F0 F0 .........@@@@...
0040 F0 F0 F0 F0 F0 F0 F0 F2 F0 F0 ..........
</receive>
Thanks,
Alex
Get rid of the header
<isopackager headerLength="9">
Then sort out your field definitions using a code snippet . If it throws an exception look at the output and the data to figure out what the definition should be. Its easier if you have a spec and fix the packager. You will need to sort this out yourself, by making changes to the packager since the readymade ones dont work for you.
String inHex = "F0F8F0F0C22000008000000004000005" +
"00000002F0F5F0F3F7F0F7F0F9F0F9F0" +
"F6F2F9F1F3F0F3F7F0F5F0F0F6F0F0F5" +
"F9F1F3F0F6F1C3C2F040404040F0F0F0" +
"F0F0F0F0F0F0F0F2F0F0";
GenericPackager pkgr;
ISOMsg m = new ISOMsg();
try {
pkgr = new GenericPackager("path\\to\\your\\iso93ebcdic-custom.xml");
Logger l = new Logger();
l.addListener(new SimpleLogListener());
pkgr.setLogger(l, "");
m.setPackager(pkgr);
m.unpack(ISOUtil.hex2byte(inHex));
}
catch (ISOException ex) {
ex.printStackTrace();
m.dump(System.out, "");
}
-chhil
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/cb6d4ce0-f434-488d-9120-8bfb76710ca7%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefAwNh%3Dy6c%3DTwrvoUj%2BsfTi0AmF-2gCdAwojWeeBXDBC-w%40mail.gmail.com.
There is no header data present in the hexdump provided.
-chhil
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAAgSK%3D%3DmNa2HiET2KM9b579kCae8-s03Lr2UPrht%3DFvode6Tow%40mail.gmail.com.