Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
be-dzxt-open
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WeiCong
be-dzxt-open
Commits
8475ce47
Commit
8475ce47
authored
Sep 20, 2019
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加报文例子,充分展示api使用
parent
affa1596
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Elcs_720_001_01Test.java
...zxt-test/src/com/brilliance/pack/Elcs_720_001_01Test.java
+10
-3
No files found.
be-dzxt-test/src/com/brilliance/pack/Elcs_720_001_01Test.java
View file @
8475ce47
...
@@ -54,16 +54,23 @@ public class Elcs_720_001_01Test {
...
@@ -54,16 +54,23 @@ public class Elcs_720_001_01Test {
System
.
out
.
println
(
"Elcs_720_001_01签名部分=="
+
reqResult
.
getSignature
());
System
.
out
.
println
(
"Elcs_720_001_01签名部分=="
+
reqResult
.
getSignature
());
System
.
out
.
println
(
"Elcs_720_001_01报文体部分=="
+
reqResult
.
getBody
());
System
.
out
.
println
(
"Elcs_720_001_01报文体部分=="
+
reqResult
.
getBody
());
System
.
out
.
println
(
"Elcs_720_001_01完整报文=="
+
reqResult
.
getMessage
());
System
.
out
.
println
(
"Elcs_720_001_01完整报文=="
+
reqResult
.
getMessage
());
System
.
out
.
println
(
"Elcs_720_001_01模型json串=="
+
reqResult
.
getElcsModelForJson
());
//这里模拟收到人行的报文(头部+签名域+报文体)进行解析
//支持三种API 1.字符串 2.字节数组 3.报文文件
//下面以Elcs_720_001_01完整报文字符串,调用字符串API解包
Result
resResult
=
MsgUtil
.
unPackMessage
(
reqResult
.
getMessage
());
Result
resResult
=
MsgUtil
.
unPackMessage
(
reqResult
.
getMessage
());
System
.
out
.
println
(
"本地保存完整报文:"
+
resResult
.
getMessageType
());
System
.
out
.
println
(
"本地保存完整报文:"
+
resResult
.
getMessageType
());
resResult
.
saveMessageForXml
(
"D:/elcs.720.001.01.xml"
);
//下面可以根据指定的路径,将报文保存到本地
// resResult.saveMessageForXml("D:/elcs.720.001.01.xml");
//扁平化结构,是把报文模型所有字段层级以.进行拼接,最后以map保存
System
.
out
.
println
(
"本地保存完整报文模型扁平化结构:"
+
resResult
.
getElcsFlatHierarchy
());
System
.
out
.
println
(
"本地保存完整报文模型扁平化结构:"
+
resResult
.
getElcsFlatHierarchy
());
resResult
.
saveElcsFlatHierarchy
(
"D:/elcs.720.001.01.json"
);
//下面可以根据指定的路径,将报文扁平化结构保存到本地
// resResult.saveElcsFlatHierarchy("D:/elcs.720.001.01.json");
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment