Packager

126 views
Skip to first unread message

Mapfunde Venon

unread,
Mar 15, 2022, 10:56:25 AM3/15/22
to jpos-...@googlegroups.com
Hello

Can someone help me create a packager for this message:

1200:
   [LLVAR  n    ..19 016] 002 [5614810000038348] 
   [Fixed  n       6 006] 003 [270000] 
   [None   n         012] 004 [000000000222] 
   [Fixed  n      10 010] 007 [0315162643] 
   [Fixed  n       6 006] 011 [403930] 
   [Fixed  n      12 012] 012 [220315162643] 
   [Fixed  n       6 006] 015 [220315] 
   [Fixed  n       3 003] 019 [716] 
   [Fixed  an     12 012] 022 [010101210041] 
   [Fixed  n       3 003] 024 [200] 
   [Fixed  n       4 004] 026 [6011] 
   [Fixed  n       6 006] 028 [220315] 
   [LLVAR  n    ..11 006] 032 [639312] 
   [LLVAR  n    ..11 006] 033 [639312] 
   [Fixed  ans    12 012] 037 [Q52YDNSY3QXO] 
   [Fixed  ans     8 008] 041 [METB9003] 
   [LLVAR  ans  ..99 040] 043 [METBANK Mobile NetOne  Harare       Z716] 
   [Fixed  a/n     3 003] 049 [932] 
   [LLLVAR ans ..999 003] 060 [201] 
   [LLVAR  n    ..11 006] 100 [516261] 
   [LLVAR  ans  ..28 010] 103 [0772699555] 
   [LLLLLVAb   99999 322] 127 *[3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D38223F3E0A3C6669656C643132373E0A202020203C53656E64657244657461696C733E0A20202020202020203C46697273744E616D653E4272696768746F6E20447562653C2F46697273744E616D653E0A20202020202020203C4C6173744E616D653E4272696768746F6E20447562653C2F4C6173744E616D653E0A20202020202020203C4E6174696F6E616C49643E30382D3733373538305034343C2F4E6174696F6E616C49643E0A20202020202020203C4D6F62696C654E756D6265723E3236333737323639393535353C2F4D6F62696C654E756D6265723E0A20202020202020203C5265666572656E63653E746573743C2F5265666572656E63653E0A202020203C2F53656E64657244657461696C733E0A3C2F6669656C643132373E] 
   [Fixed  b       8 008] 128 *[3030303030303030] 
31323030F232255188A0801000000000120000033136353631343831313931383338323839333237303030303030303030303030303230303039323331303135313431393930323032323033313531333430135303635363134383130363132333435363230373431333035333832394D4554423930303334304D455442414E4B204D6F62696C65204E65744F6E652020486172617265202020202020205A575A57393332303786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D22796573223F3E0A3C6669656C643132372F3E0A0000000000000000
Here is my attempt on the packager:

