Receiving incorrect headers

157 views
Skip to first unread message

Clifton Mtengezo

unread,
Sep 12, 2022, 10:41:18 AM9/12/22
to jPOS Users
Sir

My apologies for my ignorance, I am just starting jpos. Here is my issue: I am receiving as a header ( ISO510000001804) instead of ( 0062ISO51000000).


Request Received:

    --- header ---
    0000  49 53 4F 35 31 30 30 30  30 30 30 31 38 30 34     ISO510000001804

    --- data ---
    0000  82 20 00 00 08 00 00 00  04 00 00 00 00 00 00 00  . ..............
0010  30 39 31 32 31 32 31 37  35 38 32 35 38 38 30 31  0912121758258801
0020  32 32 35 35 31 32 32 35  38 38 30 31 30 30 31     225512258801001

  </receive>
 
  Actual request Sent:

1209 161758893 34865230 00001029|5| Start DumpBank()                                                                            
1209 161758893 34865230 00001029|4| - HEADER     : |0062ISO51000000|                                                            
1209 161758893 34865230 00001029|4| - BIT MAP     82 20 00 00 08 00 00 00 04 00 00 00 00 00 00 00                              
1209 161758893 34865230 00001029|4| -----------------------------------                                                        
1209 161758893 34865230 00001029|4| - M.T.I      : [1804]                                                                      
1209 161758893 34865230 00001029|4| - FLD (FIELD): LENGTH : DATA                                                                
1209 161758893 34865230 00001029|4| -----------------------------------                                                        
1209 161758893 34865230 00001029|4| - FLD (007)   (010)    [0912121758]                                                        
1209 161758893 34865230 00001029|4| - FLD (011)   (006)    [258801]                                                            
1209 161758893 34865230 00001029|4| - FLD (037)   (012)    [225512258801]                                                      
1209 161758893 34865230 00001029|4| - FLD (070)   (003)    [001]                                                                
1209 161758894 34865230 00001029|5| End   DumpBank()                                                                            
1209 161758894 34865230 00001029|5| Start WriteLineMsg(63, 66)                                                                  
1209 161758894 34865230 00001029|0| Start dump_buffer()                                                                        
1209 161758894 34865230 00001029|D|                                      |START                                                
1209 161758894 34865230 00001029|D|                                      |NETWORK                                              
1209 161758894 34865230 00001029|D|                                      |OUTGOING                                              
1209 161758894 34865230 00001029|D|                                      |TIMESTAMP           1209161758                        
1209 161758894 34865230 00001029|D| 0 0 6 2 I S O 5 1 0 0 0 0 0 0 1 8 0  |30 30 36 32 49 53 4F 35 31 30 30 30 30 30 30 31 38 30
1209 161758894 34865230 00001029|D| 4 .   . . . . . . . . . . . . . . 0  |34 82 20 00 00 08 00 00 00 04 00 00 00 00 00 00 00 30
1209 161758894 34865230 00001029|D| 9 1 2 1 2 1 7 5 8 2 5 8 8 0 1 2 2 5  |39 31 32 31 32 31 37 35 38 32 35 38 38 30 31 32 32 35
1209 161758894 34865230 00001029|D| 5 1 2 2 5 8 8 0 1 0 0 1              |35 31 32 32 35 38 38 30 31 30 30 31                  
1209 161758894 34865230 00001029|D|                                      |END                 1209161758                        
1209 161758894 34865230 00001029|0| End   dump_buffer(VOID)                                                                    
1209 161758894 34865230 00001029|5| End   WriteLineMsg(OK)                                                                      
1209 161758894 34865230 00001029|5| Start ReadLineMsg(63)                                                                      
1209 161759072 34865230 00001029|1| Disconnect : 2                                                                              
1209 161759072 34865230 00001029|5| End   ReadLineMsg(DISCONNECT)                                                              
1209 161759072 34865230 00001029|1| Probleme On Receiving Response.....                                                        
1209 161759072 34865230 00001029|0| Shutdown Resource ...In Progress  

My server configuration is below.

<server class="org.jpos.q2.iso.QServer" logger="Q2" name="${serverName}" realm="${serverName}">
    <attr name="port" type="java.lang.Integer">${serverListeningPort}</attr>
    <channel class="org.jpos.iso.channel.ASCIIChannel"
             packager="org.jpos.iso.packager.ISO87APackager" header="0062ISO51000000"
             type="server"
             logger="Q2"
             realm="${serverName}">
        <property name="packager-config" value="cfg/packager/Iso93APackager.xml"/>
        <property name="timeout" value="180000"/>
    </channel>
    <request-listener class="org.jpos.iso.IncomingListener" logger="Q2" realm="incoming-request-listener">
        <property name="queue"  value="TXNMGR" />
        <property name="ctx.DESTINATION"  value="${visaChannel1Name}-MUX" />
    </request-listener>
</server>

Please assist.

Thanks for your usual support.

Clifton

Alejandro Revilla

unread,
Sep 12, 2022, 11:22:03 AM9/12/22
to jpos-...@googlegroups.com
No need to apologize. All this stuff is so arbitrary that it's not a matter of ignorance or being smart, it's just a matter of aligning the channel, that handle the outer part of the ISO8583 payload (think about an 'envelope'), and the packager, that handles the encoding/decoding (we call it pack/unpack) of the actual ISO8583 payload.

In this case, ASCIIChannel is definitely not what you want. It seems that you are using a link inspired or actually handled by a proprietary BASE24 software. That uses a two-byte message length indicator in network byte order (also called BIG ENDIAN), and then a header with the fixed constant 'ISO51000000' and then where's the actual ISO8583 message begins.

You may have to build a custom channel for that. Similar to NACChannel, but with a larger header.



--
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/a5ef9b0e-8fc1-4565-9577-11ae9ec96d04n%40googlegroups.com.

Clifton Mtengezo

unread,
Sep 12, 2022, 11:30:41 AM9/12/22
to jPOS Users
Thank you Sir for your endless, timely support. You have a very kind,  unselfish heart too.

Thank you. 

Clifton

Alejandro Revilla

unread,
Sep 12, 2022, 1:25:43 PM9/12/22
to jpos-...@googlegroups.com
When I first entered this payments world, I was blasted by jackass "Payment Professionals" hiding information and living by the "never make it sound simple" mantra. In a jPOS presentation I did 20+ years ago I used this slide:

Screen Shot 2022-09-12 at 14.15.01 .png

This was the way I pictured them when I was in my twenties and trying to learn about this, without specs, without access to the standard, they talked about "bitmaps", and "fields", and then they would photocopy two pages out of a 500 pages document so I could implement a parser in C, to be used in ancient POS devices.

That's why I wrote jPOS, once I figured out this is super simple stuff hidden in poorly written half-baked so-called "Specs", I wanted to share how it works, so that these mother-f***ers could stop playing the "I'm the smart one here" game.



Clifton Mtengezo

unread,
Sep 12, 2022, 4:02:25 PM9/12/22
to jPOS Users
Sir,
How can I develop a client sending a request to a NACChannel? I have a server configuration like below but the server is kicking off when I send a request through telnet.

<server class="org.jpos.q2.iso.QServer" logger="Q2" name="${serverName}" realm="${serverName}">
    <attr name="port" type="java.lang.Integer">${serverListeningPort}</attr>
    <channel class="com.acbtz.icpsvisaportal.channels.ICPSChannel"

             packager="org.jpos.iso.packager.ISO87APackager" header="0062ISO51000000"
             type="server"
             logger="Q2"
             realm="${serverName}">
        <property name="packager-config" value="cfg/packager/Iso93APackager.xml"/>
        <property name="timeout" value="180000"/>
    </channel>
    <request-listener class="org.jpos.iso.IncomingListener" logger="Q2" realm="incoming-request-listener">
        <property name="queue"  value="TXNMGR" />
        <property name="ctx.DESTINATION"  value="${visaChannel1Name}-MUX" />
    </request-listener>
</server>

Andrés Alcarraz

unread,
Sep 12, 2022, 5:15:37 PM9/12/22
to jpos-...@googlegroups.com

Hi Clifton.

You can use the jPOS-EE client simulator, here you can see an old post explaining how to set it up. Just use a newer version (2.2.9-SNAPSHOT is the current development version).

Modify 10_clientsimulator_channel.xml configuration to match your server channel class, packager, and header.

Hope this helps.

Andrés Alcarraz

Clifton Mtengezo

unread,
Sep 13, 2022, 3:15:28 AM9/13/22
to jPOS Users
Andrés, 
Thank you so much for your help.
I have done what you suggested and now I am getting below. What other parameter do I have to change? My apologies for troubling you.

<log realm="stderr" at="2022-09-13T10:05:40.896467400" lifespan="500ms">
    org.jpos.util.NameRegistrar$NotFoundException: channel.clientsimulator-adaptor
        at org.jpos.util.NameRegistrar.get(NameRegistrar.java:110)
        at org.jpos.ui.factory.ISOMeterFactory.create(ISOMeterFactory.java:48)
        at org.jpos.ui.UI.createComponent(UI.java:398)
        at org.jpos.ui.UI.create(UI.java:446)
        at org.jpos.ui.factory.GridLayoutFactory.create(GridLayoutFactory.java:54)
        at org.jpos.ui.UI.createComponent(UI.java:398)
        at org.jpos.ui.UI.create(UI.java:446)
        at org.jpos.ui.factory.BorderLayoutFactory.add(BorderLayoutFactory.java:62)
        at org.jpos.ui.factory.BorderLayoutFactory.create(BorderLayoutFactory.java:55)
        at org.jpos.ui.UI.createComponent(UI.java:398)
        at org.jpos.ui.UI.create(UI.java:446)
        at org.jpos.ui.UI.create(UI.java:123)
        at org.jpos.ui.UI.createComponent(UI.java:398)
        at org.jpos.ui.UI.configure(UI.java:211)
        at org.jpos.ui.UI.configure(UI.java:142)
        at org.jpos.q2.ui.UI.startService(UI.java:44)
        at org.jpos.q2.QBeanSupport.start(QBeanSupport.java:137)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72)
        at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262)
        at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
        at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
        at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
        at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
        at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
        at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814)
        at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
        at org.jpos.q2.QFactory.startQBean(QFactory.java:176)
        at org.jpos.q2.Q2.start(Q2.java:633)
        at org.jpos.q2.Q2.deploy(Q2.java:418)
        at org.jpos.q2.Q2.run(Q2.java:267)
        at java.base/java.lang.Thread.run(Thread.java:833)
</log>

Clifton Mtengezo

unread,
Sep 13, 2022, 4:55:49 AM9/13/22
to jPOS Users
Andrés, I resolved this. I made a mistake. I changed the name of the adaptor in the file 10_clientsimulator_channel in deploy folder.

Thank you

Clifton Mtengezo

unread,
Sep 14, 2022, 6:01:20 AM9/14/22
to jpos-...@googlegroups.com
Andrés,
Thank you for pointing me to the client simulator. I was able to set it up and work with it. It is able to send a request in echo_s file and receive a response. By the way, echo_s file contain a request in the format :
<isomsg>
 <field id="0" value="1800" />
 <field id="7" value="! get_date()" />
 <field id="11" value="! System.currentTimeMillis() % 1000000" />
 <field id="12" value="! previousTrace" />
 <field id="63" value="! new Date()" />
</isomsg>
The client I am working with sends a request in the format below. How can I represent that request in echo_s?

Thank you for your usual support.

Clifton
    --- header ---
    0000  49 53 4F 35 31 30 30 30  30 30 30 31 38 30 34     ISO510000001804

    --- data ---
    0000  82 20 00 00 08 00 00 00  04 00 00 00 00 00 00 00  . ..............
0010  30 39 31 32 31 32 31 37  35 38 32 35 38 38 30 31  0912121758258801
0020  32 32 35 35 31 32 32 35  38 38 30 31 30 30 31     225512258801001


Andrés Alcarraz

unread,
Sep 16, 2022, 9:55:23 AM9/16/22
to jpos-...@googlegroups.com

Hi Clifton, you have two ways to send the header.

  1. Configure it in the channel, you should this anyway, or your channel will not understand what is sent from the other end, you need it to match the header of your server.
  2. You can additionally set it in the XML in the following way:

<isomsg>

 <header>ISO510000001804</header> <!-- I don't remember if you have to put the hex representation or the ASCII characters here -->


 <field id="0" value="1800" />
 <field id="7" value="! get_date()" />
 <field id="11" value="! System.currentTimeMillis() % 1000000" />
 <field id="12" value="! previousTrace" />
 <field id="63" value="! new Date()" />
