Error at Postilion at field 2

538 views
Skip to first unread message

Gaurav Kumar

unread,
Dec 19, 2016, 4:59:57 AM12/19/16
to jPOS Users
Dear All,

My fields.xml is as below.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE isopackager SYSTEM "genericpackager.dtd"><isopackager>
<isofield id="0" length="4" name="MESSAGE TYPE INDICATOR" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="1" length="32" name="BIT MAP" class="org.jpos.iso.IFA_BITMAP"/>
<isofield id="2" length="19" name="SECRET ID" class="org.jpos.iso.IFA_LLNUM"/>
<isofield id="3" length="6" name="PROCESSING CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="4" length="12" name="AMOUNT, TRANSACTION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="5" length="12" name="AMOUNT, SETTLEMENT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="6" length="12" name="AMOUNT, CARDHOLDER BILLING" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="7" length="10" name="TRANSMISSION DATE AND TIME" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="8" length="8" name="AMOUNT, CARDHOLDER BILLING FEE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="9" length="8" name="CONVERSION RATE, SETTLEMENT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="10" length="8" name="CONVERSION RATE, CARDHOLDER BILLING" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="11" length="6" name="SYSTEM TRACE AUDIT NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="12" length="6" name="TIME, LOCAL TRANSACTION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="13" length="4" name="DATE, LOCAL TRANSACTION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="14" length="4" name="DATE, EXPIRATION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="15" length="4" name="DATE, SETTLEMENT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="16" length="4" name="DATE, CONVERSION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="17" length="4" name="DATE, CAPTURE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="18" length="4" name="MERCHANTS TYPE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="19" length="3" name="ACQUIRING INSTITUTION COUNTRY CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="20" length="3" name="PAN EXTENDED COUNTRY CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="21" length="3" name="FORWARDING INSTITUTION COUNTRY CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="22" length="3" name="POINT OF SERVICE ENTRY MODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="23" length="3" name="CARD SEQUENCE NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="24" length="3" name="NETWORK INTERNATIONAL IDENTIFIEER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="25" length="2" name="POINT OF SERVICE CONDITION CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="26" length="2" name="POINT OF SERVICE PIN CAPTURE CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="27" length="1" name="AUTHORIZATION IDENTIFICATION RESP LEN" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="28" length="9" name="AMOUNT, TRANSACTION FEE" class="org.jpos.iso.IFA_AMOUNT"/>
<isofield id="29" length="9" name="AMOUNT, SETTLEMENT FEE" class="org.jpos.iso.IFA_AMOUNT"/>
<isofield id="30" length="9" name="AMOUNT, TRANSACTION PROCESSING FEE" class="org.jpos.iso.IFA_AMOUNT"/>
<isofield id="31" length="9" name="AMOUNT, SETTLEMENT PROCESSING FEE" class="org.jpos.iso.IFA_AMOUNT"/>
<isofield id="32" length="11" name="ACQUIRING INSTITUTION IDENT CODE" class="org.jpos.iso.IFA_LLNUM"/>
<isofield id="33" length="11" name="FORWARDING INSTITUTION IDENT CODE" class="org.jpos.iso.IFA_LLNUM"/>
<isofield id="34" length="28" name="PAN EXTENDED" class="org.jpos.iso.IFA_LLCHAR"/>
<isofield id="35" length="37" name="TRACK 2 DATA" class="org.jpos.iso.IFA_LLNUM"/>
<isofield id="36" length="303" name="TRACK 3 DATA" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="37" length="12" name="RETRIEVAL REFERENCE NUMBER" class="org.jpos.iso.IF_CHAR"/>
<isofield id="38" length="6" name="AUTHORIZATION IDENTIFICATION RESPONSE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="39" length="2" name="RESPONSE CODE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="40" length="3" name="SERVICE RESTRICTION CODE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="41" length="8" name="CARD ACCEPTOR TERMINAL IDENTIFICACION" class="org.jpos.iso.IF_CHAR"/>
<isofield id="42" length="15" name="CARD ACCEPTOR IDENTIFICATION CODE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="43" length="40" name="CARD ACCEPTOR NAME/LOCATION" class="org.jpos.iso.IF_CHAR"/>
<isofield id="44" length="43" name="ADITIONAL RESPONSE DATA" class="org.jpos.iso.IFA_LLCHAR"/>
<isofield id="45" length="76" name="TRACK 1 DATA" class="org.jpos.iso.IFA_LLCHAR"/>
<isofield id="46" length="999" name="ADITIONAL DATA - ISO" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="47" length="999" name="ADITIONAL DATA - NATIONAL" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="48" length="999" name="ADITIONAL DATA - PRIVATE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="49" length="3" name="CURRENCY CODE, TRANSACTION" class="org.jpos.iso.IF_CHAR"/>
<isofield id="50" length="3" name="CURRENCY CODE, SETTLEMENT" class="org.jpos.iso.IF_CHAR"/>
<isofield id="51" length="3" name="CURRENCY CODE, CARDHOLDER BILLING" class="org.jpos.iso.IF_CHAR"/>
<isofield id="52" length="16" name="PIN DATA" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="53" length="16" name="SECURITY RELATED CONTROL INFORMATION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="54" length="120" name="ADDITIONAL AMOUNTS" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="55" length="999" name="RESERVED ISO" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="56" length="999" name="RESERVED ISO" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="57" length="999" name="RESERVED NATIONAL" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="58" length="999" name="RESERVED NATIONAL" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="59" length="999" name="RESERVED NATIONAL" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="60" length="999" name="RESERVED PRIVATE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="61" length="999" name="RESERVED PRIVATE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="62" length="999" name="RESERVED PRIVATE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="63" length="999" name="RESERVED PRIVATE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="64" length="8" name="MESSAGE AUTHENTICATION CODE FIELD" class="org.jpos.iso.IFA_BINARY"/>
<isofield id="65" length="1" name="BITMAP, EXTENDED" class="org.jpos.iso.IFA_BINARY"/>
<isofield id="66" length="1" name="SETTLEMENT CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="67" length="2" name="EXTENDED PAYMENT CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="68" length="3" name="RECEIVING INSTITUTION COUNTRY CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="69" length="3" name="SETTLEMENT INSTITUTION COUNTRY CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="70" length="3" name="NETWORK MANAGEMENT INFORMATION CODE" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="71" length="4" name="MESSAGE NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="72" length="4" name="MESSAGE NUMBER LAST" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="73" length="6" name="DATE ACTION" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="74" length="10" name="CREDITS NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="75" length="10" name="CREDITS REVERSAL NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="76" length="10" name="DEBITS NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="77" length="10" name="DEBITS REVERSAL NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="78" length="10" name="TRANSFER NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="79" length="10" name="TRANSFER REVERSAL NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="80" length="10" name="INQUIRIES NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="81" length="10" name="AUTHORIZATION NUMBER" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="82" length="12" name="CREDITS, PROCESSING FEE AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="83" length="12" name="CREDITS, TRANSACTION FEE AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="84" length="12" name="DEBITS, PROCESSING FEE AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="85" length="12" name="DEBITS, TRANSACTION FEE AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="86" length="16" name="CREDITS, AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="87" length="16" name="CREDITS, REVERSAL AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="88" length="16" name="DEBITS, AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="89" length="16" name="DEBITS, REVERSAL AMOUNT" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="90" length="42" name="ORIGINAL DATA ELEMENTS" class="org.jpos.iso.IFA_NUMERIC"/>
<isofield id="91" length="1" name="FILE UPDATE CODE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="92" length="2" name="FILE SECURITY CODE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="93" length="6" name="RESPONSE INDICATOR" class="org.jpos.iso.IF_CHAR"/>
<isofield id="94" length="7" name="SERVICE INDICATOR" class="org.jpos.iso.IF_CHAR"/>
<isofield id="95" length="42" name="REPLACEMENT AMOUNTS" class="org.jpos.iso.IF_CHAR"/>
<isofield id="96" length="16" name="MESSAGE SECURITY CODE" class="org.jpos.iso.IFA_BINARY"/>
<isofield id="97" length="17" name="AMOUNT, NET SETTLEMENT" class="org.jpos.iso.IFA_AMOUNT"/>
<isofield id="98" length="25" name="PAYEE" class="org.jpos.iso.IF_CHAR"/>
<isofield id="99" length="11" name="SETTLEMENT INSTITUTION IDENT CODE" class="org.jpos.iso.IFA_LLNUM"/>
<isofield id="100" length="11" name="RECEIVING INSTITUTION IDENT CODE" class="org.jpos.iso.IFA_LLNUM"/>
<isofield id="101" length="17" name="FILE NAME" class="org.jpos.iso.IFA_LLCHAR"/>
<isofield id="102" length="28" name="FROM ACCOUNT" class="org.jpos.iso.IFA_LLCHAR"/>
<isofield id="103" length="10" name="ACCOUNT IDENTIFICATION 2" class="org.jpos.iso.IFA_LLCHAR"/>
<isofield id="104" length="100" name="TRANSACTION DESCRIPTION" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="105" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="106" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="107" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="108" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="109" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="110" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="111" length="999" name="RESERVED ISO USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="112" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="113" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="114" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="115" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="116" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="117" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="118" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="119" length="999" name="RESERVED NATIONAL USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="120" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="121" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="122" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="123" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="124" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="125" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="126" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="127" length="999" name="RESERVED PRIVATE USE" class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield id="128" length="8" name="MAC 2" class="org.jpos.iso.IFA_BINARY"/>
</isopackager>

 But when I send message to Postilion it give error at field 2 as :