<?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="16"
name="BIT MAP"
class="org.jpos.iso.IFB_BITMAP"/>
<isofield
id="2"
length="19"
name="PAN - PRIMARY ACCOUNT NUMBER"
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, Reconciliation"
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, Reconciliation"
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="12"
name="DATE TIME, LOCAL TRANSACTION YYMMDDhhmmss"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="13"
length="4"
name="Date, Effective"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="14"
length="4"
name="DATE, EXPIRATION YYMM"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="15"
length="6"
name="DATE, SETTLEMENT YYMMDD"
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="Merchant 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="Country code, Primary account number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="21"
length="3"
name="Country code, Forwarding institution"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="22"
length="12"
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="4"
name="Message reason code"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="26"
length="4"
name="Card Acceptor Business Code"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="27"
length="1"
name="Approval code length"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="28"
length="6"
name="Date, Reconciliation"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="29"
length="3"
name="Reconciliation indicator"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="30"
length="24"
name="Amounts, original"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="31"
length="99"
name="Acquirer reference data"
class="org.jpos.iso.IFA_LLCHAR"/>
<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="Primary account number, extended"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="35"
length="37" name="TRACK 2 DATA"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="36"
length="104"
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="Approval code"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="39"
length="3"
name="RESPONSE CODE"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="40"
length="3"
name="Service code"
class="org.jpos.iso.IFA_NUMERIC"/>
<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.IFA_LLCHAR"/>
<isofield
id="44"
length="99"
name="Additional 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="204"
name="Amounts, Fees"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="47"
length="999"
name="Additional data - national"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="48"
length="999"
name="Additional data - private"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="49"
length="3"
name="CURRENCY CODE, TRANSACTION"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="50"
length="3"
name="Currency code, Reconciliation"
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="8"
name="PIN DATA"
class="org.jpos.iso.IFB_BINARY"/>
<isofield
id="53"
length="48"
name="Security related control information"
class="org.jpos.iso.IFA_LLBINARY"/>
<isofield
id="54"
length="120"
name="ADDITIONAL AMOUNTS"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="55"
length="999"
name="ICC Data"
class="org.jpos.iso.IFA_LLLBINARY"/>
<isofield
id="56"
length="35"
name="Original Data Elements"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="57"
length="3"
name="Authorization life cycle code"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="58"
length="11"
name="Authorizing agent institution Id Code"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="59"
length="999"
name=" Transport Data"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="60"
length="999"
name="Point of Service Device Type"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="61"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="62"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="63"
length="999"
name="Reserved for private use"
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="8"
name="Reserved for ISO use"
class="org.jpos.iso.IFA_BINARY"/>
<isofield
id="66"
length="204"
name="Amounts, original fees"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="67"
length="2"
name="Extended payment data"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="68"
length="3"
name="Country code, receiving institution"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="69"
length="3"
name="Country code, settlement institution"
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="8"
name="Message number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="72"
length="999"
name="Data record"
class="org.jpos.iso.IFA_LLLCHAR"/>
<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="Authorizations, number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="82"
length="10"
name="Inquiries, reversal number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="83"
length="10"
name="Payments, number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="84"
length="10"
name="Payments, reversal number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="85"
length="10"
name="Fee collections, number"
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="10"
name="Authorizations, reversal number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="91"
length="3"
name="Country code, transaction Dest. Inst."
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="92"
length="3"
name="Country code, transaction Orig. Inst."
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="93"
length="11"
name="Transaction Destination Institution ID Code"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="94"
length="11"
name="Transaction Originator Institution ID Code"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="95"
length="99"
name="Card issuer reference data"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="96"
length="999"
name="Key management data"
class="org.jpos.iso.IFA_LLLBINARY"/>
<isofield
id="97"
length="17"
name="Amount, Net reconciliation"
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 Id code"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="100"
length="11"
name="Receiving Institution ID 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="ACCOUNT IDENTIFICATION 1"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="103"
length="28"
name="ACCOUNT IDENTIFICATION 2"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="104"
length="100"
name="Transaction description"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="105"
length="16"
name="Credits, Chargeback amount"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="106"
length="16"
name="Debits, Chargeback amount"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="107"
length="10"
name="Credits, Chargeback number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="108"
length="10"
name="Debits, Chargeback number"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="109"
length="84"
name="Credits, Fee amounts"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="110"
length="84"
name="Debits, Fee amounts"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="111"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="112"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="113"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="114"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="115"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="116"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="117"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="118"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="119"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="120"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="121"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="122"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="123"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="124"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="125"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="126"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFA_LLLCHAR"/>

