我在ISO消息中使用j8583 iso解析器(0800 2020000000800000 000000 000001 3239313130303031)。
以下是我的java代码:
linux-vdso.so.1 => (0x00007fff0e5fb000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007fadb7228000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fadb700c000)
libc.so.6 => /lib64/libc.so.6 (0x00007fadb6c49000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fadb6a45000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fadb6842000)
libm.so.6 => /lib64/libm.so.6 (0x00007fadb653f000)
/lib64/ld-linux-x86-64.so.2 (0x000055cf7bfc2000)
undefined symbol: ASN1_STRING_length
(/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ASN1_STRING_length (/usr/local/lib64/python2.7/site-
packages/psycopg2/_psycopg.so)
undefined symbol: SSL_get_error (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_use_certificate_file (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ENGINE_free (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: sk_free (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_write (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: OPENSSL_config (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: sk_value (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSLv23_method (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_free (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_STORE_load_locations (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ENGINE_init (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CTX_use_certificate_chain_file (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_NAME_ENTRY_get_data (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: BIO_s_socket (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ASN1_STRING_data (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: CRYPTO_num_locks (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_get_subject_name (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ERR_reason_error_string (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_get_version (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_set_ex_data (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_library_init (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_read (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_get_current_cipher (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CTX_ctrl (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_new (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_shutdown (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: BIO_set_flags (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_use_PrivateKey_file (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ERR_clear_error (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CIPHER_get_bits (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CTX_new (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: BIO_clear_flags (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: CRYPTO_get_id_callback (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_get_peer_certificate (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_NAME_get_entry (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: BIO_new (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CTX_load_verify_locations (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_get_ext_d2i (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_ctrl (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_STORE_set_flags (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_pending (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_set_verify (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: BIO_int_ctrl (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: CRYPTO_get_locking_callback (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: CRYPTO_set_id_callback (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_free (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ENGINE_finish (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: X509_NAME_get_index_by_NID (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: sk_num (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_use_PrivateKey (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_connect (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_load_error_strings (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ERR_get_error (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CTX_get_cert_store (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_check_private_key (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_CIPHER_get_name (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: CRYPTO_set_locking_callback (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ENGINE_load_private_key (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: ERR_put_error (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_get_current_compression (/usr/local/lib64/python2.7/site-
packages/psycopg2/_psycopg.so)
undefined symbol: ENGINE_by_id (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
undefined symbol: SSL_set_bio (/usr/local/lib64/python2.7/site-packages/psycopg2/_psycopg.so)
以下是配置文件。
public class ISOUtility {
private static BufferedReader reader;
private static String getMessage() throws IOException {
if (reader == null) {
reader = new BufferedReader(new InputStreamReader(System.in));
}
// System.out.println("Paste your ISO8583 message here (no ISO headers): ");
return "0800 2020000000800000 000000 000001 3239313130303031";
}
public static void main(String [] args) throws IOException, ParseException {
final MessageFactory<IsoMessage> mf = new MessageFactory<IsoMessage>();
if (1 == 0) {
// ConfigParser.createFromClasspathConfig("j8583.xml");
ConfigParser.configureFromDefault(mf);
} else {
String path="C:\\Users\\DELL\\workspace\\SolabParser\\j8583.xml";
if (System.console() != null) {
System.console().printf("Attempting to configure MessageFactory from %s...%n", path);
}
System.out.println("Messagefactory is done");
String url = "j8583.xml";
if (path.contains("://")) {
System.out.println("else ");
ConfigParser.configureFromUrl(mf, new URL(path));
} else {
System.out.println("else ");
ConfigParser.configureFromUrl(mf, new File(path).toURI().toURL());
}
}
//Now read messages in a loop
String line = getMessage();
while (line != null && line.length() > 0) {
IsoMessage m = mf.parseMessage(line.getBytes(), 14);
if (m != null) {
System.out.printf("Message type: %04x%n", m.getType());
System.out.println("FIELD TYPE VALUE");
for (int i = 2; i <= 128; i++) {
IsoValue<?> f = m.getField(i);
if (f != null) {
System.out.printf("%5d %-6s [", i, f.getType());
System.out.print(f.toString());
System.out.println(']');
}
}
}
line = getMessage();
}
}
}
我正在使用&#34; 0800&#34;类型的消息我没有使用任何标题。
我在编译程序时遇到错误: ISO8583 MessageFactory没有消息类型0800的解析指南
任何帮助将不胜感激。
答案 0 :(得分:0)
我猜你错了Field 41格式。 不同消息类型的个人资料不同。
以下是您的示例消息的可能解释,其中BIT 41是16个HEX字符转换为8个ASCII字母(数字)。
https://iso8583.info/cmd/CB/AUTO/msg?080020200000008000000000000000013239313130303031
---
# Cheef's parser.
# Copyright (C) 2008-2016 Alexander Shevelev. https://iso8583.info/
# lib : "/lib/CB/AUTO/" - CB2A Autorisation
# tool : "msg"
# stat : 10 nodes, 4 lookup tables, 100.00% passed (4/4)
msg:#"080020200000008000000000000000013239313130303031" # CB2A Autorisation message
- MTI: "0800" # Message Type ID. // Network management request
- DE000: "2020000000800000" # Primary bitmap // 3.11.41.
- BM0:#"0000000000013239313130303031" # Fields at Primary Bitmap
- DE003:#"000000" # PC
- S01: "00" # Transaction Code. // Purchase of goods or services
- S02: "00" # Account, from. // Standard purchase
- S03: "00" # Account, to. // Standard purchase
- DE011: "000001" # STAN. // 1
- DE041: "29110001" # CATI.
# run:0.030
答案 1 :(得分:0)
更改字长的拼写并用斜杠关闭该标记,它没有斜线斜杠。
<field num="12" type="DATE4" length="14" />