0200623A400108C180000605350138000009011209450656381209450901090260120300800000006563815007110200900100800000012534316522301360
Bit-2 = 053501
Bit-3 = 380000
Bit-7 = 0901120945
Bit-11 = 065638
Bit-12 = 120945
Bit-13 = 0901
Bit-15 = 0902
Bit-18 = 6012
Bit-32 = 008
Bit-37 = 000000065638
Bit-41 = 15007110
Bit-42 = 200900100800000
Bit-48 = 534316522301
Bit-49 = 360
String inHex = "0200623A400108C180000605350138000009011209450656381209450901090260120300800000006563815007110200900100800000012534316522301360";
GenericPackager pkgr;
ISOMsg m = new ISOMsg();
try {
pkgr = new GenericPackager("...base1.xml");
Logger l = new Logger();
l.addListener(new SimpleLogListener());
pkgr.setLogger(l, "");
m.setPackager(pkgr);
m.unpack(ISOUtil.hex2byte(inHex));
// m.dump(System.out, "");
}
catch (ISOException ex) {
ex.printStackTrace();
m.dump(System.out, "");
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE isopackager PUBLIC
"-//jPOS/jPOS Generic Packager DTD 1.0//EN"
"http://jpos.org/dtd/generic-packager-1.0.dtd">
<!-- VISA's Base1 field descriptions for GenericPackager -->
<isopackager>
<isofield
id="0"
length="4"
name="MESSAGE TYPE INDICATOR"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="1"
length="16"
name="BIT MAP"
class="org.jpos.iso.IFB_BITMAP"/>
<isofield
id="2"
length="19"
name="PAN - PRIMARY ACCOUNT NUMBER"
pad="true"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="3"
length="6"
name="PROCESSING CODE"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="4"
length="12"
name="AMOUNT, TRANSACTION"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="7"
length="10"
name="TRANSMISSION DATE AND TIME"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="11"
length="6"
name="SYSTEM TRACE AUDIT NUMBER"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="12"
length="6"
name="TIME, LOCAL TRANSACTION"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="13"
length="4"
name="DATE, LOCAL TRANSACTION"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="15"
length="4"
name="DATE, SETTLEMENT"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="18"
length="4"
name="MERCHANTS TYPE"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="32"
length="11"
name="ACQUIRING INSTITUTION IDENT CODE"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="37"
length="12"
name="RETRIEVAL REFERENCE NUMBER"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="39"
length="2"
name="RESPONSE CODE"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="41"
length="8"
name="CARD ACCEPTOR TERMINAL IDENTIFICACION"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="42"
length="15"
name="CARD ACCEPTOR IDENTIFICATION CODE"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="48"
length="999"
name="ADDITIONAL DATA - PRIVATE"
class="org.jpos.iso.IFB_LLLNUM"/>
<isofield
id="49"
length="3"
name="CURRENCY CODE, TRANSACTION"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="63"
length="999"
name="ADDITIONAL DATA - PRIVATE"
class="org.jpos.iso.IFB_LLLNUM"/>
</isopackager>
<unpack>
0200623A400108C180000605350138000009011209450656381209450901090260120300800000006563815007110200900100800000012534316522301360
<bitmap>{2, 3, 7, 11, 12, 13, 15, 18, 32, 37, 41, 42, 48, 49}</bitmap>
<unpack fld="2" packager="org.jpos.iso.IFB_LLNUM">
<value>053501</value>
</unpack>
<unpack fld="3" packager="org.jpos.iso.IFB_NUMERIC">
<value>380000</value>
</unpack>
<unpack fld="7" packager="org.jpos.iso.IFB_NUMERIC">
<value>0901120945</value>
</unpack>
<unpack fld="11" packager="org.jpos.iso.IFB_NUMERIC">
<value>065638</value>
</unpack>
<unpack fld="12" packager="org.jpos.iso.IFB_NUMERIC">
<value>120945</value>
</unpack>
<unpack fld="13" packager="org.jpos.iso.IFB_NUMERIC">
<value>0901</value>
</unpack>
<unpack fld="15" packager="org.jpos.iso.IFB_NUMERIC">
<value>0902</value>
</unpack>
<unpack fld="18" packager="org.jpos.iso.IFB_NUMERIC">
<value>6012</value>
</unpack>
<unpack fld="32" packager="org.jpos.iso.IFB_LLNUM">
<value>008</value>
</unpack>
<unpack fld="37" packager="org.jpos.iso.IFB_NUMERIC">
<value>000000656381</value>
</unpack>
<unpack fld="41" packager="org.jpos.iso.IFB_NUMERIC">
<value>50071102</value>
</unpack>
<unpack fld="42" packager="org.jpos.iso.IFB_NUMERIC">
<value>009001008000000</value>
</unpack>
error unpacking field 48 consumed=55
<iso-exception>
org.jpos.iso.IFB_LLLNUM: Problem unpacking field 48
<iso-exception>
Field length 2534 too long. Max: 999
org.jpos.iso.ISOException: Field length 2534 too long. Max: 999
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:179)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:238)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:25)
</iso-exception>
org.jpos.iso.ISOException: org.jpos.iso.IFB_LLLNUM: Problem unpacking field 48 (org.jpos.iso.ISOException: Field length 2534 too long. Max: 999)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:187)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:238)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:25)
Nested:org.jpos.iso.ISOException: Field length 2534 too long. Max: 999
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:179)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:238)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:25)
</iso-exception>
<iso-exception>
org.jpos.iso.IFB_LLLNUM: Problem unpacking field 48 (org.jpos.iso.ISOException: Field length 2534 too long. Max: 999) unpacking field=48, consumed=55
org.jpos.iso.ISOException: org.jpos.iso.IFB_LLLNUM: Problem unpacking field 48 (org.jpos.iso.ISOException: Field length 2534 too long. Max: 999) unpacking field=48, consumed=55
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:268)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:25)
</iso-exception>
000000656381, different with actually i expected.
maybe somebody can help me what class i must use in my isofiled xml packager
I am not 100% sure but this may be the problem
Hexdump of the hex2byte message
0000 02 00 62 3A 40 01 08 C1 80 00 06 05 35 01 38 00 ..b:@.......5.8.
0010 00 09 01 12 09 45 06 56 38 12 09 45 09 01 09 02 .....E.V8..E....
0020 60 12 03 00 80 00 00 00 65 63 81 50 07 11 02 00 `.......ec.P....
0030 90 01 00 80 00 00 01 25 34 31 65 22 30 13 60 .......%41e"0.`
if you notice
03 00 80 offset 0x22 - 0x24
<isofield
id="32"
length="11"
name="ACQUIRING INSTITUTION IDENT CODE"
class="org.jpos.iso.IFB_LLNUM"/>
Indicate length is 3 and value is 008 and a nibble of value 0 left over.
03 00 80 00 00 00 65 63 81
Field 37 is
<isofield
id="37"
length="12"
name="RETRIEVAL REFERENCE NUMBER"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
And you are expecting the nibble left over from field 32 to be used in field 37 and I dont think that will happen as we use byte boundaries.
Can anyone confirm this?
-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
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/e7076828-aca7-4205-abe5-3a7de0f2b151%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefB9Y4fpWepm1EaJcSEkVVCNc1j-kHotvbe%3DKFJ4EiD_sw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CALB6eUukH8WTGuBWMQg65k_ExM8jW59LiPapX1sXbeg_gPr_Pw%40mail.gmail.com.
<log realm="" at="Wed Sep 16 08:21:40.500 ICT 2015" lifespan="325ms">
<unpack>
0200623A400108C180000605350138000009011209450656381209450901090260120300800000006563815007110200900100800000012534316522301360
<bitmap>{1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 41,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 85,
86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103,
104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
146, 147, 149, 150, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
191, 192}</bitmap>
error unpacking field 2 consumed=52
<iso-exception>
org.jpos.iso.IFA_LLNUM: Problem unpacking field 2
<nested-exception>
java.lang.NegativeArraySizeException
at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:50)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:182)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:238)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:28)
</nested-exception>
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking field 2 (java.lang.NegativeArraySizeException)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:187)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:238)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:28)
Nested:java.lang.NegativeArraySizeException
at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:50)
at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:182)
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:238)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:28)
</iso-exception>
<iso-exception>
org.jpos.iso.IFA_LLNUM: Problem unpacking field 2 (java.lang.NegativeArraySizeException) unpacking field=2, consumed=52
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem
unpacking field 2 (java.lang.NegativeArraySizeException) unpacking
field=2, consumed=52
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:268)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at co.id.jtg.dispenduk.test.TestMsg.main(TestMsg.java:28)
</iso-exception>
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAO1jB8s0ypUxXK40MSw_-Zb6W%2BsFgeyCCQdhKNJ_xfaUpK_DHw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CALB6eUu%3Dzb5uEJ7wB%2BGjwgvm2uc5xOdQeEavqfP%2BOFLYv3DSRQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAO1jB8sDschGjuKabV-h%2BdcvK-hh_0%3DycpeVV3waOZQ93S01uw%40mail.gmail.com.
0200623A400108C180000605350138000009011209450656381209450901090260120300800000006563815007110200900100800000012534316522301360"
;--
--
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/55FBBA01.7060307%40talktalk.net.
For more options, visit https://groups.google.com/d/optout.