Nested Elements

341 views
Skip to first unread message

brandon

unread,
Sep 20, 2007, 9:06:07 AM9/20/07
to jPOS Users
Hello,
I am doing an integration right now where the spec defines a field
(113) in an 0100 message. The spec says that it itself is divided
into subfields similar to the basis for ISO 8583 messaging. My
interpretation of this is that this is almost like having a message,
including header, bitmap, and values set as the value for field 113 on
my 0100 message. There are two things that I am a bit uncertain of.
The first is that this field is defined as LLLL ans. 9,999 which I do
not see defined anywhere in jpos. Is there something that I can use
to hold this? The second is I'm unsure if there is a way to use
ISOMsg to build the content of field 113 and then add it to the 0100
message. Any sample code, or examples would be appreciated. Thank
you.
Brandon

Mark Salter

unread,
Sep 23, 2007, 4:09:52 PM9/23/07
to jpos-...@googlegroups.com
brandon wrote:
> Hello,
> I am doing an integration right now where the spec defines a field
> (113) in an 0100 message. The spec says that it itself is divided
> into subfields similar to the basis for ISO 8583 messaging. My
> interpretation of this is that this is almost like having a message,
> including header, bitmap, and values set as the value for field 113 on
> my 0100 message.
Perhaps not a complete message. It is unlikely to include headers, but
might have a bitmap to indicate which subfields are present, followed by
the data itself.

> There are two things that I am a bit uncertain of.
> The first is that this field is defined as LLLL ans. 9,999 which I do
> not see defined anywhere in jpos. Is there something that I can use
> to hold this?

You indicate that this field has a maximum length of 9999, so in jPOS if
you want this field to contain another structure (an ISOMsg) you need a
binary type, your attention initially needs to focus on how the length
is formatted in the message, this will help you chose the correct
'family' from IFA_LLLBINARY, IFB_LLL*BINARY or IFE_LLLBINARY.

IFA will use ASCII characters to indicate the length, IFB provides
various binary format (BCD,HEX etc) and IFE uses EBCDIC characters to
indicate the length.

Let's assume your message wants ASCII characters (4 digits in your case)
for the length, so I suggest you take IFA_LLBINARY and IFA_LLLLLBINARY
and make your own IFA_LLLLBINARY with a few changes. Comparing these
two classes should indicate what is required to change.

Now you have a class that perhaps is the correct length format...

> The second is I'm unsure if there is a way to use
> ISOMsg to build the content of field 113 and then add it to the 0100
> message.

ISOMsg fullMessage = new ISOMsg();
fullMessage.setPackager(fullMessagePackager);
fullMessage.setMTI("0100");
fullMessage.set(2,"1234567890123456");


ISOMsg field113 = new ISOMsg();
field113.setPackager(field113Packager());
field113.set(1,"field1");
field113.set(3,"field3");
field113.set(4,"field4");

fullMessage.set(113,field113);


> Any sample code, or examples would be appreciated. Thank
> you.

jPOS 1.5.0 includes an example using sub messages, see
jpos/src/examples/isomsg/Test.java

examine :-
/jpos/src/main/org/jpos/iso/packager/Base1Packager.java
&
/jpos/src/main/org/jpos/iso/packager/Base1_BITMAP126.java

for a packager and subfield packager example, and the tie between them.

HTH

--
Mark

Reply all
Reply to author
Forward
0 new messages