UNABLE TO PROCESS RAW ISO8583 REQUEST WITH Q2

253 views
Skip to first unread message

SAHEED YUSUF

unread,
Jun 5, 2020, 8:45:52 AM6/5/20
to jPOS Users
Hi,

I am trying to process an ISO raw request A4M080000800822000000000000004000000000000000605083006079971001. The header is of two bytes (A4M08000). See the channels configuration below :

<server class="org.jpos.q2.iso.QServer" logger="Q2" name="xml-server-7004" realm="xml-server-7004">
<attr name="port" type="java.lang.Integer">7004</attr>
<channel class="org.jpos.iso.channel.ASCIIChannel"
packager="org.jpos.iso.packager.ISO87APackager"
type="server"
logger="Q2"
realm="xml-server-7004">
<property name="timeout" value="180000"/>
</channel>
<request-listener class="com.listeners.RequestListener" logger="Q2" realm="incoming-request-listener">
<property name="queue" value="TXNMGR" />
<property name="ctx.DESTINATION" value="jPOS-AUTORESPONDER" />
</request-listener>
</server>



<?xml version="1.0" encoding="UTF-8"?>

<server class="org.jpos.q2.iso.QServer" logger="Q2" name="server_incoming">

<attr name="port" type="java.lang.Integer">10000</attr>
<channel class="org.jpos.iso.channel.ASCIIChannel"
logger="Q2"
packager="org.jpos.iso.packager.ISO87APackager">
</channel>

<request-listener class="com.listeners.RequestListener" logger="Q2">
</request-listener>

</server>


When I did telnet to the Server, localhost:7004 and sent this request A4M080000800822000000000000004000000000000000605083006079971001, I got timeout error. 

Everything is fine when I was using XMLChannel and XMLPackager but the client needs to send the raw ISO message in this format A4M080000800822000000000000004000000000000000605083006079971001.

Kindly help with this.


Andrés Alcarraz

unread,
Jun 5, 2020, 9:30:10 AM6/5/20
to jpos-...@googlegroups.com, SAHEED YUSUF
Hi Saheed:

ASCIIChannel expects you to send the length before the message, as 4 characters , is the way the channel knows where the messages ends.

In your case you would need to prepend  0063, you need to set the header of 4 bytes in the channel too:



<?xml version="1.0" encoding="UTF-8"?>

<server class="org.jpos.q2.iso.QServer" logger="Q2" name="server_incoming">

    <attr name="port" type="java.lang.Integer">10000</attr>
    <channel class="org.jpos.iso.channel.ASCIIChannel"
            logger="Q2"
             packager="org.jpos.iso.packager.ISO87APackager" header="0000">

    </channel>

    <request-listener class="com.listeners.RequestListener" logger="Q2">
    </request-listener>

</server>

    
Also in this case it seems all you are sending are ASCII characters and telnet may work, but in general is not a good way to send a raw message.

$ nc localhost 10000
0063A4M080000800822000000000000004000000000000000605083006079971001

output of the log:

<log realm="channel/127.0.0.1:60282" at="2020-06-05T08:26:48.434" lifespan="3249ms">
  <receive>
    <isomsg direction="incoming">
      <!-- org.jpos.iso.packager.ISO87APackager -->
      <header>41344D30</header>
      <field id="0" value="8000"/>
      <field id="5" value="000004000000"/>
      <field id="17" value="0000"/>
      <field id="23" value="000"/>
      <field id="27" value="0"/>
    </isomsg>
  </receive>
</log>


Hope this helps



Andres Alcarraz | Transactility, Inc.  | Lima, Perú| e: a...@transactility.com | t: +51 914498384 | sk: alcarraz1976
El 5/6/20 a las 07:45, SAHEED YUSUF escribió:
--
--
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 Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/6ba15963-33da-4801-8c5e-ac3a1cbb9c0fo%40googlegroups.com.

SAHEED YUSUF

unread,
Jun 5, 2020, 9:53:07 AM6/5/20
to jPOS Users
Hi Andres,

Thanks so much for your response. I have appended the request as you mentioned but I got this error.

  </receive>
</log>
<log realm="xml-server-7004.server.session/0:0:0:0:0:0:0:1:56242" at="2020-06-05T14:50:01.106">
  <session-error>
    <iso-exception>
      org.jpos.iso.IF_CHAR: Problem unpacking field 43 (java.lang.StringIndexOutOfBoundsException: String index out of range: 83) unpacking field=43, consumed=43
      org.jpos.iso.ISOException: org.jpos.iso.IF_CHAR: Problem unpacking field 43 (java.lang.StringIndexOutOfBoundsException: String index out of range: 83) unpacking field=43, consumed=43
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:340)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:468)
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:976)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:746)
at org.jpos.iso.ISOServer$Session.run(ISOServer.java:344)
at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:76)
    </iso-exception>
  </session-error>
</log>
<log realm="xml-server-7004.server.session/0:0:0:0:0:0:0:1:56242" at="2020-06-05T14:50:01.110">
  <session-end/>
</log>


Could this be a problem in the data sent?

Also, I will like to know if there is a way I can go about not appending the size (Maybe through another Packager or Channel) because the client application cannot pass that to me?
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-...@googlegroups.com.

Andrés Alcarraz

unread,
Jun 5, 2020, 9:55:40 AM6/5/20
to jpos-...@googlegroups.com
Did you modify the channel as suggested?
             packager="org.jpos.iso.packager.ISO87APackager" header="0000">


Andres Alcarraz | Transactility, Inc.  | Lima, Perú| e: a...@transactility.com | t: +51 914498384 | sk: alcarraz1976
El 5/6/20 a las 08:53, SAHEED YUSUF escribió:
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/f4c428b4-26f8-46c8-94ab-d8bffbd8952eo%40googlegroups.com.

SAHEED YUSUF

unread,
Jun 5, 2020, 10:21:23 AM6/5/20
to jPOS Users
Hi Andres,

Thanks for the response. I didn't modify the header before. Now I have modified it and everything is fine. 

However, is there any way I can process the request without appending the length as the client application will not be appending this?

igor skljar

unread,
Jul 3, 2020, 6:47:18 PM7/3/20
to jPOS Users
>However, is there any way I can process the request without appending the length as the client application will not be appending this?

You can configure TIC(TCI) host(or any other host) in TWO to use server port with ~30 different frames. usually it is frame 6 (L2 L1 )

пятница, 5 июня 2020 г., 17:21:23 UTC+3 пользователь SAHEED YUSUF написал:
Reply all
Reply to author
Forward
0 new messages