新增访问Topgp Webservice接口Demo

This commit is contained in:
Bo 2021-08-09 11:50:32 +08:00
parent dfe9c1a75b
commit 051a7695da
2 changed files with 4 additions and 6 deletions

View File

@ -1,9 +1,7 @@
package com.ruoyi.test.conrtroller;
import com.ruoyi.common.utils.XmlUtils;
import com.ruoyi.common.utils.TopgpXmlUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
@ -19,10 +17,10 @@ public class XmlWebserviceController {
public String SendXml() {
Map<String, Object> map = new HashMap<>();
map.put("responseInfo", "此处为测试消息");
String param = XmlUtils.GetTopgpRequestXml("express_testRequest", map);
String param = TopgpXmlUtils.GetTopgpRequestXml("express_testRequest", map);
String url = "http://192.168.2.81:85/web/ws/r/aws_ttsrv2_toptest";
String returnXml = HttpUtils.sendXmlPost(url,param);
return XmlUtils.GetStatusFromTopgpResponse(returnXml).toString();
return TopgpXmlUtils.GetStatusFromTopgpResponse(returnXml).toString();
}
}

View File

@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory;
import java.util.Map;
public class XmlUtils {
public class TopgpXmlUtils {
private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
/**