<isofieldpackager
id="127"
length="99999"
name="RESERVED PRIVATE USE"
class="org.jpos.iso.IFA_LLLLLCHAR"
packager="org.jpos.iso.packager.GenericSubFieldPackager">
<isofield
id="0"
length="0"
name="PLACEHOLDER"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="1"
length="8"
name="BITMAP"
class="org.jpos.iso.IFB_BITMAP"/>
<isofield
id="2"
length="32"
name="SWITCH KEY"
class="org.jpos.iso.IFA_LLCHAR"/>
<!--<isofield
id="3"
length="48"
name="ROUTING INFORMATION"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="4"
length="22"
name="POS DATA"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="5"
length="73"
name="SERVICE STATION DATA"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="6"
length="2"
name="AUTHORIZATION PROFILE"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="7"
length="50"
name="CHECK DATA"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="8"
length="128"
name="RETENTION DATA"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="9"
length="255"
name="ADDITIONAL NODE DATA"
class="org.jpos.iso.IFA_LLLCHAR"/>
<isofield
id="10"
length="3"
name="CVV2"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="11"
length="32"
name="ORIGINAL KEY"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="12"
length="25"
name="TERMINAL OWNDER"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="13"
length="17"
name="POS GEOGRAPHIC DATA"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="14"
length="8"
name="SPONSOR BANK"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="15"
length="29"
name="AVS REQUEST"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="16"
length="1"
name="AVS RESPONSE"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="17"
length="50"
name="CARDHOLDER INFORMATION"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="18"
length="50"
name="VALIDATION DATA"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="19"
length="45"
name="BANK DETAILS"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="20"
length="8"
name="AUTHORIZER DATE SETTLEMENT"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="21"
length="12"
name="RECORD IDENTIFICATION"
class="org.jpos.iso.IFA_LLCHAR"/>-->
<isofield
id="22"
length="99999"
name="STRUCTURED DATA"
class="org.jpos.iso.IFA_LLLLLCHAR"/>
<!-- <isofield
id="23"
length="253"
name="PAYEE NAME AND ADDRESS"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="24"
length="28"
name="PAYER ACCOUNT INFORMATION"
class="org.jpos.iso.IFA_LLCHAR"/>
<isofield
id="25"
length="8000"
name="ICC DATA"
class="org.jpos.iso.IFA_LLLLCHAR"/>
<isofield
id="26"
length="20"
name="ORIGINAL NODE"
class="org.jpos.iso.IFA_LLCHAR"/>-->
</isofieldpackager>

<isofield
id="128"
length="8"
name="Message authentication code field"
class="org.jpos.iso.IFB_BINARY"/>
</isopackager>


Venon Mapfunde(PMP,Msc Software Engineering,Bsc Computer Science & Mathematics) Tel:+263 775 091 262 Email:taka...@gmail.com Skype: venon.mapfunde

murtuza chhil

unread,
Mar 15, 2022, 10:49:15 PM3/15/22
to jPOS Users

The hexdump you have provided does not match the postilion like ISO8583 trace.

            private static void testPostilion() {

        ISOMsg iso = new ISOMsg();

        try {

        GenericPackager pkg = new GenericPackager("path to your packager xml");

        Logger l = new Logger();

        l.addListener(new SimpleLogListener());

        pkg.setLogger(l, "");

        String hex = "31323030F232255188A0801000000000120000033136353631343831313931383338323839333237303030303030303030303030303230303039323331303135313431393930323032323033313531333430135303635363134383130363132333435363230373431333035333832394D4554423930303334304D455442414E4B204D6F62696C65204E65744F6E652020486172617265202020202020205A575A57393332303786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D22796573223F3E0A3C6669656C643132372F3E0A0000000000000000";

        System.out.println(ISOUtil.hexdump(ISOUtil.hex2byte(hex)));

        iso.setPackager(pkg);

        iso.unpack(ISOUtil.hex2byte(hex));

        iso.dump(System.out, "");

    }

    catch (Exception e) {

        iso.dump(System.out, "X");

    }

    }

Output


0000  31 32 30 30 F2 32 25 51  88 A0 80 10 00 00 00 00  1200.2%Q........

0010  12 00 00 03 31 36 35 36  31 34 38 31 31 39 31 38  ....165614811918

0020  33 38 32 38 39 33 32 37  30 30 30 30 30 30 30 30  3828932700000000

