No response from JPOS server

80 views
Skip to first unread message

chanika sandeepani

unread,
Aug 11, 2017, 9:33:51 AM8/11/17
to jPOS Users
My client code is;


private void
sendLonOnRequest() {
ISOMsg logOnMessage = null;
try {
      Object sessionId = sp.rd(cfg.get(READ_KEY), cfg.getLong(TIME_OUT));
      if (sessionId != null) {
logOnMessage = new ISOMsg();
logOnMessage.setMTI("0800");
logOnMessage.set(7, ISODate.getDateTime(new Date()));
logOnMessage.set(11, getSystemAuditNumber());
logOnMessage.set(70, "001");
logOnMessage.set(125, "EFT");
ISOMsg response = mux.request(logOnMessage, 30000);
if (response != null) {
sp.out(ECHO, new Object(), echoInterval);
handleSuccess(logOnMessage);
} else {
log.info("############ RESPONSE NULL");
handleFailure(logOnMessage, null);
}
      }
} catch (ISOException e) {
handleFailure(logOnMessage, e);
}
}

and the getSystemAuditNumber()

public String getSystemAuditNumber() {
Random rnd = new Random();
int randomNum = rnd.nextInt(99999);
return ISOUtil.zeropad(randomNum, 6);
}

A sample request from client to jpos server is:

<log realm="channel/xxx.xxx.xx.xxx:yyyy" at="Thu Aug 10 14:12:32 IST 2017.175" lifespan="78ms">
  <send>
    <isomsg direction="outgoing">
      <!-- org.jpos.iso.packager.GenericPackager[D:/path/to/packager/iso87ascii.xml] -->
      <field id="0" value="0800"/>
      <field id="7" value="0810141232"/>
      <field id="11" value="022887"/>
      <field id="70" value="001"/>
      <field id="125" value="EFT"/>
    </isomsg>
  </send>
</log>

But the client does not receive any response. Any idea on this matter?

Thanks

chhil

unread,
Aug 11, 2017, 10:04:38 AM8/11/17
to jpos-...@googlegroups.com
Before sending the message check that the mux.connected return true.
In your mux deplo, have you configured the key element ( the ones to match a response to a request)? Basically if its not configured it matches on fields 11 and 41.
Are you sure the remote has understood your message and responding to it? Basically if you send me Greek and I don't speak it, I wont respond back to you. Make sure the channel logic (prepending length etc is what is expewcted and the fields are packed in formats as expected). 

For the stan, you can use something inbuilt like ISOUtil.zeropad(Long.toString(SpaceUtil.nextLong(sp, "STAN") % 1000000L), 6);

I would like to see the whole log if possible.

-chhil

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/2a7ddf45-d598-4396-ac8b-d56c8b5c8646%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages