Re: Customizing ISO message format:

612 views
Skip to first unread message
Message has been deleted

Mark Salter

unread,
May 3, 2013, 5:31:36 AM5/3/13
to jPOS Users
You do need to try a bit harder to ask a *smart* question...

... I really should not reply for fear of offending you, and you
should already be in my ignore.list file

:-)

On May 3, 9:38 am, OmexIT <antonyom...@gmail.com> wrote:
> Hi.
> I need to customize my message in the following order. How can i go about
> it?
>
You should try and read the documentation available first, your
apparent lack of effort is surprising :-)

Search this mailing list too!

> - THE MESSAGE LENGTH IS IN DECIMAL FORMAT
Looks like nothing to customize for this item?
> - THE BITMAP IS CONVERTED FROM BINARY TO ASCII
You will need to change the class you are using for the bitmap...
... probably to one including the characters IFA instead of IFB

> - THE MESSAGE DATA IS THE FIELDS INDICATED IN THE BITMAP
Nothing to do here as why would this ever not be true?

> - YOU CAN SEND THE MESSAGE EITHER AS A STRING OR AN OBJECT.
What does this really mean?
>
> THIS FORMAT APPLIES ALSO FOR THE NETWORK MESSAGE BUT THE FIELDS DIFFER AS
> INDICATED IN THE BANCONNECT DOCUMENTATION. IF FURTHER CLARIFICATION IS
> NEEDED LET ME KNOW.

And why are you SHOUTING?

Click on the link below and do yourself (and me and perhaps us all) a
favor!

http://www.catb.org/esr/faqs/smart-questions.html

--
Mark

OmexIT

unread,
May 3, 2013, 5:52:17 AM5/3/13
to jpos-...@googlegroups.com
I read again my Question and your response is totally justified! That happen when u r intense pressure... Please don't qualify me to you ignore list! -:(

What i need is a way of including the message length just before the MTI
For example my message below.... I am using "iso93ascii.xml"
            ISOMsg m = new ISOMsg();
            m.setMTI("1804");
            m.set(11, "036803");
            m.set(12, "121008154732");
            m.set(24, "801");

I get the following message: 1804 0     036803121008154732801
I expect message like  00411804 0     036803121008154732801
whereby 0041 is the message length.

Victor Salaman

unread,
May 3, 2013, 6:14:38 AM5/3/13
to jpos-...@googlegroups.com
Hi:

1. Can you google? 
2. Can you think?
3. Can you read documentation?

If you have answered YES to any of those 3 questions, you should really try to solve your problem using any or all of the above before asking in the list. Don't get me wrong, I'm not being rude. I am just saving you from future misfortunes.

In your particular case, read about the differences between packagers and channels and what each other do. Now please, use the magic of the web to google this information.

Have a great happy day,

/V 

--
--
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 "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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

chhil

unread,
May 3, 2013, 6:38:02 AM5/3/13
to jpos-...@googlegroups.com
This was touched upon in a previous thread where I had mentioned you need a channel that prepends the length (includes length of length).
See postchannel, it prepends the length (not length of length).

You need to start getting more self reliant.
Debug the jpos code along with your code. Look at the test cases that are available to understand the packagers.

-chhil

Alejandro Revilla

unread,
May 3, 2013, 6:51:17 AM5/3/13
to jpos-...@googlegroups.com
That 0041 lenght is automatically handled for you by the channel. Looks like NACChannel is the one you want to use. 

@apr
--

OmexIT

unread,
May 3, 2013, 6:58:12 AM5/3/13
to jpos-...@googlegroups.com
Thank you, I have learnt lot through you. 

OmexIT

unread,
May 3, 2013, 6:58:36 AM5/3/13
to jpos-...@googlegroups.com
Thanks :)

chhil

unread,
May 3, 2013, 7:02:12 AM5/3/13
to jpos-...@googlegroups.com

The message you have has a length of 32 but you are prepending 0041.
Remember NACChannel does length and does not include length of length you will need to add that to it.
-chhil

chhil

unread,
May 3, 2013, 7:33:46 AM5/3/13
to jpos-...@googlegroups.com
In that case, you can mail me some beer :)

-chhil

On Fri, May 3, 2013 at 4:28 PM, OmexIT <anton...@gmail.com> wrote:

OmexIT

unread,
May 3, 2013, 7:49:06 AM5/3/13
to jpos-...@googlegroups.com
Am now using NACChannel, my message is sent well but i get an error while recieving response:
Here is the log:
<log realm="test-channel/172.16.2.97:52000" at="Fri May 03 14:41:05 EAT 2013.930">
  <receive>
    <peer-disconnect/>
  </receive>
</log>
        java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
at org.jpos.iso.channel.NACChannel.getMessageLength(NACChannel.java:90)
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:666)
at TestJpos.BancConnectChannel.main(BancConnectChannel.java:41)
BUILD SUCCESSFUL (total time: 0 seconds)

line:41 is

ISOMsg response = channel.receive();

OmexIT

