Prabuddha
Prabuddha

Reputation: 21

Unable to upack ISO 8583 F137 using JPOS

I'm trying to introduce F137 to my ISO 8583 processing. I'm using following xml configurations in packing and unpacking the ISO message for f137.

<isofield
id="137"
length="2"
name="Application Transaction Counter"
class="org.jpos.iso.IFB_BINARY"/>

I'm able to pack the F137 where I'm able to see F137 in outgoing message,

<send>
    <isomsg direction="outgoing">

        <header>16010201E10000000000000000000000000000000000</header>
      <field id="0" value="0210"/>
      <field id="2" value="933456______7663"/>
      <field id="4" value="000000000200"/>
      <field id="7" value="0906144357"/>
      <field id="11" value="123456"/>
      <field id="12" value="144357"/>
      <field id="13" value="0906"/>
      <field id="18" value="6012"/>
      <field id="19" value="356"/>
      <field id="22" value="0911"/>
      <field id="25" value="59"/>
      <field id="28" value=" 5       "/>
      <field id="32" value="441370"/>
      <field id="37" value="727523083909"/>
      <field id="38" value="231043"/>
      <field id="39" value="00"/>
      <field id="41" value="     101"/>
      <field id="42" value="CA-IDCode-77765"/>
      <isomsg id="43">
        <!-- org.jpos.iso.packager.GenericSubFieldPackager -->
        <field id="1" value="Acceptor 11              "/>
        <field id="2" value="NW           "/>
        <field id="3" value="IN"/>
      </isomsg>
      <isomsg id="44">
        <field id="15" value="4233"/>
      </isomsg>
      <field id="48" value="          3"/>
      <field id="49" value="356"/>
      <field id="55" value="AA55AA55" type="binary"/>
      <field id="59" value="CA123700052"/>
      <field id="60" value="9100F0000500" type="binary"/>
      <isomsg id="62">
        <!-- org.jpos.iso.packager.GenericSubFieldPackager -->
        <field id="1" value="1"/>
        <field id="2" value="153621623779500"/>
        <field id="7" value="11234123412341234123412345"/>
        <field id="20" value="0000909090"/>
      </isomsg>
      <isomsg id="63">
        <!-- org.jpos.iso.packager.Base1SubFieldPackager -->
        <field id="13" value="02F0F0"/>
        <field id="19" value="210"/>
      </isomsg>
      <field id="102" value="00023830"/>
      <field id="104" value="5700040102D7D75F00761006F0F6F5F4F3F40105F1F2F3F4F50210F6F5F4F3F2F1F0F0F0F0F3F3F4F2F3F3030997998182A4848488810404A385A2A30509A289958781979699850602E2D50709A289958781979699850802F0F10A0ED985838997898595A340D58194850C09A289958781979699850D09A28995878197969985" type="dataset" />
      <field id="119" value="35623"/>
      <!-- 123{ 68{02:10, 03:12321232123, 04:123412341}} -->
      <field id="123" value="68001C0202F1F0030BF1F2F3F2F1F2F3F2F1F2F30409F1F2F3F4F1F2F3F4F1" type="dataset" />
      **<field id="137" value="1232" type="binary"/>**
    </isomsg>
  </send>

but during unpacking jpos throws following exception.

<session-error>
    <iso-exception>
      org.jpos.iso.IFB_LLHNUM: Problem unpacking field 32 (org.jpos.iso.ISOException: Field length 96 too long. Max: 11) unpacking field=32, consumed=54
      org.jpos.iso.ISOException: org.jpos.iso.IFB_LLHNUM: Problem unpacking field 32 (org.jpos.iso.ISOException: Field length 96 too long. Max: 11) unpacking field=32, consumed=54
    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:265)
    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:420)
    at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:924)
    at org.jpos.iso.BaseChannel.receive(BaseChannel.java:692)
    at org.jpos.iso.ISOServer$Session.run(ISOServer.java:155)
    at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:72)
    </iso-exception>

Does JPOS support fields greater than F128. Btw Application works properly without F137.

Upvotes: 1

Views: 511

Answers (1)

apr
apr

Reputation: 1343

ISO-8583 defines 128 fields. Systems that use fields beyond 128 are quite unusual, and weird (I see this sample message seems to come from Bhutan). That said, jPOS supports them. I suggest you search the jPOS forum for the keyword 'tertiary bitmap':

https://groups.google.com/forum/#!searchin/jpos-users/tertiary$20bitmap%7Csort:date

Upvotes: 1

Related Questions