my application 'talks' to a postilion6 (ISO8583) switch. Field 127 is a
postilion specific extension to ISO8583 which I've declared in a custom
packager (adapted from the JPOS PostPackager class). The relevant
code:
protected ISOFieldPackager fld127[] =
{
/*000*/ new IF_CHAR (0, "PLACEHOLDER"),
/*001*/ new IFB_BITMAP (16, "BITMAP"),
...
...
/*126*/ new IFA_LLLCHAR (999, "RESERVED PRIVATE USE"),
/*127*/ new ISOMsgFieldPackager(
new IFA_LLLLLLBINARY (999999, "RESERVED PRIVATE
USE"),
p127
),
/*128*/ new IFA_BINARY ( 8, "MAC 2")
};
protected class Post6PrivatePackager extends ISOBasePackager
{
protected ISOFieldPackager fld127[] =
{
/*000*/ new IF_CHAR (0, "PLACEHOLDER"),
/*001*/ new IFB_BITMAP (16, "BITMAP"),
...
...
/*024*/ new IFA_LLCHAR (28, "PAYER ACCOUNT
INFORMATION"),
/*025*/ new IFA_LLLLCHAR(8000, "ICC DATA"),
/*026*/ new IFA_LLCHAR(12, "ORIGINAL NODE"),
/*027*/ new IF_CHAR(1, "CARD VERIFICATION RESULT"),
/*028*/ new IFA_NUMERIC(4, "AMERICAN EXPRESS CARD
IDENT - CID"),
/*029*/ new IFA_BINARY(40, "3D SECURE DATA"),
/*030*/ new IF_CHAR(1, "3D SECURE RESULT"),
/*031*/ new IFA_LLCHAR(1, "ISSUER NETWORK ID"),
/*032*/ new IFA_LLCHAR(33, "UCAF DATA"),
/*033*/ new IFA_NUMERIC(4, "EXTENDED TRANSACTION
TYPE"),
/*034*/ new IFA_NUMERIC(2, "ACCOUNT TYPE QUALIFIERS"),
/*035*/ new IFA_LLCHAR(11, "ACQUIRER NETWORK ID")
};
}
In the code below xidByte and cavvByte are byte arrays:
ISOMsg inner = (ISOMsg)c.getValue( 127 );
byte[] field127_29 = ISOUtil.concat( xidByte, 0,
xidByte.length, cavvByte, 0, cavvByte.length );
inner.set( new ISOBinaryField( 29, field127_29 ) );
If I do 'inner.dump', I get the following (which is correct):
<field id="29"
value="AADE3C7DBD99C3EC74A1DF2245ED6092AB783F580000010806443500000000000044350000000000"
type="binary"/>
The problem is that when the switch receives my msg, it's picking up
field 127.29 as:
61 61 64 65 33 63 37 64 62 64 39 39 63 33 65 63 37 34 61 31 64 66
32 32 34 etc
See the following network trace:
...
00f0 61 31 34 60 60 35 30 41 41 44 45 33 43 37 44 42
a14``50AADE3C7DB
0100 44 39 39 43 33 45 43 37 34 41 31 44 46 32 32 34
D99C3EC74A1DF224
...
Each character of binary field 127.29 is being interpreted literally
and being converted to binary again (possibly because field 127 is also
binary?)
I tried creating a IFA_LLLLLLCHAR class (changing relevant lengths) and
defining field 127 as this class and but am now getting errors from
ISOStringFieldPackager.pack.. 'Problem packing field 0' and 'Problem
packing field 29'.
Any thoughts or ideas from anyone?
Thanks.
the network trace is a dump from ethereal. after the fix I got:
00f0 61 31 34 60 60 35 30 f7 2b cb 97 a2 91 3a a9 16
a14``50.+....:..
0100 89 1e 6d 39 d9 b1 ba 2c 96 5c 53 00 00 01 07 45
..m9...,.\S....E
0110 44 60 00 00 00 00 00 00 44 60 00 00 00 00 00 D`......D`.....
The isomsg dump for that was:
<field id="29"
value="F72BCB97A2913AA916891E6D39D9B1BA2C965C530000010745446000000000000044600000000000"
type="binary"/>
Just out of interest what's the difference between IFA_* and IFB_* ?
HillBilly
IFA is value ASCII, and iFB is value binary
for example:
value="1234"/>
in IFA_NUMERIC is in hex. 31323334; 31 = 49 ASCII
in IFB_NUMERIC is in hex. 1234
bye.