parent
024a964712
commit
7284c653ed
|
@ -101,22 +101,4 @@ public class EsbDataParser {
|
||||||
}
|
}
|
||||||
return returnData;
|
return returnData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
String str = "[{\"systemName\":\"\",\"children\":[{\"systemName\":\"\",\"children\":[{\"systemName\":\"\",\"children\":[],\"name\":\"CardNo\",\"description\":\"\",\"type\":\"string\",\"contentType\":\"30\",\"uuid\":\"295f4\",\"value\":\"627713288321\",\"required\":true,\"status\":\"\"},{\"name\":\"AccoutNo\",\"systemName\":\"\",\"status\":\"\",\"type\":\"string\",\"contentType\":\"6\",\"required\":false,\"description\":\"\",\"uuid\":\"3e8ef\",\"children\":[],\"value\":\"371421321\"}],\"name\":\"HEAD\",\"description\":\"\",\"type\":\"[object]\",\"contentType\":\"\",\"uuid\":\"55483\",\"required\":false,\"status\":\"\"},{\"name\":\"Body\",\"systemName\":\"\",\"status\":\"\",\"type\":\"[object]\",\"contentType\":\"\",\"required\":false,\"description\":\"\",\"uuid\":\"a088b\",\"children\":[{\"name\":\"returnFlag\",\"systemName\":\"\",\"status\":\"\",\"type\":\"string\",\"contentType\":\"2\",\"required\":false,\"description\":\"\",\"uuid\":\"76d75\",\"children\":[],\"value\":\"1\"}]}],\"name\":\"SERVICE\",\"description\":\"\",\"type\":\"[object]\",\"contentType\":\"\",\"uuid\":\"faf95\",\"required\":false,\"status\":\"\"}]";
|
|
||||||
List<EsbDataStruct> list = JSONArray.parseArray(str, EsbDataStruct.class);
|
|
||||||
String[] paramArr = new String[]{"HEAD"};
|
|
||||||
System.out.println(esbData2XmlByParamStruct(list, paramArr));
|
|
||||||
|
|
||||||
paramArr = new String[]{"SERVICE"};
|
|
||||||
System.out.println(esbData2XmlByParamStruct(list, paramArr));
|
|
||||||
|
|
||||||
paramArr = new String[]{"Body"};
|
|
||||||
System.out.println(esbData2XmlByParamStruct(list, paramArr));
|
|
||||||
|
|
||||||
paramArr = new String[]{"SERVICE","Body"};
|
|
||||||
System.out.println(esbData2XmlByParamStruct(list, paramArr));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,13 +54,4 @@ public class HarUtils {
|
||||||
Har har = JSONObject.parseObject(harJson, Har.class);
|
Har har = JSONObject.parseObject(harJson, Har.class);
|
||||||
return har;
|
return har;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
|
||||||
// String str = "%E6%B5%8B%AF";
|
|
||||||
String str = "测试";
|
|
||||||
str = URLEncoder.encode(str,"UTF-8");
|
|
||||||
System.out.println(str);
|
|
||||||
str = URLDecoder.decode(str,"UTF-8");
|
|
||||||
System.out.println(str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,18 +38,4 @@ public class MsWebSocketClient extends WebSocketClient{
|
||||||
public void onError(Exception e) {
|
public void onError(Exception e) {
|
||||||
System.out.println("异常"+e);
|
System.out.println("异常"+e);
|
||||||
}
|
}
|
||||||
public static void main(String[] args) {
|
|
||||||
try {
|
|
||||||
MsWebSocketClient client = new MsWebSocketClient("ws://127.0.0.1:8081/ws/22222");
|
|
||||||
client.connect();
|
|
||||||
System.out.println("建立websocket连接");
|
|
||||||
MsgDto dto = new MsgDto();
|
|
||||||
dto.setContent("099991023123123");
|
|
||||||
dto.setReportId("123123123");
|
|
||||||
dto.setToReport("3933abd9");
|
|
||||||
client.send(JSON.toJSONString(dto));
|
|
||||||
} catch (URISyntaxException e) {
|
|
||||||
LogUtil.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue