1

I'm sending following 0800 request from my jpos client.

   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);
        }
    }

system audit number is generated as:

public String getSystemAuditNumber() {
    int stan = new Random().nextInt(900000);
    return ISOUtil.zeropad(stan, 6);
}

A sample request is:

<log realm="channel/xxx.xxx.xx.xxx:port" at="Thu Aug 10 14:12:32 IST 2017.175" lifespan="78ms">
  <send>
    <isomsg direction="outgoing">
      <!-- org.jpos.iso.packager.GenericPackager[D:/location/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 I do not get any response (response is null) from the jpos server and the client times out. I do not have a way to see the server's logs or debug it. Can someone please help me on this.

Chanikag
  • 1,419
  • 2
  • 18
  • 31
  • 1
    You need a feedback from the people managing the server, otherwise you are totally blind, the only thing you can do is to be sure you are using the correct packager and channel according to the server specs. – Andrés Alcarraz Aug 14 '17 at 17:29
  • 1
    Thanks Andres. Found out the reason. The header value for the channel contains spaces. For an example the header is: "ISOHEADER ". When I configure it in the channel adaptor configuration, it seems it trims the header value. Is there any way to configure a header with spaces? – Chanikag Aug 15 '17 at 04:30
  • created separate SO issue: https://stackoverflow.com/questions/45709755/how-to-configure-jpos-channel-header-with-spaces – Chanikag Aug 16 '17 at 09:23

1 Answers1

0

If you don't have option to get logs from the server, the best option is to go for network sniffer such as Wireshark.

This can help you to understand what is going on (TCP packet level).

Amit Vujic
  • 1,632
  • 1
  • 24
  • 32