<channel-adaptor name='jpos-channel' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel" packager="org.jpos.iso.packager.GenericPackager" header="60000000001987000101">
<property name="packager-config" value="cfg/packager/iso87binarypaycraft.xml" />
<property name="host" value="XXX.XXX.XXX.XXX" />
<property name="port" value="XXXX" />
<property name="connection-timeout" value="15000" />
<property name="timeout" value="300000"/>
<property name="keep-alive" value="true" />
</channel>
<in>jpos-send</in>
<out>jpos-receive</out>
</channel-adaptor>

0000 01 1e 30 31 30 30 f2 3c 65 01 88 e1 80 0c 00 00 ..0100ò<e..á....
0010 00 00 00 00 00 02 31 35 37 30 31 31 34 30 30 30 ......1570114000
0020 30 30 30 31 31 31 31 30 30 30 30 30 30 30 30 30 0001111000000000
0030 30 30 30 30 30 30 30 37 30 30 36 32 36 31 35 30 0000000700626150
0040 33 30 30 30 30 30 30 30 31 31 31 30 32 35 39 30 3000000011102590
0050 36 32 36 31 31 31 31 35 34 31 31 38 34 30 30 32 6261111541184002
0060 32 31 30 30 30 36 30 30 30 30 30 30 30 36 30 30 2100060000000600
0070 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 0000000000000001
0080 32 39 34 31 30 30 35 31 36 30 31 31 30 31 36 35 2941005160110165
0090 32 30 30 30 39 39 31 57 61 6c 2d 4d 61 72 74 20 2000991Wal-Mart
00a0 53 75 70 65 72 20 43 65 6e 74 65 72 20 20 41 4c Super Center AL
00b0 50 48 41 52 45 54 54 41 20 20 20 20 47 41 20 30 PHARETTA GA 0
00c0 32 35 57 41 4c 31 20 20 20 20 20 20 35 37 33 31 25WAL1 5731
00d0 35 32 36 30 35 38 30 37 36 31 34 38 34 30 30 31 5260580761484001
00e0 33 30 31 30 30 30 30 30 30 30 30 37 30 30 30 33 3010000000070003
00f0 39 37 30 32 20 53 57 20 38 74 68 20 53 74 72 65 9702 SW 8th Stre
0100 65 74 20 20 20 20 20 33 30 30 30 34 30 30 30 30 et 300040000
0110 30 30 30 30 32 39 34 31 30 30 35 30 33 31 33 31 0000294100503131
--
--
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+...@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/0e194d06-a936-4598-ad4e-ad973eec953d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
package sample;
import org.jpos.iso.ISOException;
import org.jpos.iso.ISOMsg;
import org.jpos.iso.ISOUtil;
import org.jpos.iso.packager.GenericPackager;
import org.jpos.util.Logger;
import org.jpos.util.SimpleLogListener;
public class UnpackISOMessagePostPack {
public static void main(String[] args) {
// Spotted a 0810 response and excluded the other tcp low level headers
// from the data you provided.
String message = "081020380000028000029800000000961221380905303031303030303130370061005937316493f2a48e365938b5dbc8a667235f3e366d0605b7f54a3c1f03e205707b331f757d4a967a76d9842c3f9a284b65526e303c174496d92e30ed";
Logger l = new Logger();
l.addListener(new SimpleLogListener());
ISOMsg m = new ISOMsg();
GenericPackager p;
try {
p = new GenericPackager("C:\\temp\\iso87binary.xml");
m.setPackager(p);
p.setLogger(l, "blah");
System.out.println(ISOUtil.hexdump(ISOUtil.str2bcd(message, true)));
m.unpack(ISOUtil.str2bcd(message, true)); // Need to do this based
// on the wireshark data
// you have provided.
m.dump(System.out, "");
System.out.println(ISOUtil.hexdump(m.pack()));
}
catch (ISOException e) {
e.printStackTrace();
m.dump(System.out, "");
}
}
}
0000 08 10 20 38 00 00 02 80 00 02 98 00 00 00 00 96 .. 8............
0010 12 21 38 09 05 30 30 31 30 30 30 30 31 30 37 00 .!8..0010000107.
0020 61 00 59 37 31 64 93 62 14 B5 36 59 38 25 72 38 a.Y71d.b..6Y8%r8
0030 16 67 23 76 35 36 74 06 05 27 65 71 33 36 03 52 .g#v56t..'eq36.R
0040 05 70 72 33 36 75 74 71 96 71 76 49 84 33 36 B1 .pr36utq.qvI.36.
0050 28 72 65 52 75 30 33 17 44 96 49 35 30 74 (reRu03.D.I50t
<log realm="blah" at="2018-09-06T09:52:58.304" lifespan="1ms">
<unpack>
0810203800000280000298000000009612213809053030313030303031303700610059373164936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074
<bitmap>{3, 11, 12, 13, 39, 41, 63}</bitmap>
<unpack fld="3" packager="org.jpos.iso.IFB_NUMERIC">
<value>980000</value>
</unpack>
<unpack fld="11" packager="org.jpos.iso.IFB_NUMERIC">
<value>000096</value>
</unpack>
<unpack fld="12" packager="org.jpos.iso.IFB_NUMERIC">
<value>122138</value>
</unpack>
<unpack fld="13" packager="org.jpos.iso.IFB_NUMERIC">
<value>0905</value>
</unpack>
<unpack fld="39" packager="org.jpos.iso.IF_CHAR">
<value>00</value>
</unpack>
<unpack fld="41" packager="org.jpos.iso.IF_CHAR">
<value>10000107</value>
</unpack>
<unpack fld="63" packager="org.jpos.iso.IFB_LLLBINARY">
<value type='binary'>0059373164936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074</value>
</unpack>
</unpack>
</log>
<isomsg>
<!-- org.jpos.iso.packager.GenericPackager[C:\SourceRepo\OII\Incomm\build\cfg\iso87binary.xml] -->
<field id="0" value="0810"/>
<field id="3" value="980000"/>
<field id="11" value="000096"/>
<field id="12" value="122138"/>
<field id="13" value="0905"/>
<field id="39" value="00"/>
<field id="41" value="10000107"/>
<field id="63" value="0059373164936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074" type="binary"/>
</isomsg>
<log realm="blah" at="2018-09-06T09:52:58.402" lifespan="1ms">
<pack>
0810203800000280000298000000009612213809053030313030303031303700610059373164936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074
</pack>
</log>
0000 08 10 20 38 00 00 02 80 00 02 98 00 00 00 00 96 .. 8............
0010 12 21 38 09 05 30 30 31 30 30 30 30 31 30 37 00 .!8..0010000107.
0020 61 00 59 37 31 64 93 62 14 B5 36 59 38 25 72 38 a.Y71d.b..6Y8%r8
0030 16 67 23 76 35 36 74 06 05 27 65 71 33 36 03 52 .g#v56t..'eq36.R
0040 05 70 72 33 36 75 74 71 96 71 76 49 84 33 36 B1 .pr36utq.qvI.36.
0050 28 72 65 52 75 30 33 17 44 96 49 35 30 74 (reRu03.D.I50t
<isofield
id="63"
length="999"
name="RESERVED PRIVATE"
class="org.jpos.iso.IFB_LLLBINARY"/>
0000 00 99 60 00 00 00 00 19 87 00 01 01 08 00 20 20 ..`...........
0010 00 00 00 e0 00 02 98 00 00 00 00 96 31 30 30 30 ...à........1000
0020 30 31 30 37 31 30 30 30 30 30 30 31 30 30 30 30 0107100000010000
0030 30 30 31 20 20 20 53 55 52 41 54 20 53 49 54 49 001 SURAT SITI
0040 4c 49 4e 4b 20 4c 74 64 2e 20 20 20 20 20 20 20 LINK Ltd.
0050 20 53 75 72 61 74 20 47 4a 49 4e 00 62 30 30 31 Surat GJIN.b001
0060 35 33 30 33 34 30 30 31 30 31 30 33 30 33 36 33 5303400101030363
0070 30 33 30 33 30 33 30 33 31 33 32 33 33 33 34 30 0303030313233340
0080 30 31 32 33 34 33 30 33 30 33 36 33 30 33 30 33 0123430303630303
0090 30 33 30 33 31 33 31 33 39 33 37 03031313937
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5dd9772f-0e26-4b74-aadb-3e0157fd637b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/2c2791a1-043c-4970-add6-5d912ff9c3f1%40googlegroups.com.
I have the same problem as you,
can you please tell me how you have parse the subfield of data element 63,,
It will be very helpful if you share the snippets of XML.
Thank you.
public static void unpack() {
//hex = iso.get(63);
String hex = "0059373164936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074";
int len = Integer.parseInt(hex.substring(0, 4)) * 2;
System.out.println("length :" + len
+ "( its x 2 as data is in hex, each is represented by 2 characters in the string");
String hexdata = hex.substring(4, 4 + len);// exclude the 0059 and get
// the remainder data
System.out.println("hexData :" + hexdata);
// Dataset id 3731 is ascii hex representation of 71
String datasetID = new String(ISOUtil.hex2byte(hexdata.substring(0, 4)));
System.out.println("datasetID :" + datasetID);
String dataForDatasetID = hexdata.substring(4);
System.out.println("dataForDatasetID :" + dataForDatasetID);
}
length :118( its x 2 as data is in hex, each is represented by 2 characters in the string
hexData :373164936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074
datasetID :71
dataForDatasetID :64936214B536593825723816672376353674060527657133360352057072333675747196717649843336B12872655275303317449649353074