</isomsg>

Hope this helps.

Andrés.

On 14/9/22 05:01, Clifton Mtengezo wrote:

Andrés,
Thank you for pointing me to the client simulator. I was able to set it up and work with it. It is able to send a request in echo_s file and receive a response. By the way, echo_s file contain a request in the format :
<isomsg>
 <field id="0" value="1800" />
 <field id="7" value="! get_date()" />
 <field id="11" value="! System.currentTimeMillis() % 1000000" />
 <field id="12" value="! previousTrace" />
 <field id="63" value="! new Date()" />
</isomsg>
The client I am working with sends a request in the format below. How can I represent that request in echo_s?

Thank you for your usual support.

Clifton
    --- header ---
    0000  49 53 4F 35 31 30 30 30  30 30 30 31 38 30 34     ISO510000001804

    --- data ---
    0000  82 20 00 00 08 00 00 00  04 00 00 00 00 00 00 00  . ..............
0010  30 39 31 32 31 32 31 37  35 38 32 35 38 38 30 31  0912121758258801
0020  32 32 35 35 31 32 32 35  38 38 30 31 30 30 31     225512258801001



On Tue, Sep 13, 2022 at 12:15 AM Andrés Alcarraz <alca...@gmail.com> wrote:

Hi Clifton.

You can use thejPOS-EE client simulator, hereyou can see an old post explaining how to set it up. Just use anewer version (2.2.9-SNAPSHOT is the current developmentversion).

Modify 10_clientsimulator_channel.xmlconfiguration to match your server channel class, packager, andheader.

Hope this helps.

Andrés Alcarraz

On 12/9/22 15:02, Clifton Mtengezowrote:
Sir,
How can I develop a client sending a request to aNACChannel? I have a server configuration like below but theserver is kicking off when I send a request through telnet.

<server class="org.jpos.q2.iso.QServer" logger="Q2"name="${serverName}" realm="${serverName}">
    <attr name="port"type="java.lang.Integer">${serverListeningPort}</attr>
    <channelclass="com.acbtz.icpsvisaportal.channels.ICPSChannel"

             packager="org.jpos.iso.packager.ISO87APackager"header="0062ISO51000000"
             type="server"
             logger="Q2"
             realm="${serverName}">
        <property name="packager-config"value="cfg/packager/Iso93APackager.xml"/>
        <property name="timeout" value="180000"/>
    </channel>
    <request-listenerclass="org.jpos.iso.IncomingListener" logger="Q2"realm="incoming-request-listener">

        <property name="queue"  value="TXNMGR" />
        <property name="ctx.DESTINATION" value="${visaChannel1Name}-MUX" />
    </request-listener>
</server>
On Monday, 12 September2022 at 20:25:43 UTC+3 a...@jpos.org wrote:
When I first enteredthis payments world, I was blasted by jackass "PaymentProfessionals" hiding information and living by the"never make it sound simple" mantra. In a jPOSpresentation I did 20+ years ago I used this slide:

Screen Shot 2022-09-12 at 14.15.01
                                .png

This was the way Ipictured them when I was in my twenties and trying tolearn about this, without specs, without access to thestandard, they talked about "bitmaps", and "fields",and then they would photocopy two pages out of a 500pages document so I could implement a parser in C, tobe used in ancient POS devices.

That's why I wrotejPOS, once I figured out this is super simple stuffhidden in poorly written half-baked so-called "Specs",I wanted to share how it works, so that thesemother-f***ers could stop playing the "I'm thesmart one here" game.

--
@apr


On Mon, Sep 12, 2022at 12:30 PM Clifton Mtengezo <tiko.m...@gmail.com>wrote:
Thank you Sir foryour endless, timely support. You have a very kind, unselfish heart too.

Thank you. 

Clifton
On Monday, 12September 2022 at 18:22:03 UTC+3 a...@jpos.org wrote:
No needto apologize. All this stuff is so arbitrarythat it's not a matter of ignorance or beingsmart, it's just a matter of aligning thechannel, that handle the outer part of theISO8583 payload (think about an 'envelope'),and the packager, that handles theencoding/decoding (we call it pack/unpack) ofthe actual ISO8583 payload.