A bitmap message (postilion.realtime.postbridge.Iso8583PBLegacy) could not be unpacked, because of an error while unpacking field number 2 (LLVAR n ..19) at offset 12. When the error occurred, the bitmap looked like this: 0200.
It looks like error because of data type mismatch but when I change my data type field to LLVAR as expected at postilion it gives me error while packing at my system that this data type does not exist. 
Shall I use some other jar file? Please help.

chhil

unread,
Dec 19, 2016, 5:09:17 AM12/19/16
to jpos-...@googlegroups.com
Try using postpack.xml. 

Your bitmap definition seems to be incorrect, probably  causing the unpack error in the first field (field 2) it encounters. 

Search the group,  there are various references to postilion packagers and some variations that are needed to work with a postilion system. 

-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/c1122209-ed2d-41a3-b028-99d9e44b5b2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gaurav Kumar

unread,
Dec 19, 2016, 5:45:03 AM12/19/16
to jPOS Users
Dear Chhil,

Thanks for ur help as always. Sorry I posted field.xml from m local which has field length 32. On my test env. it is 16 and it is giving error. So please suggest accordingly.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.

chhil

unread,
Dec 19, 2016, 5:55:21 AM12/19/16
to jPOS Users

Make sure you are using the NACChannel and the correct packager. If your field 2 is throwing an exception it just points to one thing, your bitmap
packager is wrong.
Did you try using the postpack.xml? It uses 16 and binary, unlike yours.
If you still can't solve it, provide a hexdump of the message.

-chhil

Gaurav Kumar

unread,
Dec 19, 2016, 9:18:47 AM12/19/16
to jPOS Users
Dear Chhil,

HexDump is :


0000  02 19 30 32 30 30 46 32  33 43 34 36 44 31 32 39  ..0200F23C46D129
0010  45 30 39 32 30 30 30 30  30 30 30 30 30 30 35 32  E092000000000052
0020  30 30 30 30 32 30 31 39  35 30 36 31 30 37 31 35  0000201950610715
0030  32 32 33 30 30 30 30 30  30 34 33 34 30 31 30 31  2230000004340101
0040  30 30 30 30 30 30 30 30  31 30 30 30 30 30 39 30  0000000010000090
0050  34 30 38 30 34 31 34 30  30 30 30 30 31 30 38 30  4080414000001080
0060  34 31 34 30 39 30 34 32  31 30 32 36 30 31 31 30  4140904210260110
0070  35 31 30 30 31 30 30 31  32 44 30 30 30 30 30 30  510010012D000000
0080  30 30 30 36 35 30 36 31  30 37 33 36 35 30 36 31  0006506107365061
0090  30 37 31 35 32 32 33 30  30 30 30 30 30 34 33 44  071522300000043D
00a0  32 31 30 32 36 30 31 30  31 33 35 34 34 34 33 33  2102601013544433
00b0  31 31 31 31 39 36 30 30  30 30 30 31 36 30 31 31  1111960000016011
00c0  31 31 31 39 36 32 37 45  42 4E 30 30 30 30 30 30  1119627EBN000000
00d0  30 30 35 32 33 31 45 4E  47 20 52 56 20 52 55 4D  005231ENG RV RUM
00e0  55 4F 4B 4F 52 4F 20 20  20 20 20 20 20 52 56 20  UOKORO       RV 
00f0  20 20 20 20 20 20 20 20  20 20 52 56 4E 47 35 36            RVNG56
0100  36 31 45 36 38 45 44 43  31 46 30 34 45 38 43 35  61E68EDC1F04E8C5
0110  42 32 30 30 39 46 32 36  30 38 38 36 42 45 32 44  B2009F260886BE2D
0120  31 33 41 44 46 31 43 30  33 35 39 46 32 37 30 31  13ADF1C0359F2701
0130  34 30 39 46 31 30 32 30  30 46 41 35 30 31 36 32  409F10200FA50162
0140  30 32 30 30 31 34 30 30  30 30 30 30 30 30 30 30  0200140000000000
0150  30 30 30 30 30 30 30 30  30 46 30 31 41 41 41 41  000000000F01AAAA
0160  41 41 41 41 41 41 41 41  41 41 41 41 41 41 41 41  AAAAAAAAAAAAAAAA
0170  41 41 41 41 41 41 41 41  39 46 33 37 30 34 42 37  AAAAAAAA9F3704B7
0180  31 34 38 37 33 45 39 46  33 36 30 32 30 31 43 37  14873E9F360201C7
0190  39 35 30 35 34 32 38 30  32 34 31 30 30 30 39 41  950542802410009A
01a0  30 33 31 36 31 32 31 36  39 43 30 31 30 30 39 46  031612169C01009F
01b0  30 32 30 36 30 30 30 30  30 30 30 30 30 30 31 35  0206000000000015
01c0  35 46 32 41 30 32 30 39  34 39 38 32 30 32 35 38  5F2A020949820258
01d0  30 30 39 46 31 41 30 32  30 37 39 32 39 30 33 37  009F1A0207929037
01e0  30 38 30 33 37 30 38 30  33 37 30 38 30 33 37 30  0803708037080370
01f0  38 34 31 34 37 30 36 39  30 33 37 30 38 31 30 35  8414706903708105
0200  32 35 31 30 33 36 35 31  33 30 31 35 35 31 31 32  2510365130155112
0210  30 31 35 31 33 33 34 34  30 30 32                 01513344002

chhil

unread,
Dec 19, 2016, 9:39:00 AM12/19/16
to jpos-...@googlegroups.com

Your field 2 is set to have max of 19, but its received as 29. Please adjust your packager to what is expected.
For the time being if you are not sure change it to 99. And get to the next error to figure out why the packager is complaining.