unread,
May 3, 2013, 7:49:39 AM5/3/13
to jpos-...@googlegroups.com
U never know...

chhil

unread,
May 3, 2013, 8:07:40 AM5/3/13
to jpos-...@googlegroups.com
There is enough information in the stack trace to figure out your problem.
Please dont post every error you get on this group.

-chhil

OmexIT

unread,
May 3, 2013, 9:49:47 AM5/3/13
to jpos-...@googlegroups.com
I understand but I cant receive any message because of this error. Please assist, i guess this is one of the very last hurdles in the usage of JPOS

chhil

unread,
May 3, 2013, 9:56:18 AM5/3/13
to jpos-...@googlegroups.com
Hint:
at org.jpos.iso.channel.NACChannel.getMessageLength(NACChannel.java:90)
The first 2 bytes are read from the message and then those many additional bytes are read.

Debugger is your friend, you not receiving the message is your problem (unfortunately) as you cant debug your own code to figure it out.

I am sorry cant spoon feed you anymore, best of luck.

-chhil



Alejandro Revilla

unread,
May 3, 2013, 10:02:02 AM5/3/13
to jpos-...@googlegroups.com

I understand but I cant receive any message because of this error.

You need to ask your other end why it's closing the connection, perhaps due to a malformed message you're sending them according to their specs.


chhil

unread,
May 3, 2013, 10:14:28 AM5/3/13
to jpos-...@googlegroups.com


Please do check if length is included in the message length.

If message length is 10, the length will be 12. If you havent deducted 2 in your channel, the remote entity will disconnect after sending a complete message and your channel is waiting for 2 additional bytes.


From an earlier thread.
On Thu, May 2, 2013 at 1:13 PM, chhil <Chi...@gmail.com> wrote:
Hi,
I am going to ignore the manual work you are doing.
Did you consider changing your bitmap packager to IFB_BINARY and not create the bitmap yourself.
You need a channel that prepends the 2 byte  length that includes the length of length.
0363 interpreted as 3x16 +63 = 111. = 107 +4
107 is length of the message "1200Ώ0?☺ ϊΑ ♦ 166396420060006508011000000000
00010030000000001605062012112010345320121120200066"
4 is the length of "0363"
-chhil

Zablon Ochomo

unread,
May 7, 2013, 4:30:45 AM5/7/13
to jpos-...@googlegroups.com
I have been facing same issue where server spec says that message length is N6. and for message length of 43 you send 000043.

OmexIT

unread,
May 7, 2013, 7:57:19 AM5/7/13
to jpos-...@googlegroups.com
I wish I had solved this. I culd help. I am stuck too on java.io.EOFException

chhil

unread,
May 7, 2013, 11:09:41 AM5/7/13
to jpos-...@googlegroups.com
OmexIT,
Why is it difficult to solve?
Cant you use the debugger to get an idea of why its failing, after all its java ?
Get a hexdump of the message received and analyse the length data.

Zablon,
When you are sending the data, you can ask the entity receiving the message to let you know why its failing.
-chhil

Message has been deleted

chhil

unread,
May 7, 2013, 12:31:57 PM5/7/13
to jpos-...@googlegroups.com
You received 138 bytes, 134 form the message , 4 seem to be a trailer of some sort.
Do you have documentation on the trailer (3SWT)? If you dont handle the trailer they will get treated as the length header for the next message. Try and add 4 to the message length calculation in the channel (override the ascii channels getMessageLength and sendMessageLength. 

Provide q2 logs so that users on the group can make more sense of it.

You need to figure out what channel you need to use, trial and error wont get you any where. You may need to write a custom channel based on you interpreting the spec correctly.


-chhil



On Tue, May 7, 2013 at 9:17 PM, OmexIT <anton...@gmail.com> wrote:
 If I use NACChannel, I get the EOFException and the finacle BancConnect server does not recieve any message. Actually there is very little information to debug easily. At least from your experience, you can help me hack this.

I decided to you use ASCIIChannel which sends the message to the server but I still recieve an error below

 Pid: 6716 08/05/2013 16:25:03.685 Received 138 Bytes
30 31 33 34 31 32 30 30 f0 30 81 01 00 00 80 00 01341200.0......
00 00 00 00 04 00 00 20 31 39 30 30 30 30 30 30 ....... 19000000
30 30 30 30 30 30 30 30 30 30 30 30 30 33 31 30 0000000000000310
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
30 30 30 31 31 31 31 31 32 32 33 36 38 30 33 30 0001111122368030
30 30 30 30 35 30 37 31 37 35 35 35 33 30 30 30 0000507175553000
30 30 35 30 37 32 30 30 30 36 36 33 39 34 38 35 0050720006639485
34 30 34 31 35 30 30 31 32 30 30 30 30 30 30 31 4041500120000001
30 37 36 37 30 30 33 53 57 54 0767003SWT
Wed May 8 16:25:03 2013, PID[6716], [1368019503.688]
File:/finacle/dev7018MB/soar/v2.2/projects/arlimoc/src/CLIMOClient.cpp Func:CLIMOClient::CLIMOCSendToOPConsole Line:1177
ErrCode:-7 Message:Could not send to OP CONSOLE Params:
File:/finacle/dev7018MB/soar/v2.2/projects/arlimoc/src/CLIMOOPConsole.cpp Func:CLIMOOPConsole::ConnectToOPConsole Line:319
ErrCode:-4 Message:can not send to OP CONSOLE Params:
File:/finacle/dev7018MB/soar/v2.2/projects/arlimoc/src/CLIMOCConnect.cpp Func:CLIMOCConnect::ReconnectAndSend Line:525
ErrCode:-4 Message:Both hosts can not be contacted Params:

chhil

unread,
May 7, 2013, 1:03:26 PM5/7/13
to jpos-...@googlegroups.com
Please ignore previous response.

What you have posted is a Finacle log. Why dont you ask the Finacle guys what their error messages mean, I am not sure anyone here will be able to interpret those logs.

For whatever reason you are sending length as 134 when you are sending 138 or someone is addig the 4 bytes at the end.

-chhil

Zablon Ochomo

unread,
May 8, 2013, 4:23:56 AM5/8/13
to jpos-...@googlegroups.com
cchil,
I am using the ASCIIChannel approach of zero-padding  to 6 and set the byte-array on reading to size 6.
I will test and revert.

Zablon

i'm sweet

unread,
May 14, 2013, 12:58:21 AM5/14/13
to jpos-...@googlegroups.com
Hi.. some days ago I got this problem about <peer-disconnect/>,
 java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:197) and looks like a problem at Channel.

