Hi Guys, JPOS ISO8583 packing field issue

589 views
Skip to first unread message

Ramanath Pai

unread,
Jan 5, 2010, 1:34:22 AM1/5/10
to jpos-...@googlegroups.com
I am using JPOS for ISO8583 messages transaction with Switch for 0200 message type.

Current requirement is that usage of fields 44 and 48.
The backend switch wants the filed 44 to be only 3 digit but in my ISO 0200 final request
it prefixes 03 the length of the value and the actuall field 44 value as this field is a variant field.
 
Ex: if my value for field 44 is 123 then the ISO request constructs as 03123.
Now the backend does not want that 03 the length infront of the field it just wants field 44 value.

Is there any way in JPOS packager or interface where we can specify or force the length of the field without have any prefix as length

-Ramanath Pai

Mark Salter

unread,
Jan 5, 2010, 2:53:30 AM1/5/10
to jpos-...@googlegroups.com
Ramanath Pai wrote:
> Ex: if my value for field 44 is 123 then the ISO request constructs as
> 03123.
> Now the backend does not want that 03 the length infront of the field it
> just wants field 44 value.
>
> Is there any way in JPOS packager or interface where we can specify or force
> the length of the field without have any prefix as length
Yes of course, how are you defining these fields? You simply need to
amend the classes being used to a fixed length version.

You will currently have an IF?_LLxxxx class and don't need the LL (which
indicates a variable length field - which produces the length you are
seeing). Just pick another field without the LL, but please share the
field classes currently in use so we can guide your correct selection,
if this pointer is not enough.

--
Mark

chhil

unread,
Jan 5, 2010, 2:53:38 AM1/5/10
to jpos-users
It looks like the packager for receiving needs to be LLVAR  and the packager for sending data needs to be  a fixed length field.
Have you defined the packagers correctly for sending the message to your backend ?
You probably need to make sure that the length of the incoming field is always 3 before sending something to the backend.

-chhil

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

Ramanath Pai

unread,
Jan 5, 2010, 3:05:10 AM1/5/10
to jpos-...@googlegroups.com
Hi,

I am not using XML for the packager.
    ISOMsg  req = new ISOMsg();
        ISOPackager packager = new ISO87APackager();
        req.setPackager (packager);
        req.set(new ISOField(44,cvv));

So i am just using ISO87APackager.. and all the other fields are getting set as expected. except this 44 field as this is variant but the backend is expecting it to be oly 3 digits

- Ramanath Pai

Didik Rawandi

unread,
Jan 5, 2010, 3:17:22 AM1/5/10
to jpos-...@googlegroups.com
for using custom packager i suggest u to use xml, and simple replace the following
<isofield
      id="44"
      length="25"
      name="ADITIONAL RESPONSE DATA"
      class="org.jpos.iso.IFA_LLCHAR"/>
to
<isofield
      id="44"
      length="25"
      name="ADITIONAL RESPONSE DATA"
      class="org.jpos.iso.IFA_CHAR"/>
and in your code use this:
ISOPackager packager=new GenericPackager("your.xml");
Best Regards,

Didik Rawandi
354
http://didiksoft.wordpress.com

chhil

unread,
Jan 5, 2010, 3:17:40 AM1/5/10
to jpos-users
Means you have to customize the ISO87APackager to support your backend. you were lucky that this was the only field that did not match :-).

-chhil

kapilashantha rajapaksha

unread,
Jan 5, 2010, 3:21:39 AM1/5/10
to jpos-...@googlegroups.com

Hi

        GenericValidatingPackager packager  = new GenericValidatingPackager();
        packager.readFile("iso87binary.xml");


        ISOMsg  req = new ISOMsg();
        req.setPackager(  packager);

        Now you can use as you wish by editing "iso8583.xml" hope this help you.

Regards
-Kapila

chhil

unread,
Jan 5, 2010, 3:27:48 AM1/5/10
to jpos-users
You may want to use iso87ascii.xml instead of the binary one as you were using ISO87APackager

-chhil

Ramanath Pai

unread,
Jan 5, 2010, 3:48:45 AM1/5/10
to jpos-...@googlegroups.com
Where can i get this iso87ascii.xml?

- Ramanath Pai

kapilashantha rajapaksha

unread,
Jan 5, 2010, 4:05:37 AM1/5/10
to jpos-...@googlegroups.com
Hi do u have private email Id ? then I can set you this file

Mark Salter

unread,
Jan 5, 2010, 4:07:49 AM1/5/10
to jpos-...@googlegroups.com
Ramanath Pai wrote:
> Where can i get this iso87ascii.xml?

Once you have it, can I ask you check that each field it defines
*matches* your interface specification precisely. You should have
carried out this matching exercise when picking your current packager.

If you have downloaded the current (any?) version of jpos, you should
find it in:-

[jpos_folder}/modules/jpos/cfg/packager/iso87ascii.xml


As suggested above, it might be easier to amend what you have than
change to the generic xml route, but of course both will work perfectly
*if* you check the definition matches your interface.

--
Mark

Mark Salter

unread,
Jan 5, 2010, 4:14:44 AM1/5/10
to jpos-...@googlegroups.com
kapilashantha rajapaksha wrote:
> Hi do u have private email Id ? then I can set you this file

A nice offer perhaps, but I would suggest it would be much better to get
it direct from the repository, both now and perhaps in the future.

--
Mark

Ramanath Pai

unread,
Jan 5, 2010, 4:28:51 AM1/5/10
to jpos-...@googlegroups.com
Thanks guys.

Now i am able to send the data as needed.

- Ramanath Pai


Fernando Del Carmen Taveras

unread,
Jan 15, 2010, 5:05:41 PM1/15/10
to jpos-...@googlegroups.com
Hello,
 
I receive de following message sending a message to and external host. any  idea of posible cause of this excpetion  ?
 
log realm="org.jpos.q2.iso.ChannelAdaptor" at="Fri Jan 15 17:58:39 GMT-04:00 2010.93">
  <warn>
    channel-receiver-xxxxx-receive
    <exception name="null">
    java.io.EOFException
 at java.io.DataInputStream.readFully(Unknown Source)
 at org.jpos.iso.channel.ASCIIChannel.getMessageLength(ASCIIChannel.java:101)
 at org.jpos.iso.BaseChannel.receive(BaseChannel.java:593)
 at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:305)
 at java.lang.Thread.run(Unknown Source)
    </exception>
  </warn>
</log>
Thanks !
 
 
 
 
 



¡Obtén la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8
http://downloads.yahoo.com/ieak8/?l=e1

Alejandro Revilla

unread,
Jan 15, 2010, 6:26:06 PM1/15/10
to jpos-...@googlegroups.com
I bet your remote host is either closing your connection, or you have a firewall issue (i.e. timeout).

Fernando Del Carmen Taveras

unread,
Jan 15, 2010, 8:21:14 PM1/15/10
to jpos-...@googlegroups.com
Ok.  Thanks Alejandro. i will check this.

--- El vie 15-ene-10, Alejandro Revilla <a...@jpos.org> escribió:
--
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+unsub...@googlegroups.com

For more options, visit this group at http://groups.google.com/group/jpos-users
Reply all
Reply to author
Forward
0 new messages