Problem unpack field 49

100 views
Skip to first unread message

Rajat

unread,
Nov 23, 2012, 2:19:04 AM11/23/12
to jpos-...@googlegroups.com
Hi,

I am using iso87ascii-binary-bitmap.xml as Packager.

I am able to pack the data which looks like:

30323130F23844810AC080000000000000000100313939303232303031303039393836303336343
83439303030303030303030303030393435303031323131313235373438303030303031313235373
4383132313136303131393031303030363130393031323233323031323030303030313338414E423
031303830414E4237323939303031303830202033353631323430303130303234353030323030334
D4F4230343530303576656E6B693034363032302D20436F6C6120496E646961204C696D6974656
4303530303137393032323030313939383630323634383430353130303772656D61726B733035363
030334D4F4230363230313939303232303031303039393836303336343834

and my ISOMsg looks like:

----ISO MESSAGE-----
    MTI : 0210
    Field-0 : 0210
    Field-2 : 9022001009986036484
    Field-3 : 900000
    Field-4 : 000000094500
    Field-7 : 1211125748
    Field-11 : 000001
    Field-12 : 125748
    Field-13 : 1211
    Field-18 : 6011
    Field-22 : 901
    Field-25 : 00
    Field-32 : 109012
    Field-37 : 232012000001
    Field-39 : 38
    Field-41 : ANB01080
    Field-42 : ANB7299001080 
    Field-49 : 356
    Field-120 : 00100245002003MOB045005venki046020- Cola India Limited05001790220019986026484051007remarks056003MOB0620199022001009986036484
--------------------

But when I am unpacking same data I get an Exception which says:

error unpacking field 49
org.jpos.iso.ISOException: org.jpos.iso.IF_CHAR: Problem unpacking field 49 (java.lang.StringIndexOutOfBoundsException: String index out of range: 270)
    at org.jpos.iso.ISOStringFieldPackager.unpack(ISOStringFieldPackager.java:178)
    at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:233)
    at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:344)
    at com.logica.ngph.utils.TestPack.main(TestPack.java:82)


Please help I am Stucked Now, unable to identify what is the root cause.


Regards,
Rajat






















































































Victor Salaman

unread,
Nov 23, 2012, 2:19:50 AM11/23/12
to jpos-...@googlegroups.com
Hi:

Your message (from the hex dump) unpacks just fine to:

<isomsg>
  <!-- org.jpos.iso.packager.GenericPackager[cfg/packager/iso87ascii-binary-bitmap.xml] -->
  <field id="0" value="0210"/>
  <field id="2" value="9022001009986036484"/>
  <field id="3" value="900000"/>
  <field id="4" value="000000094500"/>
  <field id="7" value="1211125748"/>
  <field id="11" value="000001"/>
  <field id="12" value="125748"/>
  <field id="13" value="1211"/>
  <field id="18" value="6011"/>
  <field id="22" value="901"/>
  <field id="25" value="00"/>
  <field id="32" value="109012"/>
  <field id="37" value="232012000001"/>
  <field id="39" value="38"/>
  <field id="41" value="ANB01080"/>
  <field id="42" value="ANB7299001080  "/>
  <field id="49" value="356"/>
  <field id="120" value="00100245002003MOB045005venki046020- Cola India Limited05001790220019986026484051007remarks056003MOB0620199022001009986036484"/>
</isomsg>

So you must be doing something wrong.

/V


November 23, 2012 3:19 AM
--
--
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 "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
 
 
 
Reply all
Reply to author
Forward
0 new messages