In thiscase, ASCIIChannel is definitely not what youwant. It seems that you are using a linkinspired or actually handled by a proprietaryBASE24 software. That uses a two-byte messagelength indicator in network byte order (alsocalled BIG ENDIAN), and then a header with thefixed constant 'ISO51000000'and then where's the actual ISO8583 messagebegins.

You may have to builda custom channel for that. Similar toNACChannel, but with a larger header.

--
@apr


On Mon, Sep12, 2022 at 11:41 AM Clifton Mtengezo <tiko.m...@gmail.com>wrote:
Sir

My apologies for my ignorance, I am juststarting jpos. Here is my issue: I amreceiving as a header (ISO510000001804)instead of (0062ISO51000000).


Request Received:

    --- header ---
    0000  49 53 4F 35 31 30 30 30  30 30 3031 38 30 34     ISO510000001804

    --- data ---
    0000  82 20 00 00 08 00 00 00  04 00 0000 00 00 00 00  . ..............
0010  30 39 31 32 31 32 31 37  35 38 32 3538 38 30 31  0912121758258801
0020  32 32 35 35 31 32 32 35  38 38 30 3130 30 31     225512258801001


  </receive>
 
  Actual request Sent:

1209 161758893 34865230 00001029|5| StartDumpBank()                                                                           
1209 161758893 34865230 00001029|4| - HEADER    : |0062ISO51000000|                                                           
1209 161758893 34865230 00001029|4| - BITMAP     82 20 00 00 08 00 00 00 04 00 00 0000 00 00 00                              
1209 161758893 34865230 00001029|4|-----------------------------------                                                      
1209 161758893 34865230 00001029|4| - M.T.I     : [1804]                                                                     
1209 161758893 34865230 00001029|4| - FLD(FIELD): LENGTH : DATA                                                               

1209 161758893 34865230 00001029|4|-----------------------------------                                                      
1209 161758893 34865230 00001029|4| - FLD(007)   (010)    [0912121758]                                                       
1209 161758893 34865230 00001029|4| - FLD(011)   (006)    [258801]                                                           
1209 161758893 34865230 00001029|4| - FLD(037)   (012)    [225512258801]                                                     
1209 161758893 34865230 00001029|4| - FLD(070)   (003)    [001]                                                               

1209 161758894 34865230 00001029|5| End  DumpBank()                                                                           
1209 161758894 34865230 00001029|5| StartWriteLineMsg(63, 66)                                                                 

1209 161758894 34865230 00001029|0| Startdump_buffer()                                                                       
1209 161758894 34865230 00001029|D|                                     |START                                               
1209 161758894 34865230 00001029|D|                                     |NETWORK                                             
1209 161758894 34865230 00001029|D|                                     |OUTGOING                                             
1209 161758894 34865230 00001029|D|                                     |TIMESTAMP          1209161758                        
1209 161758894 34865230 00001029|D| 0 0 6 2I S O 5 1 0 0 0 0 0 0 1 8 0  |30 30 36 32 4953 4F 35 31 30 30 30 30 30 30 31 38 30
1209 161758894 34865230 00001029|D| 4 .   .. . . . . . . . . . . . . 0  |34 82 20 00 0008 00 00 00 04 00 00 00 00 00 00 00 30
1209 161758894 34865230 00001029|D| 9 1 2 12 1 7 5 8 2 5 8 8 0 1 2 2 5  |39 31 32 31 3231 37 35 38 32 35 38 38 30 31 32 32 35
1209 161758894 34865230 00001029|D| 5 1 2 25 8 8 0 1 0 0 1              |35 31 32 32 3538 38 30 31 30 30 31                  
1209 161758894 34865230 00001029|D|                                     |END                1209161758                        
1209 161758894 34865230 00001029|0| End  dump_buffer(VOID)                                                                   
1209 161758894 34865230 00001029|5| End  WriteLineMsg(OK)                                                                     
1209 161758894 34865230 00001029|5| StartReadLineMsg(63)                                                                     
1209 161759072 34865230 00001029|1|Disconnect : 2                                                                            
1209 161759072 34865230 00001029|5| End  ReadLineMsg(DISCONNECT)                                                             
1209 161759072 34865230 00001029|1| ProblemeOn Receiving Response.....                                                       
1209 161759072 34865230 00001029|0| ShutdownResource ...In Progress  

