TLV type ISO message Packager

888 views
Skip to first unread message

shan

unread,
Jun 6, 2013, 4:44:36 AM6/6/13
to jpos-...@googlegroups.com
Hi Guys.

I have a requirement where I need to both form and read a message

like this one  

020002164111111111111111140412136206000001 (in Hex values) to be sent to the server

above string simply means

0200 - message type
02 -type
    16 - length
        4111111111111111 -value
14-type
    04-length
        1213 -value
62 -type
    06-length
        000001 - value

In the message there should not be a bitmap sent to the server and server will also not send that on response.

Can i form this message and also receive this kind of message with jpos.
how can I construct this message with what packager? Kindly help me .


Thanks
Shan

Mark Salter

unread,
Jun 6, 2013, 5:12:23 AM6/6/13
to jpos-...@googlegroups.com
On 06/06/2013 09:44, shan wrote:
> I have a requirement where I need to both form and read a message
> like this one
>
> 0200*02*164111111111111111*14*041213*62*06000001 (in Hex values) to be
> sent to the server
>
> above string simply means
>
> 0200 - message type
> 02 -type
> 16 - length
> 4111111111111111 -value
> 14-type
> 04-length
> 1213 -value
> 62 -type
> 06-length
> 000001 - value
>
> In the message there should not be a bitmap sent to the server and
> server will also not send that on response.
Same set of fields are always present - perhaps sometimes 'empty'?
>
> Can i form this message and also receive this kind of message with jpos.
> how can I construct this message with what packager? Kindly help me .

Search and read about FSDMsg (and it's ISO 'wrapper' FSDISOMsg )


--
Mark

shan

unread,
Jun 6, 2013, 5:39:06 AM6/6/13
to jpos-...@googlegroups.com
Hi Mark,

Much thanks for the reply.
I tried the FSDISOMsg   and  used FSDChannel to send over

the issue is that it does not pack it like the TLV format.

Type and the length does not get packed. how can I do that ?

Regards
Shan

chhil

unread,
Jun 6, 2013, 5:51:37 AM6/6/13
to jpos-users

Write a custom field packager that packs and unpacks tlv data. Treat fsdfield as an opaque field (normal string),  get it from message use your custom object to unpack it for reading. For sending use your custom object to pack it and generate the tlv string and put it in the fsdmsg.

-chhil

--
--
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.
 
 

shan

unread,
Jun 6, 2013, 6:18:18 AM6/6/13
to jpos-...@googlegroups.com
Hi ,

Any sample? how can I form the custom field packager? I was looking on this forum and did not find something similar.
      FSDChannel s = new  FSDChannel ();
        s.setPort(8585);
        s.setPackager(new DummyPackager());    

currently I'm trying do something like this.

any help on how some sample or reference.

chhil

unread,
Jun 6, 2013, 7:04:18 AM6/6/13
to jpos-...@googlegroups.com
Its a regular POJO.

Pseudo code :
//For reading
TLV tlv_obj = new TLV(); // This is an object you would write
tlv_obj.unpack(fsdmsg.get(tlv_field));// you parse the string into tag length value structures
tlv.get(<tag>);

//For writing
TLV tlv_obj = new TLV()
tlv_obj.put(tag1,value1);
tlv_obj.put(tag2,value2);
tlv.toString();// returns a string in the tlv format

-chhil

Mark Salter

unread,
Jun 6, 2013, 8:04:38 AM6/6/13
to jpos-...@googlegroups.com
On 06/06/2013 10:39, shan wrote:
> the issue is that it does not pack it like the TLV format.
Sorry, I completely missed that it was a TLV form - despite the subject
and the content - I was obviously half asleep.

--
Mark

Vinoth Kanna

unread,
Jun 6, 2013, 8:26:24 AM6/6/13
to jPOS Users
Ok Chhill & Marks,
 I give it a try  and see..





--
Mark

--
--
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.





--
Best Regards
Vinoth/Vidu/

shan

unread,
Jun 7, 2013, 3:38:48 AM6/7/13
to jpos-...@googlegroups.com
Hi Mark,Chhil
 
I'm sorry I could not understand this below part on reading the message
 
TLV tlv_obj = new TLV(); // This is an object you would write
tlv_obj.unpack(fsdmsg.get(tlv_field));// you parse the string into tag length value structures
tlv.get(<tag>);

 

what 's TLV () ? is it FSDISOMsg ?
fsdmsg  mean FSDMsg   - this means I need to define a schema for this , but it still does not give in a TLV format
what what's the 3rd line (tlv.get(<tag>);) for ?
 
Kindly help , I'm just confused with this.

Mark Salter

unread,
Jun 7, 2013, 4:10:43 AM6/7/13
to jpos-...@googlegroups.com
On 07/06/2013 08:38, shan wrote:
> I'm sorry I could not understand this below part on reading the message
>
> TLV tlv_obj = new TLV(); // This is an object you would write
> tlv_obj.unpack(fsdmsg.get(tlv_field));// you parse the string into tag
> length value structures
> tlv.get(<tag>);
>
>
>
> what 's TLV () ? is it FSDISOMsg ?
Tag Length Value - the form in which your fields appear to be travelling.

Nothing to do with FSDISOMsg directly.

We have suggested using FSDMsg because you have no ISO8583 structure.

> fsdmsg mean FSDMsg - this means I need to define a schema for this ,
> but it still does not give in a TLV format
No, it will give you the chance to handle all of the data following the
MTI as a single field and write the POJO chhil indicated to split it
into fields ready for use.

> what what's the 3rd line (tlv.get(<tag>);) for ?
So you can get <tag>=2 for your PAN or any other field.

>
> Kindly help , I'm just confused with this.

I hope that helps, but I do wonder if the order of fields in the message
must be maintained. In a proper TLV stream they shouldn't but given the
odd format, I would guess they might need to be - so watch your
pack/unpack methods maintain the order unless you confirm that the field
order does not matter.


--
Mark

chhil

unread,
Jun 7, 2013, 4:11:31 AM6/7/13
to jpos-users

I had clearly mentioned it was pseudo code.
Then in my comment I wrote you need to create a TLV class.
Previously mentioned its a simple POJO (plain old java object).
You will write a java class that parses the tlv string that you would receive in the message (that's the read part, read from message received).
You would have helper methods that would get a value for a tag requested after you parse the string (I called it unpack).
You would have helper methods to add tag and values, once all are added you would have a pack (this I call write, write to message) method that translates the name value pairs into tag length values all concatenated and returned as a string. You use this string to put in your fsdmsg.

I hope this is clear enough, can't make it any clearer.

-chhil

Vinoth Kanna

unread,
Jun 7, 2013, 4:17:11 AM6/7/13
to jPOS Users
Ok Guys

Thanks much , I understood. and it's clear now Chhil.

Mark, Yes much thanks for reminding on the order thing too

Thanks much.



--
--
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.
 
 



--
Best Regards
Vinoth/Vidu/
Reply all
Reply to author
Forward
0 new messages