kpavlov / jreactive-8583

Kotlin/Java Client & Server for ISO8583 & Netty
Apache License 2.0
320 stars 146 forks source link

No parsing guide for 8020, 8030, 8040... message types #125

Closed danicaliforrnia closed 2 years ago

danicaliforrnia commented 3 years ago

Hi Pavlov,

I'm getting an exception after 8010 response message as follow:

java.text.ParseException: ISO8583 MessageFactory has no parsing guide for message type 0820 [082082200000020000000400000000000000030118024102512900301]

If I add a 0820 template in the j8583.xml file then the same exception is thrown but for 0830, then, as you add more message type templates, the error is thrown again but for 08XX where XX is the last template in the xml file plus 10 (0840, 0850, ...).

What could be causing this issue?

kpavlov commented 3 years ago

Hi, I would suggest trying to test parsing guide against the j8583 library. My library does not deal with message parsing, it's responsibility of the MessageFactory

danicaliforrnia commented 3 years ago

Thanks for your answer,

but do you know why is 0820 message auto-generated after 0810 response?

kpavlov commented 3 years ago

What are those messages? Echos?

danicaliforrnia commented 3 years ago

Yes, they are.

danicaliforrnia commented 3 years ago

Also, I'm not able to use headers in my ISO messages. j8583 MessageFactory receives 0 as the iso header length causing an ParseException.

danicaliforrnia commented 3 years ago

The problem seems to be with the Iso8583Decoder wich passes 0 as the isoHeaderLength need it in the MessageFactory, because of that the ParseException is thrown.

pandans commented 3 years ago

The problem seems to be with the Iso8583Decoder wich passes 0 as the isoHeaderLength need it in the MessageFactory, because of that the ParseException is thrown.

has found any ways to slove it ?

danicaliforrnia commented 3 years ago

The problem seems to be with the Iso8583Decoder wich passes 0 as the isoHeaderLength need it in the MessageFactory, because of that the ParseException is thrown.

has found any ways to slove it ?

I created a CustomMessageFactory class inheriting from MessageFactory where I pass the isoHeaderLength param in the parse method and implement this CustomMessageFactory in the client/server configuration.