use of com.zx.sms.codec.smgp.msg.SMGPReportData in project SMSGate by Lihuanghe.
the class TestSMGPMsgIdUtil method testMsgid.
@Test
public void testMsgid() throws Exception {
MsgId m = new MsgId();
byte[] arr = SMGPMsgIdUtil.msgId2Bytes(m);
System.out.println(m.toString());
Assert.assertEquals(m, SMGPMsgIdUtil.bytes2MsgId(arr));
arr = Hex.decodeHex("69643a6495c36ac4ea6b00000b7375623a30303120646c7672643a303031207375626d69745f646174653a3138303730353232303720646f6e655f646174653a3138303730353232303720737461743a44454c49565244206572723a303030207478743ad6d0b9fa306138616535".toCharArray());
System.out.println(new String(Hex.decodeHex("20737461743a206572723a207478743a".toCharArray())));
SMGPReportData tmpreport = new SMGPReportData();
tmpreport.fromBytes(arr);
System.out.println(tmpreport.toString());
}
use of com.zx.sms.codec.smgp.msg.SMGPReportData in project SMSGate by Lihuanghe.
the class TestSMGPDeliverMessage method test3.
@Test
public void test3() {
SMGPDeliverMessage msg = new SMGPDeliverMessage();
msg.setDestTermId("13800138000");
msg.setLinkId("1023rsd");
SMGPReportData report = new SMGPReportData();
report.setStat("Delivd");
report.setDlvrd("111");
report.setDoneTime("20180703000111");
report.setErr("000");
report.setMsgId(new MsgId());
report.setSub("asf");
report.setSubTime("20180703000111");
report.setTxt("www");
msg.setReport(report);
msg.setMsgId(new MsgId());
msg.setSrcTermId("10086988");
testlongCodec(msg);
}
Aggregations