0030  30 30 30 30 30 32 30 30  30 39 32 33 31 30 31 35  0000020009231015

0040  31 34 31 39 39 30 32 30  32 32 30 33 31 35 31 33  1419902022031513

0050  34 30 13 53 03 63 53 63  13 43 83 13 03 63 13 23  40.S.cSc.C...c.#  <---40 is the part of DE and then the ScSc's start

0060  33 43 53 63 23 03 73 43  13 33 03 53 33 83 23 94  3CSc#.sC.3.S3.#.

0070  D4 55 44 23 93 03 03 33  43 04 D4 55 44 24 14 E4  .UD#...3C..UD$..

0080  B2 04 D6 F6 26 96 C6 52  04 E6 57 44 F6 E6 52 02  ....&..R..WD..R.

0090  04 86 17 26 17 26 52 02  02 02 02 02 02 05 A5 75  ...&.&R........u

00a0  A5 73 93 33 23 03 78 6D  6C 20 76 65 72 73 69 6F  .s.3#.xml versio

00b0  6E 3D 22 31 2E 30 22 20  65 6E 63 6F 64 69 6E 67  n="1.0" encoding

00c0  3D 22 55 54 46 2D 38 22  20 73 74 61 6E 64 61 6C  ="UTF-8" standal

00d0  6F 6E 65 3D 22 79 65 73  22 3F 3E 0A 3C 66 69 65  one="yes"?>.<fie

00e0  6C 64 31 32 37 2F 3E 0A  00 00 00 00 00 00 00 00  ld127/>.........



<log realm="" at="2022-03-16T08:01:29.855279" lifespan="192ms">

  <unpack>

    31323030F232255188A0801000000000120000033136353631343831313931383338323839333237303030303030303030303030303230303039323331303135313431393930323032323033313531333430135303635363134383130363132333435363230373431333035333832394D4554423930303334304D455442414E4B204D6F62696C65204E65744F6E652020486172617265202020202020205A575A57393332303786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D22796573223F3E0A3C6669656C643132372F3E0A0000000000000000

    <bitmap>{1, 2, 3, 4, 7, 11, 12, 15, 19, 22, 24, 26, 28, 32, 33, 37, 41, 43, 49, 60, 100, 103, 127, 128}</bitmap>

    <unpack fld="2" packager="org.jpos.iso.IFA_LLNUM">

      <value>5614811918382893</value>

    </unpack>

    <unpack fld="3" packager="org.jpos.iso.IFA_NUMERIC">

      <value>270000</value>

    </unpack>

    <unpack fld="4" packager="org.jpos.iso.IFA_NUMERIC">

      <value>000000000200</value>

    </unpack>

    <unpack fld="7" packager="org.jpos.iso.IFA_NUMERIC">

      <value>0923101514</value>

    </unpack>

    <unpack fld="11" packager="org.jpos.iso.IFA_NUMERIC">

      <value>199020</value>

    </unpack>

    <unpack fld="12" packager="org.jpos.iso.IFA_NUMERIC">

      <value>2203151340S</value>

    </unpack>

    <unpack fld="15" packager="org.jpos.iso.IFA_NUMERIC">

      <value>cScC</value>

    </unpack>

    <unpack fld="19" packager="org.jpos.iso.IFA_NUMERIC">

      <value>ƒ</value>

    </unpack>

    <unpack fld="22" packager="org.jpos.iso.IFA_NUMERIC">

      <value>c#3CSc#sC</value>

    </unpack>

    <unpack fld="24" packager="org.jpos.iso.IFA_NUMERIC">

      <value>3S</value>

    </unpack>

    <unpack fld="26" packager="org.jpos.iso.IFA_NUMERIC">

      <value>3ƒ#”</value>

    </unpack>

    <unpack fld="28" packager="org.jpos.iso.IFA_NUMERIC">

      <value>ÔUD#“</value>

    </unpack>

    error unpacking field 32 consumed=118

    <iso-exception>

      org.jpos.iso.IFA_LLNUM: Problem unpacking field 32

      <nested-exception>

      java.lang.NegativeArraySizeException: -447

    at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:56)

    at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:180)

    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:255)

    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:460)

    at TryKaro.testPostilion(TryKaro.java:35)

    at TryKaro.main(TryKaro.java:22)

      </nested-exception>

      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking field 32 (java.lang.NegativeArraySizeException: -447)

    at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:185)

    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:255)

    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:460)

    at TryKaro.testPostilion(TryKaro.java:35)

    at TryKaro.main(TryKaro.java:22)

