kpavlov / jreactive-8583

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

Iso8583Decoder doesn't handle messages with header #41

Open ouadi opened 6 years ago

ouadi commented 6 years ago

The Iso8583Decoder doesn't handle messages with header.

The parseMessage() at line 29 in Iso8583Decoder final IsoMessage isoMessage = messageFactory.parseMessage(bytes, 0);

Is called with second argument set to 0.

Shouldn't be called with second argument set to the length of the header?

ouadi commented 6 years ago

Well, the j8583 library doesn't help much in this case. The MessageFactory requires that the user should know beforehand whether the header is present or not and in case it is present, he should know its length and type (ascii or binary).

I have created an enhancement request for our friends in j8583.

In case the enhancement is accepted, there will be:

I will post updated on my request here once it is resolved.

kpavlov commented 6 years ago

@ouadi, thank you for investigation

kpavlov commented 5 years ago

j8583 repo has moved here: https://bitbucket.org/chochos/j8583 The most recent release is still 1.12.0, but there is some activity there

danicaliforrnia commented 3 years ago

The Iso8583Decoder doesn't handle messages with header.

The parseMessage() at line 29 in Iso8583Decoder final IsoMessage isoMessage = messageFactory.parseMessage(bytes, 0);

Is called with second argument set to 0.

Shouldn't be called with second argument set to the length of the header?

Hi ouadi, did you find a solution for this?

ouadi commented 3 years ago

Yes, indeed

It has been long time

I remember very vaguely the solution I have implemented

I will share with you what I recall, but it could be incomplete:

Hope this will help