Browse Source

补充xml缺失的编码信息

pull/446/head
648540858 3 years ago
parent
commit
8553769e76
  1. 4
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java

4
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java

@ -145,9 +145,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
public String keepalive(ParentPlatform parentPlatform) { public String keepalive(ParentPlatform parentPlatform) {
String callId = null; String callId = null;
try { try {
String characterSet = parentPlatform.getCharacterSet();
StringBuffer keepaliveXml = new StringBuffer(200); StringBuffer keepaliveXml = new StringBuffer(200);
keepaliveXml.append("<?xml version=\"1.0\"?>\r\n"); keepaliveXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
keepaliveXml.append("<Notify>\r\n"); keepaliveXml.append("<Notify>\r\n");
keepaliveXml.append("<CmdType>Keepalive</CmdType>\r\n"); keepaliveXml.append("<CmdType>Keepalive</CmdType>\r\n");
keepaliveXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); keepaliveXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n");

Loading…
Cancel
Save