My server configuration is below.

<server class="org.jpos.q2.iso.QServer"logger="Q2" name="${serverName}"realm="${serverName}">
    <attr name="port"type="java.lang.Integer">${serverListeningPort}</attr>
    <channelclass="org.jpos.iso.channel.ASCIIChannel"

            packager="org.jpos.iso.packager.ISO87APackager"header="0062ISO51000000"
             type="server"
             logger="Q2"
             realm="${serverName}">
        <property name="packager-config"value="cfg/packager/Iso93APackager.xml"/>
        <property name="timeout"value="180000"/>
    </channel>
    <request-listenerclass="org.jpos.iso.IncomingListener"logger="Q2"realm="incoming-request-listener">

        <property name="queue" value="TXNMGR" />
        <property name="ctx.DESTINATION" value="${visaChannel1Name}-MUX" />
    </request-listener>
</server>

Please assist.

Thanks for your usual support.

Clifton
--
--
jPOS is licensed under AGPL - free forcommunity usage for your open-source project.Licenses are also available for commercialusage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you aresubscribed to the Google Groups "jPOS Users"group.
To unsubscribe from this group and stopreceiving emails from it, send an email to jpos-users+...@googlegroups.com.
--
--
jPOS is licensed under AGPL - free for community usagefor your open-source project. Licenses are alsoavailable for commercial usage. Please support jPOS,contact: sa...@jpos.org
---
You received this message because you are subscribedto the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receivingemails from it, send an email to jpos-users+...@googlegroups.com.
--
--
jPOS is licensed under AGPL - free for community usage foryour open-source project. Licenses are also available forcommercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to theGoogle Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails fromit, send an email to jpos-users+...@googlegroups.com.
--
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/abef6a55-46fc-f888-c26c-96e2d420da87%40gmail.com.
--
--
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+...@googlegroups.com.

Clifton Mtengezo

unread,
Sep 16, 2022, 11:13:42 AM9/16/22
to jpos-...@googlegroups.com

Andrés,

Thank you for time and response.
What I am asking is: the contents of echo_s have to be within xml tags? I cannot send somoething in hex e.g. 49 53 4F 35 31 30 30 30  30 30 30 31 38 30 34 82 20 00 00 08 00 00 00  04 00 00 00 00 00 00 00 30 39 31 32 31 32 31 37  35 38 32 35 38 38 30 31 32 32 35 35 31 32 32 35 38 38 30 31 30 30 31 ???

Regards
Clifton 

murtuza chhil

unread,
Oct 14, 2022, 8:20:34 AM10/14/22
to jPOS Users

The simulator needs the files to be in xml. You can however call functions to convert the string to hex.

e.g.
Test case references a function.

      <field id="7" value="! get_dateMMddhhmmss()"/>

Your testrunner class deploy file would have the function defined in the init section. You can add your function to convert the data and pass it in. Though the packager that you setup should already convert from string to the field packager format.

https://github.com/jpos/jPOS-EE/blob/master/doc/src/asciidoc/module_client_simulator.adoc

  <init>

import java.util.Date;
import org.jpos.iso.ISODate;
import org.jpos.iso.ISOUtil;
import org.jpos.space.*;

Space psp = SpaceFactory.getSpace("jdbm:simulator:./banknet_simulator_stan");
    String get_stan() {

        long stan = SpaceUtil.nextLong(psp, "STAN") % 1000000L;
        return ISOUtil.zeropad(Long.toString(stan), 6);
    }

    String get_AuthID() {

        long authid = SpaceUtil.nextLong(psp, "AUTHID") % 1000000L;
        return ISOUtil.zeropad(Long.toString(authid), 6);
    }

    String get_Field63() {

        String s = "MC0"+get_DE63_NetworkID() + get_DE63_BankNetRef();
        return ISOUtil.padright(s, 49, ' ');

    }
   String get_dateMMddhhmmss() {

        return ISODate.formatDate(new Date(), "MMddhhmmss");

    }
</init>

-chhil

​
Reply all
Reply to author
Forward
0 new messages