Non Standard Field 127 Problem (not a bitmap but a IFA_LLLCHAR)

74 views
Skip to first unread message

chhil

unread,
Mar 23, 2007, 4:33:32 PM3/23/07
to jpos-...@googlegroups.com
Hi

My packager has field 127 defined as             new IFA_LLLCHAR (999, "Authorization Code") and I set that in my bsh file used for simulating the host. But somewhere internally it expects 127 to be a IFA_LLLBinary. My host message does not use 127 as a bitmap field, how do I go around this exception.




<log realm="Q2.system" at="Fri Mar 23 16:23:11 EDT 2007.509">
  <info>
    Q2 started, deployDir=C:\workspace\JposEE\buil
d\deploy
  </info>
</log>
<log realm="Q2.system" at="Fri Mar 23 16:23:11 EDT 2007.539">
  <info>
    deploy:2.xml
  </info>
</log>
<log realm="HOST.server" at="Fri Mar 23 16:23:11 EDT 2007.909">
  <iso-server>
    listening on port 41111
  </iso-server>
</log>
<log realm="HOST.server.session/127.0.0.1" at="Fri Mar 23 16:23:14 EDT 2007.7
33">
  <session-start/>
</log>
<log realm="HOST.server.channel/127.0.0.1:2359" at="Fri Mar 23 16:23:17 EDT 2
007.287">
  <receive>
    <isomsg direction="incoming">
      <field id="0" value="0200"/>
      <field id="3" value="930000"/>
      <field id="4" value="123456789012"/>
      <field id="7" value="0323162317"/>
      <field id="11" value="123456"/>
      <field id="12" value="162317"/>
      <field id="13" value="0323"/>
      <field id="15" value="0323"/>
      <field id="41" value="00012345"/>
      <field id="42" value="ABCDEFG 1234567"/>
      <field id="48" value="0001000000010000"/>
    </isomsg>
  </receive>
</log>
<log realm="HOST.server.channel/127.0.0.1:2359" at="Fri Mar 23 16:23:17 EDT 2
007.457">
  <send>
    <isomsg direction="outgoing">
      <field id="0" value="0210"/>
      <field id="3" value="930000"/>
      <field id="4" value="123456789012"/>
      <field id="7" value="0323162317"/>
      <field id="11" value="123456"/>
      <field id="12" value="162317"/>
      <field id="13" value="0323"/>
      <field id="15" value="0323"/>
      <field id="39" value="00"/>
      <field id="41" value="00012345"/>
      <field id="42" value="ABCDEFG 1234567"/>
      <field id="48" value="0001000000010000"/>
      <field id="127" value="000000000"/>
    </isomsg>
    <iso-exception>
      org.jpos.iso.IFA_LLLBINARY: Problem packing field 127
      <nested-exception>
      java.lang.ClassCastException: java.lang.String
        at org.jpos.iso.ISOBinaryFieldPackager.pack(ISOBinaryFieldPackager.java:
136)
        at org.jpos.iso.ISOMsgFieldPackager.pack(ISOMsgFieldPackager.java :91)
        at org.jpos.iso.ISOBasePackager.pack(ISOBasePackager.java:142)
        at org.jpos.iso.ISOMsg.pack(ISOMsg.java:311)
        at org.jpos.iso.BaseChannel.send(BaseChannel.java:458)
        at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at bsh.Reflect.invokeMethod(Unknown Source)
        at bsh.Reflect.invokeObjectMethod(Unknown Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.BSHMethodInvocation.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at org.jpos.bsh.BSHRequestListener.process(BSHRequestListener.java:120)
        at org.jpos.iso.ISOServer$Session.run(ISOServer.java:126)
        at org.jpos.util.ThreadPool$PooledThread.run (ThreadPool.java:100)
      </nested-exception>

I am using jposee, with the
<request-listener class="org.jpos.bsh.BSHRequestListener" logger="Q2">
<property name="source" value="cfg/serversimulator.bsh" />


serversimulator.bsh
message.setResponseMTI ();
Random random = new Random (System.currentTimeMillis());
message.set (39, "00");
message.set (127, "000000000");
source.send (message);


Any help is appreciated.

Alejandro Revilla

unread,
Mar 23, 2007, 4:41:48 PM3/23/07
to jpos-...@googlegroups.com
>
> My packager has field 127 defined as new IFA_LLLCHAR (999,
> "Authorization Code") and I set that in my bsh file used for simulating the
> host. But somewhere internally it expects 127 to be a IFA_LLLBinary. My host
> message does not use 127 as a bitmap field, how do I go around this
> exception.
>
You need to either change your host packager to use IFA_LLLCHAR or
convert it to a binary field within your code, i.e:

m.set (127, myothermsg.getString(127).getBytes());

--Alejandro

chhil

unread,
Mar 23, 2007, 4:51:32 PM3/23/07
to jpos-...@googlegroups.com
Hi Alejandro,

My host packager already has it defined as IFA_LLLCHAR and I don't have any IFA_LLLBinary in my packager.

I am trying to use the jposee as a out of the box simulator right now.

-chhil

chhil

unread,
Mar 23, 2007, 5:10:02 PM3/23/07
to jpos-...@googlegroups.com
Hello,

m.set (127, myothermsg.getString(127).getBytes()); seems to work from the script but I am a little confused now.

My packager defines 127 it as IFA_LLLCHAR , its being sent as    
 <field id="127" value="303030303030303030" type="binary"/> and no one complains of the data types not matching?



-chhil

On 3/23/07, Alejandro Revilla <a...@jpos.org> wrote:

Alejandro Revilla

unread,
Mar 23, 2007, 5:13:05 PM3/23/07
to jpos-...@googlegroups.com
>
> My packager defines 127 it as IFA_LLLCHAR , its being sent as
> <field id="127" value="303030303030303030" type="binary"/> and no one
> complains of the data types not matching?
>
You can fix this by changing your client simulator isomsg definition to
something like:

<field id="127" value="000000000" />

the client simulator internally uses XMLPackager to parse the messages
to be sent, so the 'type="binary"' in your field 127 definition
generates an ISOMsg with a binary field 127.

If you remove that 'type="binary"' attribute you'd be all set.

--Alejandro

chhil

unread,
Mar 24, 2007, 12:16:54 AM3/24/07
to jpos-...@googlegroups.com
Thanks Alejandro....


On 3/23/07, Alejandro Revilla <a...@jpos.org> wrote:
Reply all
Reply to author
Forward
0 new messages