[jpos-users] No response from JPOS server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jpos-users] No response from JPOS server

chanika sandeepani
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

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
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 | Threaded
Open this post in threaded view
|

Re: [jpos-users] No response from JPOS server

chhil
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

On Fri, Aug 11, 2017 at 2:41 PM, chanika sandeepani <[hidden email]> wrote:
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

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefBGgjdh%2BNZqFVKuNoae7G43y18kPmgxtbm%3DPeY81fpvFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.