Hi to all,
I'm getting a hard time to find out why I'm getting this error when try to read a message from host:
"org.jpos.iso.ISOException: Invalid message length"
I know this is a problem with the length of the message, but according to the host LOG the message is ok. This is my channel:
<?xml version="1.0" encoding="UTF-8"?>
<channel-adaptor class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2"
<channel class="org.jpos.iso.channel.ASCIIChannel"
packager="org.jpos.iso.packager.ISO87APackager"
header="020131129223100ISO0060000450000"
<property name="host" value="localhost"/>
<property name="port" value="1717" />
I'm able to send the message ok, but when I got the response I got the length error, the message from host is:
<00880082020131129233809ISO006000045081082200000020000000400000000000000092521031601530100301>
According to the ASCIIChannel the first 4 bytes are the length (0088), then the header and the ISO message, and I think is ok.
do I'm missing something? any help?
Thanks in advance.
...q2.log...
<receive>
<isomsg direction="incoming">
<!-- org.jpos.iso.packager.ISO87APackager -->
<header>3030383230323031333131323932333338303949534F303036303030303435</he
ader>
<field id="0" value="0810"/>
<field id="7" value="0925210316"/>
<field id="11" value="015301"/>
<field id="39" value="00"/>
<field id="70" value="301"/>
</isomsg>
</receive>
</log>
<log realm="channel/
127.0.0.1:1717" at="Fri Nov 29 23:38:09 BOT 2013.224">
<receive>
<iso-exception>
Invalid message length
org.jpos.iso.ISOException: Invalid message length
at org.jpos.iso.channel.ASCIIChannel.getMessageLength(ASCIIChannel.java:
103)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:665)
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:319)
at java.lang.Thread.run(Thread.java:722)
</iso-exception>
</receive>
</log>