I try to solved it about 2 days ago and didn't find what the real problem. I was so confused because all those code run well before.

I close and open my IDE for several times and nothing happens.

What I did then, i just restart the service, and then run my code again. And it works! These problems just gone.

So looks like it has stuck or tied at something in somewhere accidentally.

Hope it helps.

Regards.

OmexIT

unread,
May 14, 2013, 1:48:58 AM5/14/13
to jpos-...@googlegroups.com
Hi Zablon;

I just discovered a lot about these errors with finacle. Try the following things:

1). Get the cdci.cfg
2). Establish if the finale system needs the message length prefix, if so use AsciiChannel or you custom channel
3). Use the cdci.cfg to customize a packager that matches all the fields in finacle. Bear in mind the field class i.e. class="org.jpos.iso.IFA_LLNUM if the field formart is N...32. 
Note: All fields need to match finacle otherwise you will run into the above issues or finacle will ignore your message
3). After doing all I mentioned above it must work. If not check the error log on finacle and also check finacle configuration.

Balu Thomas

unread,
Sep 29, 2015, 3:39:54 AM9/29/15
to jPOS Users

Hi Antony,

I am working in a project for sending ISO messages to Finacle. I am completely new to this domain, so kindly forgive me if I ask dump questions. I tried running a sample code, but didnt get any response from Finacle. Seems like Finacle just ignored the message. I would like to know how should I proceed. I used the following code,



            Logger logger = new Logger();

            logger.addListener(new SimpleLogListener (System.out));

            ISOChannel channel = new ASCIIChannel (host, port, new ISO93APackager());

            ((LogSource)channel).setLogger (logger, "test-channel");

            channel.connect();

            ISOMsg m = new ISOMsg();

            m.setPackager(new ISO93APackager());

            m.setMTI("1200");

            m.set(3, "31");

            m.set(102, account);

            channel.send(m);

            ISOMsg r = channel.receive();

             channel.disconnect();

              System.out.println(r);


Seems like the default packager does not work with Finacle or there is something very stupid I am trying. Please guide me.



OmexIT

unread,
Sep 29, 2015, 3:52:23 AM9/29/15
to jPOS Users
You need to know what message you are sending to finacle, all required fields must be present and the length and field type must be exact. Otherwise finacle will no respond.but will throw some exception
 Also check finacle error log to get what fields are having issues.

Also get the cdci.cfg, it will help guide you on fields

Kind Regards

Balu Thomas

unread,
Sep 29, 2015, 4:11:52 AM9/29/15
to jPOS Users
Thanks for the info, what about the packager I used. Will that work with Finacle or should I create a custom packager.

OmexIT

unread,
Sep 29, 2015, 4:45:05 AM9/29/15
to jPOS Users
Yes. Use custom packager. My advise is that Use xml, it is easy to customize

Balu Thomas

unread,
Sep 29, 2015, 4:47:29 AM9/29/15
to jPOS Users
Antony, could you please share a sample XML compatible with Finacle

Regards,
Balu

Antony Omeri

unread,
Sep 29, 2015, 4:50:20 AM9/29/15
to jpos-...@googlegroups.com
I will send if I get one, it has been long

--
--
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 "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 a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/Ee30SItYlGU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/e43ad774-fc07-4bda-a7b5-cd0f819dcbe1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Balu Thomas

unread,
Sep 29, 2015, 4:52:48 AM9/29/15
to jPOS Users
Thanks a lot for the help Antony

Regards,
Balu
Reply all
Reply to author
Forward
0 new messages