Actually i'm working with iso 8583 messages, and library j8583 in java.
I created a echo (0800) message to probe connection with the server, the message looks good when is printed, but in the server side the message looks like hexadecimal encoding, something like this:
The devs in the server side told me is a format error for message, the correct message will be like this:
I see the correct message format are transmitted clearly like above image.
Factory from xml field:
this.messageFactory = ConfigParser.createFromClasspathConfig("j8583-config.xml");
Iso message setting binary flags
req.setBinaryFields(true);
req.setBinaryHeader(true);
XML configuration:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE j8583-config PUBLIC "-//J8583//DTD CONFIG 1.0//EN" "http://j8583.sourceforge.net/j8583.dtd">
<j8583-config>
<!-- These are the ISO headers to be prepended to the message types specified -->
<header type="0800">6000050000</header>
<header type="0810">6000050000</header>
<template type="0800">
<field num="3" type="NUMERIC" length="6" />
<field num="7" type="DATE10" />
<field num="11" type="NUMERIC" length="6" />
<field num="24" type="NUMERIC" length="3" />
<field num="41" type="ALPHA" length="8" />
<field num="42" type="ALPHA" length="15" />
<field num="60" type="LLLLVAR" length="" />
</template>
<parse type="0800">
<field num="3" type="NUMERIC" length="6" />
<field num="7" type="DATE10" />
<field num="11" type="NUMERIC" length="6" />
<field num="24" type="NUMERIC" length="3" />
<field num="41" type="ALPHA" length="8" />
<field num="42" type="ALPHA" length="15" />
<field num="60" type="LLLLVAR" length="" />
</parse>
</j8583-config>
IsoMessage build:
final IsoMessage req = this.messageFactory.newMessage(NET_INFO_REQUEST.getValue());
req.setValue(PROCESSING_CODE, ECHO.getValue(), IsoType.NUMERIC, 6);
req.setValue(TRANSMISSION_DATE_TIME, FormatUtils.formatDate10GMT0(new Date()), IsoType.DATE10, 0);
req.setValue(SYSTEM_TRACE_AUDIT_NO, leftPad(simpleTraceGenerator.nextTrace(), 6), IsoType.NUMERIC, 6);
req.setValue(INTERNATIONAL_NETWORK_ID, command.VISA.getCode(), IsoType.NUMERIC, 4);
req.setValue(TERMINAL_ID, "72024092", IsoType.ALPHA, 8);
req.setValue(CLIENT_CODE, "03659307 ", IsoType.ALPHA, 15);
req.setValue(SOFTWARE_VERSION, "OPv1", IsoType.LLLLVAR, 0);
req.setBinary(fale);
Can help me?
Seems there's more than one problem with the message you're generating:
<header type="800" binary="true">60011200</header>
) or you can set it programatically.Hope that helps!