解壓字段時發生異常,當我向服務器發送請求時,在服務器日誌中,我得到正確的結果。這是我對服務器的要求如下在JPOS
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通道,請幫我解決異常
在你的答案中是否真的有解決方案? – 2014-02-25 05:39:35