我能够成功地将请求发送到服务器并能够得到响应。当从响应数据中解包字段时,观察到字段 #48 中的错误,但当我解码位图字段 #48 时不存在。
来自响应数据的位图:722022810AD08202
附上Jmeter Log供大家参考:
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (channel/XX.XXX.XX.XX:XXXXX) [receive] --- data ---
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (channel/XX.XXX.XX.XX:XXXXX) [receive]
0000 01 10 72 20 22 81 0A D0 82 02 10 XX XX XX XX XX
0010 XX XX XX 00 00 00 00 00 00 00 12 00 08 21 06 57
0020 20 18 45 66 08 26 00 00 00 06 44 10 03 F4 F2 F2
0030 F1 F0 F6 F1 F8 F3 F9 F8 F8 F1 F9 E3 C5 D9 D4 C9
0040 C4 F0 F1 E2 88 85 93 84 96 95 40 E2 98 A4 81 99
0050 85 40 02 F5 E8 08 26 49 01 00 46 9A 03 08 11 05
0060 9C 01 00 9F 02 06 00 00 00 00 12 00 9F 03 06 00
0070 00 00 00 00 00 9F 10 07 06 09 0A 03 A4 00 00 9F
0080 1A 02 08 26 9F 26 08 01 23 45 67 89 AB CD EF 9F
0090 33 03 E0 E0 E0 9F 36 02 00 FF 9F 37 04 9B AD BC
00a0 AB 05 80 00 00 00 02
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (org.jpos.q2.iso.ChannelAdaptor) channel-receiver-jmeter-bdc26f30-receive
2024-10-25 09:02:07,934 ERROR n.c.b.j.i.Q2: (org.jpos.q2.iso.ChannelAdaptor) org.jpos.iso.IFB_LLLCHAR: Problem unpacking field 48 (java.lang.RuntimeException: Required 100 but just got 77 bytes) unpacking field=48, consumed=88
org.jpos.iso.ISOException: org.jpos.iso.IFB_LLLCHAR: Problem unpacking field 48 (java.lang.RuntimeException: Required 100 but just got 77 bytes) unpacking field=48, consumed=88
at org.jpos.iso.ISOBasePackager.unpack(ISOBasePackager.java:341) ~[jpos-2.1.8.jar:2.1.8]
at org.jpos.iso.ISOMsg.unpack(ISOMsg.java:479) ~[jpos-2.1.8.jar:2.1.8]
at org.jpos.iso.BaseChannel.unpack(BaseChannel.java:978) ~[jpos-2.1.8.jar:2.1.8]
at org.jpos.iso.BaseChannel.receive(BaseChannel.java:748) ~[jpos-2.1.8.jar:2.1.8]
at org.jpos.q2.iso.ChannelAdaptor$Receiver.run(ChannelAdaptor.java:333) [jpos-2.1.8.jar:2.1.8]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
同时附加 XML Packer:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE isopackager PUBLIC
"-//jPOS/jPOS Generic Packager DTD 1.0//EN"
"http://jpos.org/dtd/generic-packager-1.0.dtd">
<!-- ISO 8583:1993 (BINARY) field descriptions for GenericPackager -->
<isopackager headerLength="22">
<isofield
id="0"
length="4"
name="Message Type Indicator"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="1"
length="16"
name="Bitmap"
class="org.jpos.iso.IFB_BITMAP"/>
<isofield
id="2"
length="16"
name="Primary Account number"
pad="false"
class="org.jpos.iso.IFB_LLHNUM"/>
<isofield
id="3"
length="6"
name="Processing Code"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="4"
length="12"
name="Amount, Transaction"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="5"
length="12"
name="Amount, Reconciliation"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="6"
length="12"
name="Amount, Cardholder billing"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="7"
length="10"
name="Date and time, transmission"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="8"
length="8"
name="Amount, Cardholder billing fee"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="9"
length="8"
name="Conversion rate, Reconciliation"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="10"
length="8"
name="Conversion rate, Cardholder billing"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="11"
length="6"
name="Systems trace audit number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="12"
length="12"
name="Date and time, Local transaction"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="13"
length="4"
name="Date, Effective"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="14"
length="4"
name="Date, Expiration"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="15"
length="6"
name="Date, Settlement"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="16"
length="4"
name="Date, Conversion"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="17"
length="4"
name="Date, Capture"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="18"
length="4"
name="Merchant type"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="19"
length="4"
name="Country code, Acquiring institution"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="20"
length="3"
name="Country code, Primary account number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="21"
length="3"
name="Country code, Forwarding institution"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="22"
length="4"
name="Point of service data code"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="23"
length="3"
name="Card sequence number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="24"
length="3"
name="Function code"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="25"
length="2"
name="Message reason code"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="26"
length="4"
name="Card acceptor business code"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="27"
length="1"
name="Approval code length"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="28"
length="9"
name="Date, Reconciliation"
pad="false"
class="org.jpos.iso.IFE_CHAR"/>
<isofield
id="29"
length="3"
name="Reconciliation indicator"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="30"
length="24"
name="Amounts, original"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="31"
length="99"
name="Acquirer reference data"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="32"
length="11"
name="Acquirer institution ident code"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="33"
length="11"
name="Forwarding institution ident code"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="34"
length="28"
name="Primary account number, extended"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="35"
length="38"
name="Track 2 data"
pad="true"
class="org.jpos.iso.IFB_LLHNUM"/>
<isofield
id="36"
length="104"
name="Track 3 data"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="37"
length="12"
name="Retrieval reference number"
class="org.jpos.iso.IFE_CHAR"/>
<isofield
id="38"
length="6"
name="Approval code"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="39"
length="2"
name="Action code"
pad="false"
class="org.jpos.iso.IFE_CHAR"/>
<isofield
id="40"
length="3"
name="Service code"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="41"
length="8"
name="Card acceptor terminal identification"
class="org.jpos.iso.IFE_CHAR"/>
<isofield
id="42"
length="15"
name="Card acceptor identification code"
class="org.jpos.iso.IFE_CHAR"/>
<isofield
id="43"
length="40"
name="Card acceptor name/location"
class="org.jpos.iso.IFE_CHAR"/>
<isofieldpackager id="44"
name="Additional data"
length="3"
class="org.jpos.iso.IF_CHAR"
packager="org.jpos.iso.packager.GenericSubFieldPackager"
emitBitmap="false"
maxValidField="2">
<isofield id="1"
name="Length"
length="1"
pad="true"
class="org.jpos.iso.IFB_BINARY"/>
<isofield id="2"
name="Value"
length="2"
pad="false"
class="org.jpos.iso.IFE_CHAR"/>
</isofieldpackager>
<isofield
id="45"
length="76"
name="Track 1 data"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="46"
length="204"
name="Amounts, Fees"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="47"
length="999"
name="Additional data - national"
class="org.jpos.iso.IFB_LLLBINARY"/>
<isofield
id="48"
length="999"
name="Additional data - private"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="49"
length="4"
name="Currency code, Transaction"
pad="true"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="50"
length="3"
name="Currency code, Reconciliation"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="51"
length="3"
name="Currency code, Cardholder billing"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="52"
length="8"
name="Personal identification number [PIN] data"
class="org.jpos.iso.IFB_BINARY"/>
<isofield
id="53"
length="48"
name="Security related control information"
class="org.jpos.iso.IFB_LLBINARY"/>
<isofield
id="54"
length="120"
name="Amounts, additional"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofieldpackager id="55"
name="ICC"
length="99"
class="org.jpos.iso.IF_CHAR"
packager="org.jpos.iso.packager.GenericSubFieldPackager"
emitBitmap="false"
maxValidField="20">
<isofield id="1"
name="Fieldlength"
length="2"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield id="2"
name="TAGS"
length="98"
pad="false"
class="org.jpos.iso.IFB_BINARY"/>
</isofieldpackager>
<isofield
id="56"
length="35"
name="Original data elements"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="57"
length="3"
name="Authorization life cycle code"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="58"
length="11"
name="Authorizing agent institution Id Code"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="59"
length="999"
name="Transport data"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="60"
length="4"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLBINARY"/>
<isofield
id="61"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="62"
length="8"
name="Reserved for private use"
class="org.jpos.iso.IFB_LLBINARY"/>
<isofield
id="63"
length="5"
name="Reserved for private use"
class="org.jpos.iso.IFB_LLBINARY"/>
<isofield
id="64"
length="8"
name="Message authentication code field"
class="org.jpos.iso.IFB_BINARY"/>
<isofield
id="65"
length="8"
name="Reserved for ISO use"
class="org.jpos.iso.IFB_BINARY"/>
<isofield
id="66"
length="204"
name="Amounts, original fees"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="67"
length="2"
name="Extended payment data"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="68"
length="3"
name="Country code, receiving institution"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="69"
length="3"
name="Country code, settlement institution"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="70"
length="3"
name="Country code, authorizing agent Inst."
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="71"
length="8"
name="Message number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="72"
length="999"
name="Data record"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="73"
length="6"
name="Date, action"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="74"
length="10"
name="Credits, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="75"
length="10"
name="Credits, reversal number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="76"
length="10"
name="Debits, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="77"
length="10"
name="Debits, reversal number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="78"
length="10"
name="Transfer, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="79"
length="10"
name="Transfer, reversal number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="80"
length="10"
name="Inquiries, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="81"
length="10"
name="Authorizations, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="82"
length="10"
name="Inquiries, reversal number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="83"
length="10"
name="Payments, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="84"
length="10"
name="Payments, reversal number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="85"
length="10"
name="Fee collections, number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="86"
length="16"
name="Credits, amount"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="87"
length="16"
name="Credits, reversal amount"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="88"
length="16"
name="Debits, amount"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="89"
length="16"
name="Debits, reversal amount"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="90"
length="10"
name="Authorizations, reversal number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="91"
length="3"
name="Country code, transaction Dest. Inst."
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="92"
length="3"
name="Country code, transaction Orig. Inst."
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="93"
length="11"
name="Transaction Dest. Inst. Id code"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="94"
length="11"
name="Transaction Orig. Inst. Id code"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="95"
length="99"
name="Card issuer reference data"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="96"
length="999"
name="Key management data"
class="org.jpos.iso.IFB_LLLBINARY"/>
<isofield
id="97"
length="17"
name="Amount, Net reconciliation"
pad="false"
class="org.jpos.iso.IFB_AMOUNT"/>
<isofield
id="98"
length="25"
name="Payee"
class="org.jpos.iso.IF_CHAR"/>
<isofield
id="99"
length="11"
name="Settlement institution Id code"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="100"
length="11"
name="Receiving institution Id code"
pad="false"
class="org.jpos.iso.IFB_LLNUM"/>
<isofield
id="101"
length="17"
name="File name"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="102"
length="28"
name="Account identification 1"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="103"
length="28"
name="Account identification 2"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="104"
length="100"
name="Transaction description"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="105"
length="16"
name="Credits, Chargeback amount"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="106"
length="16"
name="Debits, Chargeback amount"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="107"
length="10"
name="Credits, Chargeback number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="108"
length="10"
name="Debits, Chargeback number"
pad="false"
class="org.jpos.iso.IFB_NUMERIC"/>
<isofield
id="109"
length="84"
name="Credits, Fee amounts"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="110"
length="84"
name="Debits, Fee amounts"
class="org.jpos.iso.IFB_LLCHAR"/>
<isofield
id="111"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="112"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="113"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="114"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="115"
length="999"
name="Reserved for ISO use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="116"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="117"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="118"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="119"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="120"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="121"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="122"
length="999"
name="Reserved for national use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofieldpackager id="123"
name="Additional data"
length="26"
class="org.jpos.iso.IFB_BINARY"
packager="org.jpos.iso.packager.GenericSubFieldPackager"
emitBitmap="false"
maxValidField="2">
<isofield id="1"
name="Length"
length="1"
pad="true"
class="org.jpos.iso.IFB_BINARY"/>
<isofield id="2"
name="Value"
length="25"
pad="false"
class="org.jpos.iso.IFE_CHAR"/>
</isofieldpackager>
<isofield
id="124"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="125"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="126"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="127"
length="999"
name="Reserved for private use"
class="org.jpos.iso.IFB_LLLCHAR"/>
<isofield
id="128"
length="8"
name="Message authentication code field"
class="org.jpos.iso.IFB_BINARY"/>
</isopackager>
是否有解决此报告问题的方法。
这个答案假设问题是How to send Header value in Jmeter using ISO8583 Plugin
的后续问题您可能由于标题而未对齐。
你要做的最好的第一件事就是向打包器添加一个记录器,我不知道你如何在jMeter中看到它们,但你可以使用jPOS-EE客户端模拟器来获得正确的配置;然后转向使用 jMeter,或者也许坚持使用客户端模拟器,这篇文章很旧,但我打赌它会对你有用。
我还建议您在通道级别处理标头,而不是在打包程序中。从打包器中删除
headerLength
属性,然后将 0000000000000000000000
作为通道的标头,这将告诉通道传入消息的标头的预期长度。
您还需要删除通道的
override-header
属性,以便通道使用消息的标头,而不是覆盖它。