|
@@ -136,40 +136,6 @@ public class PatrolInspectionEventServiceImpl extends AbstractCrudService<Patrol
|
|
|
jsonObject.addProperty("infoType",2);
|
|
|
jsonObject.addProperty("id",patrolInspectionEvent.getId());
|
|
|
remoteMceService.addMce(jsonObject.toString());
|
|
|
- String url = "http://192.168.10.118:5901";
|
|
|
- String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> \n" +
|
|
|
- "<Agent ID=\"SSJCZHQY0001\" Type=\"18\" Ver=\"1.2.0.0\">\n" +
|
|
|
- "<DVRHeart State=\"1\" TotalSpace=\"XXXXX\" FreeSpace=\"XXXXXX\">\n" +
|
|
|
- "System,smss.exe,csrss.exe…\n" +
|
|
|
- "</DVRHeart>\n" +
|
|
|
- "<GetTicks/>\n" +
|
|
|
- "<OperationCmd Type=\"18\" Channel=\"0\" TriggerTime=\"2024-06-21 11:19:40\" Note=\"XXXXXX\" GUID=\"XXXXX…\">\n" +
|
|
|
- "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABsSFBcUERsXFhceHBsgKEIrKCUlKFE6PTBCYFVlZF9V…\n" +
|
|
|
- "</OperationCmd>\n" +
|
|
|
- "</Agent>";
|
|
|
- CloseableHttpClient httpClient = HttpClients.createDefault();
|
|
|
- HttpPost httpPost = new HttpPost(url);
|
|
|
- try {
|
|
|
- // 设置请求的内容为XML
|
|
|
- StringEntity entity = new StringEntity(xml);
|
|
|
- entity.setContentType("application/xml");
|
|
|
- httpPost.setEntity(entity);
|
|
|
-
|
|
|
- // 发送请求
|
|
|
- HttpResponse response = httpClient.execute(httpPost);
|
|
|
-
|
|
|
- // 打印响应状态和内容
|
|
|
- System.out.println("Response Status: " + response.getStatusLine().getStatusCode());
|
|
|
- System.out.println("Response Content: " + EntityUtils.toString(response.getEntity()));
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- } finally {
|
|
|
- try {
|
|
|
- httpClient.close();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
@Override
|