Hi Team,
I am running a Visa Iso8583 mock for doing automated component integration
testing for my acquiring host.
Using jPos version 2.1.3, I have defined a generic xml packager for DE55 as
below at channel level:
<isofieldpackager
id="55"
length="255"
name="Integrated Circuit Card Related Data"
class="org.jpos.iso.IFB_LLHBINARY"
headerLength="3"
packager="org.jpos.tlv.packager.bertlv.BERTLVBinaryPackager"
emitBitmap="false">
<isofield id="1" name="DataSet Data" length="3"
class="org.jpos.iso.IFB_BINARY"/>
Visa DE55 is a little unusual than others, where its first 3 bytes are
header field, and its definition is:
Position 1, Dataset ID: This is a one-byte binary identifier given to
each dataset. The identifier is hexadecimal 01.
Positions 2–3, Dataset Length: This is a 2-byte binary subfield that
contains the total length of all TLV elements that follow
I can unpack request DE55 sent to mock properly.
But I am having some issue building a response DE55 that I can send back to
the acquiring host, in a nice way.
Here is a sample for what I am building in response DE55 (a lot less tags)
isoRequest.set("55.2", new
ISOTaggedField(ISSUER_AUTHENTICATION_DATA_0x91.getTagNumberHex(), new
ISOBinaryField(2, ISOUtil.hex2byte("00000000000000000000"))));
isoRequest.set("55.3", new
ISOTaggedField(ISSUER_APPLICATION_DATA_0x9F10.getTagNumberHex(), new
ISOBinaryField(3, ISOUtil.hex2byte("00000000000000"))));
isoRequest.set("55.4", new
ISOTaggedField(APPLICATION_TRANSACTION_COUNTER_0x9F36.getTagNumberHex(), new
ISOBinaryField(4, ISOUtil.hex2byte("0000"))));
// TODO
isoRequest.set("55.1", new ISOBinaryField(1,
ISOUtil.hex2byte("01xxxx")));
I need to have a way to calculate xxxx to indicate all TLV elements.
I can't do this isoRequest.getBytes (55) and it returns null. I was trying
to do this
isoRequest.getComponent(55).pack()
But I am seeing null pointer on IsoMsg class line 456
return packager.pack(this);
I am guessing it can't pack this DE55 IsoComponent because the packager is
defined at channel level?
So I have a few options:
* Load the packager file from the Java class and pack the field and
calculate the length of all the TLV fields.
* Calculate the length from my Java class (I think this is messy).
Perhaps I am missing something, do you guys have any nicer way that you can
suggest to me?
Thanks
Eric
--
Sent from:
http://jpos.1045706.n5.nabble.com/jPOS-Users-f2246022.html