0
我試圖做一個iso8583 pakage與j8583庫替換和我們運行的舊iso8583程序(我沒有源代碼)。數據包的生成與舊軟件生成的數據包不同。注意舊包裝中的「f」。包iso8583消息
代碼
messageFactory.setAssignDate(false);
messageFactory.setUseBinaryMessages(true);
IsoMessage isoMessage = messageFactory.newMessage(0x1804);
isoMessage.setBinary(true);
isoMessage.setBinaryBitmap(true);
isoMessage.setValue(3, "000000", IsoType.NUMERIC, 6);
isoMessage.setValue(11, "000001", IsoType.NUMERIC, 6);
isoMessage.setValue(12, "151021095555", IsoType.NUMERIC, 12);
isoMessage.setValue(24, "831", IsoType.NUMERIC, 3);
isoMessage.setValue(25, "8700", IsoType.NUMERIC, 4);
isoMessage.write(outputStream, 2);
老包
0x0000: 0a13 ad7c d6d0 0a2f 6a3b 8f1e 0800 4500 ...|.../j;....E.
0x0010: 0055 73ae 4000 4006 41de 0a00 0888 94ab [email protected]@.A.......
0x0020: dde3 b88b 540c c290 a52c 976a 3432 5018 ....T....,.j42P.
0x0030: 01c9 855e 0000 002d f1f8 f0f4 2030 0180 ...^...-.....0..
0x0040: 0000 0000 f0f0 f0f0 f0f0 f1f5 f3f0 f2f9 ................
0x0050: f1f5 f1f0 f2f0 f2f1 f1f1 f3f1 f8f3 f1f8 ................
0x0060: f7f0 f0
新包
0x0000: 0a13 ad7c d6d0 0a2f 6a3b 8f1e 0800 4500 ...|.../j;....E.
0x0010: 0042 39a7 4000 4006 7bf8 0a00 0888 94ab [email protected]@.{.......
0x0020: dde3 bcce 540c b124 15aa 1a6e e56b 5018 ....T..$...n.kP.
0x0030: 01c9 854b 0000 1804 2030 0180 0000 0000 ...K.....0......
0x0040: 0000 0000 0001 1510 2109 5555 0831 8700 ........!.UU.1..
我想你錯過了一些'setXXX()'調用使工廠使用正確的設置。 –