Code used 
import java.io.IOException;

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 Test {

    public static void main(String[] args) throws ISOException, IOException {

// removed the 02 19 , as thats the 2 byute length header.
        String message = "303230304632334334364431323945303932303030303030303030303532303030303230313935303631303731353232333030303030303433343031303130303030303030303130303030303930343038303431343030303030313038303431343039303432313032363031313035313030313030313244303030303030303030363530363130373336353036313037313532323330303030303034334432313032363031303133353434343333313131313936303030303031363031313131313936323745424E303030303030303035323331454E472052562052554D554F4B4F524F202020202020205256202020202020202020202052564E47353636314536384544433146303445384335423230303946323630383836424532443133414446314330333539463237303134303946313032303046413530313632303230303134303030303030303030303030303030303030304630314141414141414141414141414141414141414141414141414141414139463337303442373134383733453946333630323031433739353035343238303234313030303941303331363132313639433031303039463032303630303030303030303030313535463241303230393439383230323538303039463141303230373932393033373038303337303830333730383033373038343134373036393033373038313035323531303336353133303135353131323031353133333434303032";
        Logger l = new Logger();
        l.addListener(new SimpleLogListener());
        ISOMsg m = new ISOMsg();
        GenericPackager p;
        try {
            p = new GenericPackager(".\\cfg\\postpack.xml");
            m.setPackager(p);
            p.setLogger(l, "");
            m.unpack(ISOUtil.hex2byte(message));
            m.dump(System.out, "");

        }
        catch (ISOException e) {

            e.printStackTrace();
            m.dump(System.out, "");
        }

    }

}
Output
<isomsg direction="none">
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking field 32 (org.jpos.iso.ISOException: Field length 26 too long. Max: 11) unpacking field=32, consumed=104
  <!-- org.jpos.iso.packager.GenericPackager[.\cfg\postpack.xml] -->
    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:284)
    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:460)
    at Test.main(Test.java:31)
  <field id="0" value="0200"/>
  <field id="bitmap" value="{2, 6, 7, 11, 12, 15, 19, 20, 23, 24, 26, 31, 32, 35, 36, 38, 43, 44, 46, 47, 50, 54, 59, 60, 64}" type="bitmap"/>
  <field id="2" value="E0920000000000520000201950610"/>
  <field id="6" value="715223000000"/>
  <field id="7" value="4340101000"/>
  <field id="11" value="000001"/>
  <field id="12" value="000009"/>
  <field id="15" value="0408"/>
  <field id="19" value="041"/>
  <field id="20" value="400"/>
  <field id="23" value="000"/>
  <field id="24" value="108"/>
  <field id="26" value="04"/>
  <field id="31" value="140904210"/>
</isomsg>

Best of luck with aligning your spec with your packager.
-chhil



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.

Alejandro Revilla

unread,
Dec 19, 2016, 6:00:17 PM12/19/16
to jPOS Users
Weird message, huge pan, track2, acquirer ID, etc. coming from world of giants?

(looks like some custom encryption there)



Gaurav Kumar

unread,
Dec 19, 2016, 6:13:23 PM12/19/16
to jPOS Users
Dear Chhil,

If I use fields.xml as described above I get following :

<isomsg>
  <!-- org.jpos.iso.packager.GenericPackager[/home/apache-tomcat-7.0.72/webapps/CanFI/WEB-INF/classes/fields.xml] -->
  <field id="0" value="0200"/>
  <field id="2" value="5061071522300000043"/>
  <field id="3" value="401010"/>
  <field id="4" value="000000010000"/>
  <field id="7" value="0904080414"/>
  <field id="11" value="000001"/>
  <field id="12" value="080414"/>
  <field id="13" value="0904"/>
  <field id="14" value="2102"/>
  <field id="18" value="6011"/>
  <field id="22" value="051"/>
  <field id="23" value="001"/>
  <field id="25" value="00"/>
  <field id="26" value="12"/>
  <field id="28" value="D00000000"/>
  <field id="32" value="506107"/>
  <field id="35" value="5061071522300000043D2102601013544433"/>
  <field id="37" value="111196000001"/>
  <field id="40" value="601"/>
  <field id="41" value="11119627"/>
  <field id="42" value="EBN000000005231"/>
  <field id="43" value="ENG RV RUMUOKORO       RV           RVNG"/>
  <field id="49" value="566"/>
  <field id="52" value="1E68EDC1F04E8C5B"/>
  <field id="55" value="9F260886BE2D13ADF1C0359F2701409F10200FA501620200140000000000000000000F01AAAAAAAAAAAAAAAAAAAAAAAAAAAA9F3704B714873E9F360201C7950542802410009A031612169C01009F02060000000000155F2A020949820258009F1A020792"/>
  <field id="98" value="9037080370803708037084147"/>
  <field id="100" value="903708"/>
  <field id="103" value="5251036513"/>
  <field id="123" value="511201513344002"/>
</isomsg>
Which is correct. It is same as what POS is sending to my system. But when I forward it to Postilion I get error.

chhil

unread,
Dec 19, 2016, 11:12:37 PM12/19/16
to jpos-...@googlegroups.com
I have no idea what you are doing when you forwards the received message. Whatever you are doing, you are mangling the message. 

If I take your xml of message received from POS and set the postpack.xml packager and pack the message, its packs it correctly. the hexdump looks right unlike what you have provided. You can try unpacking it and you will see it unpacks fine too. You need to look into your code and see how you are translating it from pos to Postilion.


import java.io.IOException;

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 Test {

    public static void main(String[] args) throws ISOException, IOException 
{

        // String message =
        // "303230307F32334334364431323945303932303030303030303030303532303030303230313935303631303731353232333030303030303433343031303130303030303030303130303030303930343038303431343030303030313038303431343039303432313032363031313035313030313030313244303030303030303030363530363130373336353036313037313532323330303030303034334432313032363031303133353434343333313131313936303030303031363031313131313936323745424E303030303030303035323331454E472052562052554D554F4B4F524F202020202020205256202020202020202020202052564E47353636314536384544433146303445384335423230303946323630383836424532443133414446314330333539463237303134303946313032303046413530313632303230303134303030303030303030303030303030303030304630314141414141414141414141414141414141414141414141414141414139463337303442373134383733453946333630323031433739353035343238303234313030303941303331363132313639433031303039463032303630303030303030303030313535463241303230393439383230323538303039463141303230373932393033373038303337303830333730383033373038343134373036393033373038313035323531303336353133303135353131323031353133333434303032";

        Logger l = new Logger();
        l.addListener(new
 SimpleLogListener());
        ISOMsg messageFromPOS = new ISOMsg();

        messageFromPOS.set("0", "0200");
        messageFromPOS.set("2", "5061071522300000043");
        messageFromPOS.set("3", "401010");
        messageFromPOS.set("4", "000000010000");
        messageFromPOS.set("7", "0904080414");
        messageFromPOS.set("11", "000001");
        messageFromPOS.set("12", "080414");
        messageFromPOS.set("13", "0904");
        messageFromPOS.set("14", "2102");
        messageFromPOS.set("18", "6011");
        messageFromPOS.set("22", "051");
        messageFromPOS.set("23", "001");
        messageFromPOS.set("25", "00");
        messageFromPOS.set("26", "12");
        messageFromPOS.set("28", "D00000000");
        messageFromPOS.set("32", "506107");
        messageFromPOS.set("35", "5061071522300000043D2102601013544433");
        messageFromPOS.set("37", "111196000001");
        messageFromPOS.set("40", "601");
        messageFromPOS.set("41", "11119627");
        messageFromPOS.set("42", "EBN000000005231");
        messageFromPOS.set("43", "ENG RV RUMUOKORO       RV           RVNG");
        messageFromPOS.set("49", "566");
        messageFromPOS.set("52", ISOUtil.hex2byte("1E68EDC1F04E8C5B"));
        messageFromPOS.set("55",
                "9F260886BE2D13ADF1C0359F2701409F10200FA501620200140000000000000000000F01AAAAAAAAAAAAAAAAAAAAAAAAAAAA9F3704B714873E9F360201C7950542802410009A031612169C01009F02060000000000155F2A020949820258009F1A020792");
        messageFromPOS.set("98", "9037080370803708037084147");
        messageFromPOS.set("100", "903708");
        messageFromPOS.set("103", "5251036513");
        messageFromPOS.set("123", "511201513344002");
        GenericPackager p;
        try {
            p = new GenericPackager("C:\\SourceRepo\\OII\\Incomm\\build\\cfg\\postpack.xml");
            messageFromPOS.setPackager(p); // set the postilion packager
            p.setLogger(l, "");
            byte b[] = messageFromPOS.pack();
            System.out.println(ISOUtil.hexdump(b)); // this is the message that
                                                    // would get sent to
                                                    // Postilion.

        }
        catch (ISOException e) {

            e.printStackTrace();

        }

    }

}
Output hexdump
​​
0000
​​
30 32 30 30 F2 3C 46 D1 29 E0 92 00 00 00 00 00 0200.<F.)....... 0010 52 00 00 20 31 39 35 30 36 31 30 37 31 35 32 32 R.. 195061071522 0020 33 30 30 30 30 30 30 34 33 34 30 31 30 31 30 30 3000000434010100 0030 30 30 30 30 30 30 31 30 30 30 30 30 39 30 34 30 0000001000009040 0040 38 30 34 31 34 30 30 30 30 30 31 30 38 30 34 31 8041400000108041 0050 34 30 39 30 34 32 31 30 32 36 30 31 31 30 35 31 4090421026011051 0060 30 30 31 30 30 31 32 44 30 30 30 30 30 30 30 30 0010012D00000000 0070 30 36 35 30 36 31 30 37 33 36 35 30 36 31 30 37 0650610736506107 0080 31 35 32 32 33 30 30 30 30 30 30 34 33 44 32 31 1522300000043D21 0090 30 32 36 30 31 30 31 33 35 34 34 34 33 33 31 31 0260101354443311 00a0 31 31 39 36 30 30 30 30 30 31 36 30 31 31 31 31 1196000001601111 00b0 31 39 36 32 37 45 42 4E 30 30 30 30 30 30 30 30 19627EBN00000000 00c0 35 32 33 31 45 4E 47 20 52 56 20 52 55 4D 55 4F 5231ENG RV RUMUO 00d0 4B 4F 52 4F 20 20 20 20 20 20 20 52 56 20 20 20 KORO RV 00e0 20 20 20 20 20 20 20 20 52 56 4E 47 35 36 36 1E RVNG566. 00f0 68 ED C1 F0 4E 8C 5B 32 30 30 39 46 32 36 30 38 h...N.[2009F2608 0100 38 36 42 45 32 44 31 33 41 44 46 31 43 30 33 35 86BE2D13ADF1C035 0110 39 46 32 37 30 31 34 30 39 46 31 30 32 30 30 46 9F2701409F10200F 0120 41 35 30 31 36 32 30 32 30 30 31 34 30 30 30 30 A501620200140000 0130 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 46 000000000000000F 0140 30 31 41 41 41 41 41 41 41 41 41 41 41 41 41 41 01AAAAAAAAAAAAAA 0150 41 41 41 41 41 41 41 41 41 41 41 41 41 41 39 46 AAAAAAAAAAAAAA9F 0160 33 37 30 34 42 37 31 34 38 37 33 45 39 46 33 36 3704B714873E9F36 0170 30 32 30 31 43 37 39 35 30 35 34 32 38 30 32 34 0201C79505428024 0180 31 30 30 30 39 41 30 33 31 36 31 32 31 36 39 43 10009A031612169C 0190 30 31 30 30 39 46 30 32 30 36 30 30 30 30 30 30 01009F0206000000 01a0 30 30 30 30 31 35 35 46 32 41 30 32 30 39 34 39 0000155F2A020949 01b0 38 32 30 32 35 38 30 30 39 46 31 41 30 32 30 37 820258009F1A0207 01c0 39 32 39 30 33 37 30 38 30 33 37 30 38 30 33 37 9290370803708037 01d0 30 38 30 33 37 30 38 34 31 34 37 30 36 39 30 33 0803708414706903 01e0 37 30 38 31 30 35 32 35 31 30 33 36 35 31 33 30 7081052510365130 01f0 31 35 35 31 31 32 30 31 35 31 33 33 34 34 30 30 1551120151334400 0200 32 2


Now look at your hexdump (ignore the leading 02 19, thats the length of the message).
0000  02 19 30 32 30 30 46 32  33 43 34 36 44 31 32 39  ..0200
​​
F23C46D129 0010 45 30 39 32 30 30 30 30 30 30 30 30 30 30 35 32 E092000000000052 0020 30 30 30 30 32 30 31 39 35 30 36 31 30 37 31 35 0000201950610715

What you have as the bitmap in the right column [
F23C46D129...] of printable ascii data I have it in the hex data [ F2 3C 46 D1 29 ....]
​0000  ​​30 32 30 30 F2 3C 46 D1  29 E0 92 00 00 00 00 00  0200.<F.).......
0010  52 00 00 20 31 39 35 30  36 31 30 37 31 35 32 32  R.. 195061071522
Which probably means you are not using the Bitmap defined as binary but ascii, which I have already mentioned in earlier posts.


