我正在开发一个双向适配器,它对 ISO8583 消息应用一些转换并将其发送到另一端。但是适配器的一侧发送没有位图的消息。
2019-01-26 13:38:27,774 ChannelServerEndpoint.run() Can't parse request 1804179121190126120635801
在 MIT(1804) 之后的实际场景中,我应该有 8 或 16 个十六进制数字作为位图。像这个:
Sending request: 163726, ISO Message: <br/>**18040030010000000000163726190123065952831**<br/>
TYPE: 1804<br/>
F 11(NUMERIC): 163726 -> '163726'<br/>
F 12(DATE12): 190123065952 -> '190123065952'<br/>
F 24(NUMERIC): 831 -> '831'<br/>
我正在使用 J8583。
try {
log.debug(String.format("Parsing incoming: '%s'", new String(
data)));
// incoming message
IsoMessage incomingMessage = messageFactory.parseMessage(data, NetworkInterfaceConfiguration.MESSAGE_HEADER_LENGTH);
// System.out.printf("Message TYPE: %s", messageType);
MessageTransformer transformer = new MessageTransformer(incomingMessage);
transformer.run();
if (transformer.getIsoMessage() != null) {
System.out.println("We are before assigning transformations");
transformedMessage = transformer.getIsoMessage();
} else {
log.error("Transformation is failed.");
}
IsoMessageUtil.printIsoMessage(transformedMessage);
log.info("Firing Message to Dist....");
ChannelClientEndpint.fireMessage(transformedMessage);
} catch (ParseException ex) {
log.error(String.format("Can't parse request %s", new String(data)));
throw new UnknownError(ex.getMessage());
} catch (IOException ex) {
log.error("Writing response", ex);
throw new UncheckedIOException(ex.getMessage(), ex);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
throw new UnknownError(ex.getMessage());
}
你能帮我解决这个问题吗?