验证传入的ISO 8583消息在模式级别
我正在努力在解析过程中验证传入的ISO 8583消息,但我面临验证消息类型的问题。
这是我使用的架构:
<?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">
<isopackager>
<isofield
id="0"
length="4"
name="MESSAGE TYPE INDICATOR"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="1"
length="16"
name="BIT MAP"
class="org.jpos.iso.IFB_BITMAP"/>
<isofield
id="2"
length="19"
name="PAN - PRIMARY ACCOUNT NUMBER"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="3"
length="6"
name="PROCESSING CODE"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="4"
length="12"
name="AMOUNT, TRANSACTION"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="5"
length="12"
name="AMOUNT, SETTLEMENT"
class="org.jpos.iso.IFA_NUMERIC"/>
<isopackager>
对于字段2(pan编号),我只能获得数字值,为此,我已经指定了类org.jpos.iso.ifa_llnum
,但这似乎不是当我收到包含字母2的字段2的传入消息时,它仍然成功地解析了它。我希望该解析包含字母时失败。即使对于带有org.jpos.iso.ifa_numeric
类的字段,
例如: 字段2:12987658096472(前2位数字指定长度,下一个12位数字指定值) 这是正确的值。
12ABCD79365760-这是不正确的值,但仍在成功解析。
谁能用架构本身来帮助我验证字段值的数据类型?还有其他方法可以实现这一目标吗?
I am working on validating incoming iso 8583 message at schema level during parsing but i am facing issues in validating the type of the message.
This is the schema that i am using:
<?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">
<isopackager>
<isofield
id="0"
length="4"
name="MESSAGE TYPE INDICATOR"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="1"
length="16"
name="BIT MAP"
class="org.jpos.iso.IFB_BITMAP"/>
<isofield
id="2"
length="19"
name="PAN - PRIMARY ACCOUNT NUMBER"
class="org.jpos.iso.IFA_LLNUM"/>
<isofield
id="3"
length="6"
name="PROCESSING CODE"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="4"
length="12"
name="AMOUNT, TRANSACTION"
class="org.jpos.iso.IFA_NUMERIC"/>
<isofield
id="5"
length="12"
name="AMOUNT, SETTLEMENT"
class="org.jpos.iso.IFA_NUMERIC"/>
<isopackager>
For field 2 (PAN Number) I should only get numeric value and for that i have specified the class org.jpos.iso.IFA_LLNUM
But this does not seem to be working as when I receive an incoming message with field 2 containing alphabets It still parses it successfully. I want this parsing to fail when it contains alphabets. Even for fields with org.jpos.iso.IFA_NUMERIC
class accept alphabets in the fields
for eg:
field 2 : 12987658096472 (first 2 digits specify length, next 12 digits specify the value)
This is the correct Value.
12ABCD79365760 - This is the incorrect value but still it is being parsed successfully.
Can anyone please help me on how can i validate the datatype of the field values with schema itself ? Is there any other way we can achieve this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论