postpack.xml has bitmap defined as (pay attention to the IFB in the class) 

 <isofield       id="1"       length="16"       name="BIT MAP"       class="org.jpos.iso.IFB_BITMAP"/>

your fields.xml has 
<isofield id="1" length="
​16​
"
name="BIT MAP" class="org.jpos.iso.IFA_BITMAP"/>

-chhil



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.

Gaurav Kumar

unread,
Dec 21, 2016, 4:12:04 AM12/21/16
to jPOS Users
Dear Chhil,

Tried using postpack.xml and adjusted the lengths in packager as you suggested but ended up having the error below

org.jpos.iso.ISOException: org.jpos.iso.IFA_LLCHAR: Problem unpacking field 44 (java.lang.RuntimeException: Required 2 but just got 0 bytes) unpacking field=44, consumed=535
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:268)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:454)
at com.canvasm.fi.tests.gaurav.UnpackISOMessagePostPack.parseISOMessage(UnpackISOMessagePostPack.java:45)
at com.canvasm.fi.tests.gaurav.UnpackISOMessagePostPack.main(UnpackISOMessagePostPack.java:16)
<isomsg>
  <!-- org.jpos.iso.packager.GenericPackager[/D:/Sterling%20Bank/Sterling%20Workspace/CanFIFunctionalTests/bin/fields.xml] -->
  <field id="0" value="0200"/>
  <field id="2" value="E0920000000000520000201950610"/>
  <field id="6" value="715223000000"/>
  <field id="7" value="4340101000"/>
  <field id="11" value="000001"/>
  <field id="12" value="000009"/>
  <field id="15" value="0206"/>
  <field id="19" value="192"/>
  <field id="20" value="000"/>
  <field id="23" value="000"/>
  <field id="24" value="106"/>
  <field id="26" value="19"/>
  <field id="31" value="200902210"/>
  <field id="32" value="0110510010012D000000000650"/>
  <field id="35" value="07365061071522300000043D2102601013544433111196000001601111196"/>
  <field id="36" value="BN000000005231ENG RV RUMUOKORO       RV           RVNG5661E68EDC1F04E8C5B2009F2608A0E55BE23389ADFB9F2701409F10200FA501620200140000000000000000000F01AAAAAAAAAAAAAAAAAAAAAAAAAAAA9F3704D1467E469F360201B4950542802400009A031612149C01009F02060000000000155F2A020949820258009F1A020792903708037080370"/>
  <field id="38" value="803708"/>
  <field id="43" value="4147069037081052510365130155112015133440"/>
</isomsg>
java.lang.NullPointerException
at com.canvasm.fi.tests.gaurav.CryptoUtil.encrypt(CryptoUtil.java:58)
at com.canvasm.fi.tests.gaurav.UnpackISOMessagePostPack.parseISOMessage(UnpackISOMessagePostPack.java:57)
at com.canvasm.fi.tests.gaurav.UnpackISOMessagePostPack.main(UnpackISOMessagePostPack.java:16)

If you observe it changes the available fields too from the message. If I use fields.xml I get this : (Which is what POS is sending me correctly)
<isomsg>
  <!-- org.jpos.iso.packager.GenericPackager[/D:/Sterling%20Bank/Sterling%20Workspace/CanFIFunctionalTests/bin/fields.xml] -->
  <field id="0" value="0200"/>
  <field id="2" value="5061071522300000043"/>
  <field id="3" value="401010"/>
  <field id="4" value="000000010000"/>
  <field id="7" value="0902061920"/>
  <field id="11" value="000001"/>
  <field id="12" value="061920"/>
  <field id="13" value="0902"/>
  <field id="14" value="2102"/>
  <field id="18" value="6011"/>
  <field id="22" value="051"/>
  <field id="23" value="001"/>
  <field id="25" value="00"/>
  <field id="26" value="12"/>
  <field id="28" value="D00000000"/>
  <field id="32" value="506107"/>
  <field id="35" value="5061071522300000043D2102601013544433"/>
  <field id="37" value="111196000001"/>
  <field id="40" value="601"/>
  <field id="41" value="11119627"/>
  <field id="42" value="EBN000000005231"/>
  <field id="43" value="ENG RV RUMUOKORO       RV           RVNG"/>
  <field id="49" value="566"/>
  <field id="52" value="1E68EDC1F04E8C5B"/>
  <field id="55" value="9F2608A0E55BE23389ADFB9F2701409F10200FA501620200140000000000000000000F01AAAAAAAAAAAAAAAAAAAAAAAAAAAA9F3704D1467E469F360201B4950542802400009A031612149C01009F02060000000000155F2A020949820258009F1A020792"/>
  <field id="98" value="9037080370803708037084147"/>
  <field id="100" value="903708"/>
  <field id="103" value="5251036513"/>
  <field id="123" value="511201513344002"/>
