Commit 9a4cc47c by WeiCong

完善案例

parent 8475ce47
package com.brilliance.pack; package com.brilliance.pack;
import java.io.File;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
...@@ -56,10 +57,12 @@ public class Elcs_720_001_01Test { ...@@ -56,10 +57,12 @@ public class Elcs_720_001_01Test {
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()); System.out.println("Elcs_720_001_01模型json串==" + reqResult.getElcsModelForJson());
//模拟人行请求报文文件
reqResult.saveMessageForXml("D:/elcs.720.001.01.xml");
//这里模拟收到人行的报文(头部+签名域+报文体)进行解析 //这里模拟收到人行的报文(头部+签名域+报文体)进行解析
//支持三种API 1.字符串 2.字节数组 3.报文文件 //支持三种API 1.字符串 2.字节数组 3.报文文件
//下面以Elcs_720_001_01完整报文字符串,调用字符串API解包 //下面以Elcs_720_001_01完整报文字符串,调用报文文件API解包
Result resResult=MsgUtil.unPackMessage(reqResult.getMessage()); Result resResult=MsgUtil.unPackMessage(new File("D:/elcs.720.001.01.xml"));
System.out.println("本地保存完整报文:"+resResult.getMessageType()); System.out.println("本地保存完整报文:"+resResult.getMessageType());
//下面可以根据指定的路径,将报文保存到本地 //下面可以根据指定的路径,将报文保存到本地
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment