[jpos-users] openway (WAY4)

105 views
Skip to first unread message

adhi nugroho

unread,
May 8, 2015, 9:26:55 PM5/8/15
to jpos-...@googlegroups.com
Hello does anyone know what packager and channel use to connect way4?

--
adhi

adhi nugroho

unread,
May 8, 2015, 9:36:00 PM5/8/15
to jpos-...@googlegroups.com
i have some hexa dump sign on from vendor like this

30 38 30 30 82 20 00 00 00 00 00 00 04 00 00 00 00 00 00 00
09 22 10 25 05 10 25 06 03 01

spec tell us to use BCD with definition like this

DE 7:
Value n 
Length 10 
Coding BCD

DE 11
Value n 
Length 6 
Coding BCD

DE 70
Value n 
Length 3 
Coding BCD

with Message Length is 2 byte +  ISO 8583 Message


 
--
adhi

chhil

unread,
May 8, 2015, 11:49:28 PM5/8/15
to jpos-...@googlegroups.com

​​
​​
This is to get you going. I dont know aything about way4, but have put some test code/packager to parse the network message. You will need to go through all fields using a spec (reverse engineering is definitely not the way you should attempt).

NACChannel will handle the 2 byte length prepended to the message.

Packager with 3 fields (test.xml)

<isopackager>
  <isofield
      id="0"
      length="4"
      name="MESSAGE TYPE INDICATOR"
      pad="true"
      class="org.jpos.iso.IF_CHAR"/>
  <isofield
      id="1"
      length="16"
      name="BIT MAP"
      class="org.jpos.iso.IFB_BITMAP"/>
  <isofield
      id="7"
      length="10"
      name="TRANSMISSION DATE AND TIME"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="11"
      length="6"
      name="SYSTEM TRACE AUDIT NUMBER"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
  <isofield
      id="70"
      length="3"
      name="NETWORK MANAGEMENT INFORMATION CODE"
      pad="true"
      class="org.jpos.iso.IFB_NUMERIC"/>
</isopackager>

Test code

        ISOMsg m1 = new ISOMsg();
        byte [] mess= ISOUtil.hex2byte("303830308220000000000000040000000000000009221025051025060301");// from your hexdump
        GenericPackager p1 = new
                GenericPackager("<path to file>\\test.xml");
        m1.setPackager(p1);
        Logger logger1 = new Logger();
        logger1.addListener(new SimpleLogListener(System.out));
        p1.setLogger(logger1, "pkgr");
        m1.unpack(mess);
        m1.dump(System.out, "");

Using the channel (I have not connected or received a connection) but here is a way to get your feet wet.
Ideally you will work with deploy files.

        NACChannel ch = new NACChannel("127.0.0.1", 5656,p,null);
        ch.setPackager(p1);
        ch.setLogger(logger1, "channel");
        ch.connect();
        ch.send(m1);

Output. (please validate the data in the fields, see if they are as expected).

<log realm="pkgr" at="Sat May 09 09:07:19 IST 2015.573" lifespan="59ms">
  <unpack>
    303830308220000000000000040000000000000009221025051025060301
    <bitmap>{1, 7, 11, 70}</bitmap>
    <unpack fld="7" packager="org.jpos.iso.IFB_NUMERIC">
      <value>0922102505</value>
    </unpack>
    <unpack fld="11" packager="org.jpos.iso.IFB_NUMERIC">
      <value>102506</value>
    </unpack>
    <unpack fld="70" packager="org.jpos.iso.IFB_NUMERIC">
      <value>301</value>
    </unpack>
  </unpack>
</log>
<isomsg direction="none">
  <!-- org.jpos.iso.packager.GenericPackager[test.xml] -->
  <field id="0" value="0800"/>
  <field id="7" value="0922102505"/>
  <field id="11" value="102506"/>
  <field id="70" value="301"/>
</isomsg>

-chhil

adhi nugroho

unread,
May 9, 2015, 12:06:31 AM5/9/15
to jpos-...@googlegroups.com
thank you chill is working ...i'll tell the vendor to dump my message 

--
--
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
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAPazefBU-e4p6WBYEBzWpFH_kcpS9cmRs9QUdDNp2%2BA6otrmGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
adhi
Reply all
Reply to author
Forward
0 new messages