</isomsg>

chhil

unread,
Dec 21, 2016, 4:19:23 AM12/21/16
to jpos-...@googlegroups.com
​Please provide reproducible code of what you are doing. Preferably at https://gist.github.com/

postpack.xml works as is, you did not have to change anything in it.

-chhil

Gaurav Kumar

unread,
Dec 21, 2016, 4:31:52 AM12/21/16
to jPOS Users
My code is :

package com.canvasm.fi.tests.gaurav;

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;

import com.canvasm.fi.utils.ByteUtil;

public class UnpackISOMessagePostPack {
    public static void main(String[] args) {
        UnpackISOMessagePostPack iso = new UnpackISOMessagePostPack();
        try {
            ISOMsg isoMsg = iso.parseISOMessage();
            iso.printISOMessage(isoMsg);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public ISOMsg parseISOMessage() throws Exception {
  
    //String message = "3032303046323343343644313239453039323030303030303030303035323030303032313139353036313037313032323336363032333732343430323031303030303030313530303030303039303931353533303420202020203131363533303430393039313930313630313130353130303130303132443030303030303030303635303631303733323030303030303030303030303030303030303030303030303030303030303030323033393030303030303038363031313035303532333745424E303030303030303035323331454E472052562052554D554F4B4F524F202020202020205256202020202020202020202052564E4735363633303330333033303330333033303330323030394632363038333632323846414238364439453342423946323730313430394631303230304641353031363230323030303630303030303030303030303030303030303030463031414141414141414141414141414141414141414141414141414141413946333730343538324531423333394633363032303234313935303534323830323430303030394130333136303933303943303130303946303230363030303030303030303031353546324130323039343938323032353830303946314130323037393239303337303830333730383033373038303337303834313437303639303337303831303532353130333635313330313535313132303135313333343430303230303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030";
    //String message = "303230304532334334364431323945303832303030303030303030303532303030303230313935303631303731353232333030303030303433343031303130313230363132333531393030303030313132333531393132303632313032363031313035313030313030313244303030303030303030363530363130373336353036313037313532323330303030303034334432313032363031303133353434343333313131313936303030303031363031313131313936323745424e303030303030303035323331454e472052562052554d554f4b4f524f202020202020205256202020202020202020202052564e473536363230303946323630383238363442373738333937313432334339463237303134303946313032303046413530313632333830303134303030303030303030303030303030303030304630314141414141414141414141414141414141414141414141414141414139463337303446373633323436353946333630323031354139353035343238303030303030303941303331363132303639433031303039463032303630303030303030303030313535463241303230393439383230323538303039463141303230373932393033373038303337303830333730383033373038343134373036393033373038313035323531303336353133303135353131323031353133333434303032";
    //String message = "303230304632334334364431323945303832303030303030303030303532303030303230313935303631303731353232333030303030303433343031303130303030303030303130303030313230383130323130323030303030313130323130323132303832313032363031313035313030313030313244303030303030303030363530363130373336353036313037313532323330303030303034334432313032363031303133353434343333313131313936303030303031363031313131313936323745424e303030303030303035323331454e472052562052554d554f4b4f524f202020202020205256202020202020202020202052564e473536363230303946323630383233413331383144463137383834443739463237303134303946313032303046413530313632333830303134303030303030303030303030303030303030304630314141414141414141414141414141414141414141414141414141414139463337303443454646304137343946333630323031363039353035343238303030303030303941303331363132303839433031303039463032303630303030303030303030313535463241303230393439383230323538303039463141303230373932393033373038303337303830333730383033373038343134373036393033373038313035323531303336353133303135353131323031353133333434303032";
    String message = "303230304632334334364431323945303932303030303030303030303532303030303230313935303631303731353232333030303030303433343031303130303030303030303130303030303930323036313932303030303030313036313932303039303232313032363031313035313030313030313244303030303030303030363530363130373336353036313037313532323330303030303034334432313032363031303133353434343333313131313936303030303031363031313131313936323745424e303030303030303035323331454e472052562052554d554f4b4f524f202020202020205256202020202020202020202052564e47353636314536384544433146303445384335423230303946323630384130453535424532333338394144464239463237303134303946313032303046413530313632303230303134303030303030303030303030303030303030304630314141414141414141414141414141414141414141414141414141414139463337303444313436374534363946333630323031423439353035343238303234303030303941303331363132313439433031303039463032303630303030303030303030313535463241303230393439383230323538303039463141303230373932393033373038303337303830333730383033373038343134373036393033373038313035323531303336353133303135353131323031353133333434303032";
   
    String incomingBitmap=message.substring(8, 72);
    System.out.println("Bitmap is "+incomingBitmap);
    String bitmap = new String(ISOUtil.hex2byte(incomingBitmap));
    System.out.println(ISOUtil.hex2byte(incomingBitmap));
   
   
    String encryptedValue;
        Logger l = new Logger();
        l.addListener(new SimpleLogListener());
        ISOMsg m = new ISOMsg();
        GenericPackager p;
        try {
        p = new GenericPackager(UnpackISOMessagePostPack.class.getResource("/postPack.xml").getFile());
        //p = new GenericPackager(UnpackISOMessagePostPack.class.getResource("/fields.xml").getFile());
            m.setPackager(p);
            m.unpack(ISOUtil.hex2byte(message)); // You need to convert the hex string to bytes
            m.pack();
            m.dump(System.out, "");
            printISOMessage(m);
            System.out.println(ISOUtil.hexdump(m.getBytes()));
        }
        catch (ISOException e) {

            e.printStackTrace();
            m.dump(System.out, "");
        }
        CryptoUtil cu =new CryptoUtil();
encryptedValue=cu.encrypt(m.getString(52));
        m.set(52,encryptedValue);
        return m;
    }

    public void printISOMessage(ISOMsg isoMsg) {
        try {
            System.out.printf("MTI = %s%n", isoMsg.getMTI());
            for (int i = 1; i <= isoMsg.getMaxField(); i++) {
                if (isoMsg.hasField(i)) {
                    System.out.printf("Field (%s) = %s%n", i, isoMsg.getString(i));
                }
            }
        } catch (ISOException e) {
            e.printStackTrace();

chhil

unread,
Dec 21, 2016, 4:53:58 AM12/21/16
to jpos-...@googlegroups.com
In message data the bitmap is ascii (remember this will fail when you actually talk to a Postilion system).

        String message = "303230304632334334364431323945303932303030303030303030303532303030303230313935303631303731353232333030303030303433343031303130303030303030303130303030303930323036313932303030303030313036313932303039303232313032363031313035313030313030313244303030303030303030363530363130373336353036313037313532323330303030303034334432313032363031303133353434343333313131313936303030303031363031313131313936323745424e303030303030303035323331454e472052562052554d554f4b4f524f202020202020205256202020202020202020202052564e47353636314536384544433146303445384335423230303946323630384130453535424532333338394144464239463237303134303946313032303046413530313632303230303134303030303030303030303030303030303030304630314141414141414141414141414141414141414141414141414141414139463337303444313436374534363946333630323031423439353035343238303234303030303941303331363132313439433031303039463032303630303030303030303030313535463241303230393439383230323538303039463141303230373932393033373038303337303830333730383033373038343134373036393033373038313035323531303336353133303135353131323031353133333434303032";

In postpack change

  <isofield
      id="1"
      length="16"
      name="BIT MAP"
      class="org.jpos.iso.IFB_BITMAP"/>

to 

  <isofield
      id="1"
      length="16"
      name="BIT MAP"
      class="org.jpos.iso.IFA_BITMAP"/>

You will get an error in field 55 for the packager, fix it.

My output from your code (without the crypto stuff)
Bitmap is 4632334334364431323945303932303030303030303030303532303030303230

[B@1d81eb93
org.jpos.iso.ISOException: org.jpos.iso.IFA_LLLCHAR: Problem unpacking field 55 (org.jpos.iso.ISOException: Field length 2204 too long. Max: 999) unpacking field=55, consumed=263
<isomsg direction="none">    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:284)
    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:460)
    at UnpackISOMessagePostPack.parseISOMessage(UnpackISOMessagePostPack.java:42)
    at UnpackISOMessagePostPack.main(UnpackISOMessagePostPack.java:13)

  <!-- org.jpos.iso.packager.GenericPackager[.\cfg\postpack.xml] -->
  <field id="0" value="0200"/>
  <field id="bitmap" value="{1, 2, 3, 4, 7, 11, 12, 13, 14, 18, 22, 23, 25, 26, 28, 32, 35, 37, 40, 41, 42, 43, 49, 52, 55, 98, 100, 103, 123}" type="bitmap"/>
  <field id="2" value="5061071522300000043"/>
  <field id="3" value="401010"/>
  <field id="4" value="000000010000"/>
  <field id="7" value="0902061920"/>
  <field id="11" value="000001"/>
  <field id="12" value="061920"/>
  <field id="13" value="0902"/>
  <field id="14" value="2102"/>
  <field id="18" value="6011"/>
  <field id="22" value="051"/>
  <field id="23" value="001"/>
  <field id="25" value="00"/>
  <field id="26" value="12"/>
  <field id="28" value="D00000000"/>
  <field id="32" value="506107"/>
  <field id="35" value="5061071522300000043D2102601013544433"/>
  <field id="37" value="111196000001"/>
  <field id="40" value="601"/>
  <field id="41" value="11119627"/>
  <field id="42" value="EBN000000005231"/>
  <field id="43" value="ENG RV RUMUOKORO       RV           RVNG"/>
  <field id="49" value="566"/>
  <field id="52" value="3145363845444331" type="binary"/>
</isomsg>
MTI = 0200
Field (2) = 5061071522300000043
Field (3) = 401010
Field (4) = 000000010000
Field (7) = 0902061920
Field (11) = 000001
Field (12) = 061920
Field (13) = 0902
Field (14) = 2102
Field (18) = 6011
Field (22) = 051
Field (23) = 001
Field (25) = 00
Field (26) = 12
Field (28) = D00000000
Field (32) = 506107
Field (35) = 5061071522300000043D2102601013544433
Field (37) = 111196000001
Field (40) = 601
Field (41) = 11119627
Field (42) = EBN000000005231
Field (43) = ENG RV RUMUOKORO       RV           RVNG
Field (49) = 566
Field (52) = 3145363845444331

You need to understand, this willeventually not work with postilion as it needs a binary bitmap packager and not the ascii one that your current code works with. I hope you understand that. Please try and understand the difference between ascii and binary packager.
In my earlier email I have displayed the difference of bitmaps using hexdump.


-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.

Gaurav Kumar

unread,
Dec 21, 2016, 6:51:01 AM12/21/16
to jPOS Users
Hi Chhil,

I am able to parse message completely using postpack. But after sending it to Postilion it still gives me the same error at field 2. which implies that the method I am using is changing some data. Could you provide a code snippet for NACChannel ?
Please check code that I am using to send request to postilion.
GenericPackager p = new GenericPackager(TransHandler.class.getResource("/postPack.xml").getFile());
       
           m.setPackager(p);
           m.unpack(ISOUtil.hex2byte(requestData));                            
ISOMsg isoMsgforPostilion = new ISOMsg();
           isoMsgforPostilion.setPackager(p);
            
           for(int ctr=0;ctr<=123;ctr++){
            if(m.getString(ctr)!=null){
            isoMsgforPostilion.set(ctr,m.getString(ctr));
            }
           }
                           byte[]  postiMsgData = isoMsgforPostilion.pack();
String postilionMsg = new String(postiMsgData);
postilionMsg=ByteUtil.convertStringToHex(postilionMsg);
postilionMsg=ByteUtil.getISOMsgHexLength(postilionMsg,4)+ postilionMsg; //prefixing 2 bytes hex length
System.out.println("postilionMsg is "+postilionMsg);
byte postiByte[] = ByteUtil.tobyteArrfromString(postilionMsg);
                           Socket postilionClientSocket = new Socket("192.168.4.132", 1060);
DataOutputStream postilionDOS = new DataOutputStream(postilionClientSocket.getOutputStream());
postilionDOS.write(postiByte);
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.

chhil

unread,
Dec 21, 2016, 7:39:42 AM12/21/16
to jpos-...@googlegroups.com
I give up!
Do you read my responses, Postilion expects a binary bitmap packager, you are testing with ascii bitmap packager because the hex data has a ascii bitmap in it.

-chhil




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.

Gaurav Kumar

unread,
Dec 22, 2016, 7:28:19 AM12/22/16
to jPOS Users
Chhil, Postilion can read my message now. There was a mistake in IFB/IFA thing because of so many test programs. I am facing an issue at field which is no mandaTory. Please suggest:

A bitmap message (postilion.realtime.postbridge.Iso8583PBLegacy) could not be unpacked, because of an error while unpacking field number 30 (Fixed x+n 9) at offset 92. When the error occurred, the bitmap looked like this: 0200: [LLVAR n ..19 006] 002 [107152] [Fixed n 10 010] 007 [2300000043] [None n 008] 008 [40201000] [None n 008] 009 [00000100] [Fixed n 6 006] 011 [000910] [Fixed n 6 006] 012 [021203] [Fixed n 4 004] 015 [0000] [Fixed n 3 003] 019 [010] [Fixed n 3 003] 020 [212] [Fixed n 3 003] 021 [030] [Fixed n 3 003] 022 [910] [Fixed n 2 002] 026 [21]

binary data

0000(0000)  30 32 30 30 c3 b2 3c 46  c3 95 29 c3 a0 e2 80 99   0200..<F..).....

0016(0010)  00 00 00 00 00 52 00 00  20 31 39 35 30 36 31 30   .....R.. 1950610

0032(0020)  37 31 35 32 32 33 30 30  30 30 30 30 34 33 34 30   7152230000004340

0048(0030)  32 30 31 30 30 30 30 30  30 30 30 31 30 30 30 30   2010000000010000

0064(0040)  30 39 31 30 30 32 31 32  30 33 30 30 30 30 30 31   0910021203000001

0080(0050)  30 32 31 32 30 33 30 39  31 30 32 31 30 32 36 30   0212030910210260

0096(0060)  31 31 30 35 31 30 30 31  30 30 31 32 44 30 30 30   110510010012D000

0112(0070)  30 30 30 30 30 43 30 30  30 30 30 30 30 30 30 36   00000C0000000006

0128(0080)  35 30 36 31 30 37 33 36  35 30 36 31 30 37 31 35   5061073650610715

0144(0090)  32 32 33 30 30 30 30 30  30 34 33 44 32 31 30 32   22300000043D2102

0160(00a0)  36 30 31 30 31 33 35 34  34 34 33 33 31 31 31 31   6010135444331111

0176(00b0)  39 36 30 30 30 30 30 31  36 30 31 31 31 31 31 39   9600000160111119

0192(00c0)  36 32 37 45 42 4e 30 30  30 30 30 30 30 30 35 32   627EBN0000000052

0208(00d0)  33 31 45 4e 47 20 52 56  20 52 55 4d 55 4f 4b 4f   31ENG RV RUMUOKO

0224(00e0)  52 4f 20 20 20 20 20 20  20 52 56 20 20 20 20 20   RO       RV    

0240(00f0)  20 20 20 20 20 20 52 56  4e 47 35 36 36 1e 68 c3         RVNG566.h.

0256(0100)  ad c3 81 c3 b0 4e c5 92  5b 32 30 30 39 46 32 36   .....N..[2009F26

0272(0110)  30 38 36 43 45 44 30 45  43 43 34 43 33 38 44 32   086CED0ECC4C38D2

0288(0120)  44 34 39 46 32 37 30 31  34 30 39 46 31 30 32 30   D49F2701409F1020

0304(0130)  30 46 41 35 30 31 36 32  30 32 30 30 31 34 30 30   0FA5016202001400

0320(0140)  30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30   0000000000000000

0336(0150)  30 46 30 31 41 41 41 41  41 41 41 41 41 41 41 41   0F01AAAAAAAAAAAA

0352(0160)  41 41 41 41 41 41 41 41  41 41 41 41 41 41 41 41   AAAAAAAAAAAAAAAA

0368(0170)  39 46 33 37 30 34 42 46  31 46 34 41 38 34 39 46   9F3704BF1F4A849F

0384(0180)  33 36 30 32 30 31 45 45  39 35 30 35 34 32 38 30   360201EE95054280

0400(0190)  32 34 31 30 30 30 39 41  30 33 31 36 31 32 32 32   2410009A03161222

0416(01a0)  39 43 30 31 30 30 39 46  30 32 30 36 30 30 30 30   9C01009F02060000

0432(01b0)  30 30 30 30 30 30 31 35  35 46 32 41 30 32 30 39   000000155F2A0209

0448(01c0)  34 39 38 32 30 32 35 38  30 30 39 46 31 41 30 32   49820258009F1A02

0464(01d0)  30 37 39 32 39 30 33 37  30 38 30 33 37 30 38 30   0792903708037080

0480(01e0)  33 37 30 38 30 33 37 30  38 34 31 34 37 30 36 39   3708037084147069

0496(01f0)  30 33 37 30 38 31 30 35  32 35 31 30 33 36 35 31   0370810525103651

0512(0200)  33 30 31 35 35 31 31 32  30 31 35 31 33 33 34 34   3015511201513344

0528(0210)  30 30 32                                           002

stack trace

Postilion exception: [postilion.realtime.sdk.message.bitmap.XBitmapUnableToExtract]

Description: A bitmap message (postilion.realtime.postbridge.Iso8583PBLegacy) could not be unpacked, because of an error while unpacking field number 30 (Fixed  x+n     9) at offset 92. When the error occurred, the bitmap looked like this:

0200:

   [LLVAR  n    ..19 006] 002 [107152]

   [Fixed  n      10 010] 007 [2300000043]

   [None   n         008] 008 [40201000]

   [None   n         008] 009 [00000100]

   [Fixed  n       6 006] 011 [000910]

   [Fixed  n       6 006] 012 [021203]

   [Fixed  n       4 004] 015 [0000]

   [Fixed  n       3 003] 019 [010]

   [Fixed  n       3 003] 020 [212]

   [Fixed  n       3 003] 021 [030]

   [Fixed  n       3 003] 022 [910]

   [Fixed  n       2 002] 026 [21]

 

ID: [301]

Data: [none]

 

     at postilion.realtime.sdk.message.bitmap.BitmapMessage.fromMsg(BitmapMessage.java:551)

     at postilion.realtime.sdk.message.bitmap.Iso8583.fromMsg(Iso8583.java:221)

     at postilion.realtime.sdk.message.bitmap.Iso8583Post.fromMsg(Iso8583Post.java:457)

     at postilion.realtime.sdk.message.bitmap.BitmapMessage.fromMsg(BitmapMessage.java:416)

     at postilion.realtime.postbridge.PostBridge.newMsg(PostBridge.java:180)

     at postilion.realtime.sdk.node.ProfilingInterchangeDriver.newMsg(ProfilingInterchangeDriver.java:119)

     at postilion.realtime.sdk.node.Interchange.processDataEventFromRemoteNode(Interchange.java:3620)

     at postilion.realtime.sdk.node.Interchange.processEndpointData(Interchange.java:629)

     at postilion.realtime.sdk.node.InterchangeProcessor.processEndpointData(InterchangeProcessor.java:816)

     at postilion.realtime.sdk.node.InterchangeProcessor.processEvent(InterchangeProcessor.java:548)

     at postilion.realtime.sdk.util.Processor.run(Processor.java:213)

     at postilion.realtime.sdk.env.AppProcessor.run(AppProcessor.java:136)

 

In postpack.xml the definition is 

<isofield

      id="28"

      length="9"

      name="AMOUNT, TRANSACTION FEE"

      class="org.jpos.iso.IFA_AMOUNT"/>

  <isofield

      id="29"

      length="9"

      name="AMOUNT, SETTLEMENT FEE"

      class="org.jpos.iso.IFA_AMOUNT"/>

  <isofield

      id="30"

      length="9"

      name="AMOUNT, TRANSACTION PROCESSING FEE"

      class="org.jpos.iso.IFA_AMOUNT"/>


chhil

unread,
Dec 22, 2016, 8:07:39 AM12/22/16
to jpos-...@googlegroups.com
I think you don't have a clue about what you are doing, you expect things to work withut understanding what it needs to get it to work.

I am surprised you did not find a problem with 

[LLVAR n ..19 006] 002 [107152]

And complained about non mandatory field handling. Is that what your field 2 is supposed to be? Did you send that?
0016(0010)  00 00 00 00 00 52 00 00  20 31 39 35 30 36 31 30   .....R.. 
​​
1950610 0032(0020) 37 31 35 32 32 33 30 30 30 30 30 30 34 33 34 30 7152230000004340


Based on the postilion hexdump, it should be starting from 19 which is the length of pan and then 19 bytes following it. So your Bitmap format is wrong and Postilion is interpretting based on the incorrect value you are sending.

Your bitmap seems to be longer than 16 causing the bytes to shift, causing field 2 be read at 06 instead of 19 (from 1950610...) , making 06 the length of field 2 and everything falls apart from there.

I don't have time to debug this for you.

Please figure out the packagers, set it correctly.

Best of luck.


-chhil


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.

Gaurav Kumar

unread,
Dec 28, 2016, 10:51:03 AM12/28/16
to jPOS Users
Hi Chhil,

I have set the packager and getting message as per the length and type at postilion. I am getting error at field 25. If I comment field 25 Postilion parse the message.
0200:
   [LLVAR  n    ..19 019] 002 [5061071522300000043] 
   [Fixed  n       6 006] 003 [402010] 
   [None   n         012] 004 [000000010000] 
   [Fixed  n      10 010] 007 [0916035241] 
   [Fixed  n       6 006] 011 [000001] 
   [Fixed  n       6 006] 012 [035241] 
   [Fixed  n       4 004] 013 [0916] 
   [Fixed  n       4 004] 014 [2102] 
   [Fixed  n       4 004] 018 [6011] 
   [Fixed  n       3 003] 022 [011] 
   [None   n         003] 023 [001] 
   [Fixed  n       2 002] 026 [12] 
   [Fixed  x+n     9 009] 028 [D00000000] 
   [Fixed  x+n     9 009] 030 [D00000000] 
   [LLVAR  n    ..11 011] 032 [11111111111] 
   [LLVAR  z    ..37 036] 035 [5061071522300000043D2102601013544433] 
   [Fixed  anp    12 012] 037 [111196000001] 
   [Fixed  an      3 003] 040 [601] 
   [Fixed  ans    15 015] 042 [AUTOPAY00000003] 
   [Fixed  ans    40 040] 043 [KNSG/TFD/August 2016 Sala/1826368/  LANG] 
   [Fixed  b       8 008] 052 *[1E68C3ADC381C3B0] 
   [LLVAR  ans  ..32 032] 127.002 [0200:000001:0916035241:004350610] 
binary data 
0000(0000)  30 32 30 30 f2 3c 46 55  29 60 10 00 00 00 00 00   0200.<FU)`......
0016(0010)  00 00 00 02 31 39 35 30  36 31 30 37 31 35 32 32   ....195061071522
0032(0020)  33 30 30 30 30 30 30 34  33 34 30 32 30 31 30 30   3000000434020100
0048(0030)  30 30 30 30 30 30 31 30  30 30 30 30 39 31 36 30   0000001000009160
0064(0040)  33 35 32 34 31 30 30 30  30 30 31 30 33 35 32 34   3524100000103524
0080(0050)  31 30 39 31 36 32 31 30  32 36 30 31 31 30 31 31   1091621026011011
0096(0060)  30 30 31 31 32 44 30 30  30 30 30 30 30 30 44 30   00112D00000000D0
0112(0070)  30 30 30 30 30 30 30 31  31 31 31 31 31 31 31 31   0000000111111111
0128(0080)  31 31 31 31 33 36 35 30  36 31 30 37 31 35 32 32   1111365061071522
0144(0090)  33 30 30 30 30 30 30 34  33 44 32 31 30 32 36 30   300000043D210260
0160(00a0)  31 30 31 33 35 34 34 34  33 33 31 31 31 31 39 36   1013544433111196
0176(00b0)  30 30 30 30 30 31 36 30  31 41 55 54 4f 50 41 59   000001601AUTOPAY
0192(00c0)  30 30 30 30 30 30 30 33  4b 4e 53 47 2f 54 46 44   00000003KNSG/TFD
0208(00d0)  2f 41 75 67 75 73 74 20  32 30 31 36 20 53 61 6c   /August 2016 Sal
0224(00e0)  61 2f 31 38 32 36 33 36  38 2f 20 20 4c 41 4e 47   a/1826368/  LANG
0240(00f0)  1e 68 c3 ad c3 81 c3 b0  30 30 30 30 34 32 40 00   .h......000042@.
0256(0100)  00 00 00 00 00 00 33 32  30 32 30 30 3a 30 30 30   ......320200:000
0272(0110)  30 30 31 3a 30 39 31 36  30 33 35 32 34 31 3a 30   001:0916035241:0
0288(0120)  30 34 33 35 30 36 31 30                            04350610

Please help. And for field 35 length is 37 but POS is sending 36 as it says that card has only 36 digits. can this be an issue?

chhil

unread,
Dec 28, 2016, 11:22:13 AM12/28/16
to jpos-...@googlegroups.com
If you provide a hexdump of Postilion which doesnt have field 25, how is one supposed to figure out what you are sending?
Match your field 25 definitions is all I can say. This is a jpos list so ideally you should provide jpos logs, most people may not be familiar with Postilion logs or its behavior.

As for field 35
postpack.xml has 
  <isofield
      id="35"
      length="37"
      name="TRACK 2 DATA"
      class="org.jpos.iso.IFA_LLNUM"/>
What does it mean?
The LLNUM indicated I need a 2 wide length indicator (so it can be 00 to 99).
What does length="37" imply?
It says I am fine upto LL = 37, beyond that I will throw an error.

This could be easily tested by you in the samples provided earlier. Have the client send a message with field 35 of length 36 and the server should unpack it using postpack.xml

-chhil


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.

Gaurav Kumar

unread,
Dec 28, 2016, 11:39:11 AM12/28/16
to jPOS Users
Dear Chhil,

Following is the Hexdump when I include field 25 in iso message : Please suggest

A bitmap message (postilion.realtime.postbridge.Iso8583PBLegacy) could not be unpacked, because of an error while unpacking field number 2 (LLVAR n ..19) at offset 12. When the error occurred, the bitmap looked like this: 0200: 
binary data 
0000(0000)  30 32 30 30 72 3c 46 c3  95 29 60 10 00 31 39 35   0200r<F..)`..195
0016(0010)  30 36 31 30 37 31 35 32  32 33 30 30 30 30 30 30   0610715223000000
0032(0020)  34 33 34 30 32 30 31 30  30 30 30 30 30 30 30 31   4340201000000001
0048(0030)  30 30 30 30 30 39 31 35  30 32 34 37 31 38 30 30   0000091502471800
0064(0040)  30 30 30 31 30 32 34 37  31 38 30 39 31 35 32 31   0001024718091521
0080(0050)  30 32 36 30 31 31 30 31  31 30 30 31 30 31 31 32   0260110110010112
0096(0060)  44 30 30 30 30 30 30 30  30 44 30 30 30 30 30 30   D00000000D000000
0112(0070)  30 30 31 31 31 31 31 31  31 31 31 31 31 31 31 33   0011111111111113
0128(0080)  36 35 30 36 31 30 37 31  35 32 32 33 30 30 30 30   6506107152230000
0144(0090)  30 30 34 33 44 32 31 30  32 36 30 31 30 31 33 35   0043D21026010135
0160(00a0)  34 34 34 33 33 31 31 31  31 39 36 30 30 30 30 30   4443311119600000
0176(00b0)  31 36 30 31 41 55 54 4f  50 41 59 30 30 30 30 30   1601AUTOPAY00000
0192(00c0)  30 30 33 4b 4e 53 47 2f  54 46 44 2f 41 75 67 75   003KNSG/TFD/Augu
0208(00d0)  73 74 20 32 30 31 36 20  53 61 6c 61 2f 31 38 32   st 2016 Sala/182
0224(00e0)  36 33 36 38 2f 20 20 4c  41 4e 47 1e 68 c3 ad c3   6368/  LANG.h...
0240(00f0)  81 c3 b0 4e c5 92 5b                               ...N..[
stack trace 
Postilion exception: [postilion.realtime.sdk.message.bitmap.XBitmapUnableToExtract]
Description: A bitmap message (postilion.realtime.postbridge.Iso8583PBLegacy) could not be unpacked, because of an error while unpacking field number 2 (LLVAR  n    ..19) at offset 12. When the error occurred, the bitmap looked like this: 
0200:

ID: [301]
Data: [none]

 at postilion.realtime.sdk.message.bitmap.BitmapMessage.fromMsg(BitmapMessage.java:551)
 at postilion.realtime.sdk.message.bitmap.Iso8583.fromMsg(Iso8583.java:221)
 at postilion.realtime.sdk.message.bitmap.Iso8583Post.fromMsg(Iso8583Post.java:457)
 at postilion.realtime.sdk.message.bitmap.BitmapMessage.fromMsg(BitmapMessage.java:416)
 at postilion.realtime.postbridge.PostBridge.newMsg(PostBridge.java:180)
 at postilion.realtime.sdk.node.ProfilingInterchangeDriver.newMsg(ProfilingInterchangeDriver.java:119)
 at postilion.realtime.sdk.node.Interchange.processDataEventFromRemoteNode(Interchange.java:3620)
 at postilion.realtime.sdk.node.Interchange.processEndpointData(Interchange.java:629)
 at postilion.realtime.sdk.node.InterchangeProcessor.processEndpointData(InterchangeProcessor.java:816)
 at postilion.realtime.sdk.node.InterchangeProcessor.processEvent(InterchangeProcessor.java:548)
 at postilion.realtime.sdk.util.Processor.run(Processor.java:213)
 at postilion.realtime.sdk.env.AppProcessor.run(AppProcessor.java:136)
[Warning event 301]

chhil

unread,
Dec 28, 2016, 12:37:47 PM12/28/16
to jpos-...@googlegroups.com
If you include field 25, the hexdump with field 25 and without field 25 should be more or less alike, except the bitmap changes a bit and some additional field 25 data, which is not the case between your hexdumps. Which means you are sending 2 completely different messages.

In your message where you don't send a field 25, I unpack the message , set field 25 to 00 and pack it and it works just fine.
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 Test {

    
public static void main(String[] args) 
{

        Logger l = new Logger();
        l.addListener(new SimpleLogListener());
        String hex_without_field_25 = "30323030f23c46552960100000000000000000023139353036313037313532323330303030303034333430323031303030303030303031303030303039313630333532343130303030303130333532343130393136323130323630313130313130303131324430303030303030304430303030303030303131313131313131313131313133363530363130373135323233303030303030343344323130323630313031333534343433333131313139363030303030313630314155544f50415930303030303030334b4e53472f5446442f41756775737420323031362053616c612f313832363336382f20204c414e471e68c3adc381c3b030303030343240000000000000003332303230303a3030303030313a303931363033353234313a303034333530363130";
        ISOMsg m = new ISOMsg();
        GenericPackager p;
        try {
            p = new GenericPackager(".\\cfg\\postpack.xml");
            p.setLogger(l, "");
            m.setPackager(p);
            m.unpack(ISOUtil.hex2byte(hex_without_field_25));
            m.set(25, "00");
            byte[] with_field25 = m.pack();
            System.out.println(ISOUtil.hexdump(with_field25));
            m.unpack(with_field25);
        }
        catch (ISOException e) {
            e.printStackTrace();
            m.dump(System.out, "!");
        }

    }
}

Again, we don't care about Postilion dumps, provide jpos hexdumps. You can send postilion error to ACI to assist you in debugging your problem.

I am afraid, I cannot be of any further help to you. Please debug your messages with the hexdumps to figure out what you are doing wrong.

-chhil

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.

Victor Salaman

unread,
Dec 28, 2016, 12:56:22 PM12/28/16
to jpos-...@googlegroups.com
It must be sad thing to roam around the world without being able to use your brain. :(

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.
Reply all
Reply to author
Forward
0 new messages