Nested:java.lang.NegativeArraySizeException: -447

    at org.jpos.iso.AsciiInterpreter.uninterpret(AsciiInterpreter.java:56)

    at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:180)

    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:255)

    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:460)

    at TryKaro.testPostilion(TryKaro.java:35)

    at TryKaro.main(TryKaro.java:22)

    </iso-exception>

    <iso-exception>

      org.jpos.iso.IFA_LLNUM: Problem unpacking field 32 (java.lang.NegativeArraySizeException: -447) unpacking field=32, consumed=118

      org.jpos.iso.ISOException: org.jpos.iso.IFA_LLNUM: Problem unpacking field 32 (java.lang.NegativeArraySizeException: -447) unpacking field=32, consumed=118

    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:284)

    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:460)

    at TryKaro.testPostilion(TryKaro.java:35)

    at TryKaro.main(TryKaro.java:22)

    </iso-exception>

      X<isomsg direction="none">

X  <!-- org.jpos.iso.packager.GenericPackager[path to your packager] -->

X  <field id="0" value="1200"/>

X  <field id="bitmap" value="{1, 2, 3, 4, 7, 11, 12, 15, 19, 22, 24, 26, 28, 32, 33, 37, 41, 43, 49, 60, 100, 103, 127, 128}" type="bitmap"/>

X  <field id="2" value="5614811918382893"/>

X  <field id="3" value="270000"/>

X  <field id="4" value="000000000200"/>

X  <field id="7" value="0923101514"/>

X  <field id="11" value="199020"/>

X  <field id="12" value="2203151340&#19;S"/>

X  <field id="15" value="&#3;cSc&#19;C"/>

X  <field id="19" value="ƒ&#19;&#3;"/>

X  <field id="22" value="c&#19;#3CSc#&#3;sC&#19;"/>

X  <field id="24" value="3&#3;S"/>

X  <field id="26" value="3ƒ#”"/>

X  <field id="28" value="ÔUD#“&#3;"/>

X</isomsg>

Go field by field, see the data for the field and if it's valid. If it's not valid fix the packager for the field and repeat. 

I believe your hexdump does not look right with those ScS’ in it.

-chhil

Mapfunde Venon

unread,
Mar 16, 2022, 3:19:23 AM3/16/22
to jpos-...@googlegroups.com
Finally got it with this packager:


            id="127"
            length="99999"
            name="RESERVED PRIVATE USE"
            class="org.jpos.iso.IFA_LLLLLCHAR"
    />


    <isofield
            id="128"
            length="999"
            name="MAC 2"
            class="org.jpos.iso.IFA_LLLCHAR"/>
</isopackager>
Venon Mapfunde(PMP,Msc Software Engineering,Bsc Computer Science & Mathematics)
Tel:+263 775 091 262
Email:taka...@gmail.com
Skype: venon.mapfunde

--
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/f8592b55-75c4-4432-b180-8c918b5e2feen%40googlegroups.com.

murtuza chhil

unread,
Mar 22, 2022, 1:00:17 AM3/22/22
to jPOS Users
I am not sure what you changed but the new packager and hex dump you previously provided still don't work in the test code I had provided.

There must have been more changes than the packager itself.
Since it works for you that's good, but what fixed your issue is not completely represented in your response.
-chhil

Reply all
Reply to author
Forward
0 new messages