我正在尝试将F137引入我的ISO 8583处理中。在打包和解压缩f137的ISO消息时,我使用了以下xml配置。
<isofield
id="137"
length="2"
name="Application Transaction Counter"
class="org.jpos.iso.IFB_BINARY"/>
我可以将F137打包在外发消息中可以看到F137的位置,
<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>
,但是在解压jpos期间会引发以下异常。
<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>
JPOS支持的字段是否大于F128。 Btw应用程序无需F137即可正常运行。