Determining which packager to use?

119 views
Skip to first unread message

OmexIT

unread,
May 2, 2013, 2:21:47 AM5/2/13
to jpos-...@googlegroups.com
Please guide on which packager to use because the server i am communicating with expects this kind of message:

03631200Ώ0?☺ ϊΑ ♦ 16639642006000650801100000000000010030000000001605062012112010345320121120200066

The message should contain ascii part that describes the fields present......

I am using:
 GenericPackager packager = new GenericPackager("basic.xml");
But the problem is that it does not produce that kind of message

chhil

unread,
May 2, 2013, 2:26:30 AM5/2/13
to jpos-users

What does your basic.xml looks like?
How did you decide the field formaters in your custom packager?did you follow a spec or its based on the raw message provided?
What errors did you get while using it?

On a lighter note, try renaming basic to complex and it might just work :-).

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

Mark Salter

unread,
May 2, 2013, 2:28:11 AM5/2/13
to jpos-...@googlegroups.com
On 02/05/2013 07:21, OmexIT wrote:
> Please guide on which packager to use because the server i am
> communicating with expects this kind of message:
>
> 03631200Ώ0?☺ ϊΑ ♦
> 16639642006000650801100000000000010030000000001605062012112010345320121120200066

Not very helpful or smart?

Those 'binary' characters will have gone through a number of translation
to get to our eyes, what that meant and what they might have been when
you pasted are likely very different.

>
> The message should contain ascii part that describes the fields
> present......
Sorry, what do you mean?

>
> I am using:
> GenericPackager packager = new GenericPackager("basic.xml");
This means nothing to us, basic.xml is a file on your system that
contains who knows what (apart from you).

> But the problem is that it does not produce that kind of message

You need to get the documentation of the system you want to connect to
and follow the guidance on matching the Packager (and Channel) to the
specification. This should be a one off exercise if done correctly and
in doing so you might find there is already a packager you can use,
perhaps with minor changes.

The smart question would include the ISO8583 version, the name of the
target systems perhaps, but very much more than you have presented.

Please try and do some of the work and ask a *smart* question.

--
Mark
Message has been deleted

OmexIT

unread,
May 2, 2013, 2:48:25 AM5/2/13
to jpos-...@googlegroups.com

I have uploaded my "basic" xml, and that was funny -:)

From the message
03631200Ώ0?☺ ϊΑ ♦ 16639642006000650801100000000000010030000000001605062012112010345320121120200066

The part "?☺ ϊΑ ♦ " is acii characters that describes present fields. First it is 64bit binary then you get the bytes and then get the ascii characters fro the bytes.

I tried creating  the following message manually using the following piece of code:

Message 00411804 0     00000012407520121008154732831
F-11 Value = 036803
F-12 Value = 121008154732
F-24 Value = 801

 00411804........00000012407520121008154732831

String s = "0000000000110000000000010000000000000000000000000000000000000000";
String s2 = "";
        char nextChar;
        int bites = 0;
        for (int i = 1; i <= 8; i++) //this is a little tricky.  we want [0, 7], [9, 16], etc
        {
            nextChar = (char) Integer.parseInt(s.substring(bites, (i * 8)), 2);
            s2 += nextChar;

            bites += 8;

        }

        String iso = "00411804" + s2 + "00000012407520121008154732831";
basic.xml

OmexIT

unread,
May 2, 2013, 3:18:27 AM5/2/13
to jpos-...@googlegroups.com
From the message
03631200Ώ0?☺ ϊΑ ♦ 16639642006000650801100000000000010030000000001605062012112010345320121120200066

The part "?☺ ϊΑ ♦ " is acii characters that describes present fields. First it is 64bit binary then you get the bytes and then get the ascii characters fro the bytes.

I tried creating  the following message manually using the following piece of code:

Message 00411804 0     00000012407520121008154732831
F-11 Value = 036803
F-12 Value = 121008154732
F-24 Value = 801

 00411804........00000012407520121008154732831

String s = "0000000000110000000000010000000000000000000000000000000000000000";
String s2 = "";
        char nextChar;
        int bites = 0;
        for (int i = 1; i <= 8; i++) //this is a little tricky.  we want [0, 7], [9, 16], etc
        {
            nextChar = (char) Integer.parseInt(s.substring(bites, (i * 8)), 2);
            s2 += nextChar;

            bites += 8;

        }

        String iso = "00411804" + s2 + "00000012407520121008154732831";

I f I try to unpack ISO, I get the error below:

org.jpos.iso.ISOException: org.jpos.iso.IFA_NUMERIC: Problem unpacking field 14 (java.lang.RuntimeException: Required 4 but just got 1 bytes) unpacking field=14, consumed=44
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:265)
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:420)
at TestJpos.ClientHelper.unpackISO(ClientHelper.java:24)
at TestJpos.TestISOMessage.main(TestISOMessage.java:45)
BUILD SUCCESSFUL (total time: 0 seconds)

chhil

unread,
May 2, 2013, 3:43:21 AM5/2/13
to jpos-...@googlegroups.com
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 te length of length.
0363 interpretted as 3x16 +63 = 111. = 107 +4
107 is length of the message "1200Ώ0?☺ ϊΑ ♦ 166396420060006508011000000000
00010030000000001605062012112010345320121120200066"
4 is the length of "0363"
-chhil

OmexIT

unread,
May 2, 2013, 3:47:30 AM5/2/13
to jpos-...@googlegroups.com
The target system is called: BancsConnect
The are using  iso 8583:93 version 1.6

On Thursday, 2 May 2013 09:28:11 UTC+3, Mark Salter wrote:

OmexIT

unread,
May 2, 2013, 7:01:31 AM5/2/13
to jpos-...@googlegroups.com
What ISO field class can I use so as to create 8bit ASCII for field 1?

chhil

unread,
May 2, 2013, 7:22:56 AM5/2/13
to jpos-...@googlegroups.com

OmexIT

unread,
May 2, 2013, 8:15:49 AM5/2/13
to jpos-...@googlegroups.com
Thank you very much, the thread helped a lot. I used iso87ascii-binary-bitmap.xml with few modifications and i get what is required.
I appreciate!!
Reply all
Reply to author
Forward
0 new messages