1

当我向服务器发送请求时,在服务器日志中我得到了正确的结果。这是我对服务器的请求如下

ISOMsg isoMsg = new ISOMsg();
            isoMsg.setMTI(Constants.RequestType.MESSAGE_REQUEST.getValue());
            isoMsg.set(3,Constants.Services.DEPOSIT_FUNDS_REQUEST.getValue());
            isoMsg.set(4, depositFundRequest.getAmount().toString());
            isoMsg.set(7, ISODate.getDateTime(today, TimeZone.getTimeZone("GMT+03")));
            isoMsg.set(11, ServiceUtils.generate(6));
            //isoMsg.set(12, "100629072055");
            isoMsg.set(17, ISODate.getDate(today));
            //isoMsg.set(24, "200");
            isoMsg.set(32, "111111");
            //isoMsg.set(35, "6278519999011712");
            isoMsg.set(37, ServiceUtils.generate(12));
            //isoMsg.set(41, "TERMID01");
            //isoMsg.set(43, "11");
            isoMsg.set(46,"00KESD000000000000500000000000D0000000000000000KES");
            isoMsg.set(49,"KES");
            isoMsg.set(102,depositFundRequest.getAccount());
            isoMsg.set(123, userContextService.getCurrentUser());//UserId
            isoMsg.set(126,Constants.Field126.CASH_IN.getValue());
            channel.send (isoMsg);
            ISOMsg responseMsg = channel.receive ();

但是,当在客户端传入时,我得到了以下异常。

 org.jpos.iso.ISOException: org.jpos.iso.IFA_LLCHAR: Problem unpacking field 43 (java.lang.NegativeArraySizeException) unpacking field=43, consumed=97

我正在使用 ASCII 打包器和 BCD 通道,请帮我解决异常

4

1 回答 1

1

您可以org.jpos.iso.IFE_LLCHAR在打包程序中使用字段 43。

于 2012-11-17T14:26:29.233 回答