How to parse hex ISO8583 message with J8583?

800 Views Asked by At

I have tried different ways but they were not useful.

//parsing data from config file
messageFactory = ConfigParser.createFromClasspathConfig(CONFIG_FILE_PATH);
//messageFactory.setForceStringEncoding(true);
//messageFactory.setCharacterEncoding("utf-8");

IsoMessage incomingMessage = messageFactory.parseMessage(data, NetworkInterfaceConfiguration.MESSAGE_HEADER_LENGTH);
1

There are 1 best solutions below

0
On

When you say hex, do you mean binary? If so, you need to set the message factory to use binary messages. This means it will expect the message type to be in the first 2 bytes, then the primary bitmap in the next 8 bytes, secondary (if any) in the next 8 bytes, etc.

By default it's not set to read/write binary messages.