SpringBoot整合WebService(远程调用版)

SoapUI工具

下载地址:https://www.soapui.org/downloads/soapui/

1、安装后,打开 SoapUI,点击“file -> NEW Soap Object”出现以下界面, 将刚刚下载的 wsdl 文件导入

image

2、在生成的 Soap Object 中,找到自己要测试的方法,一般来说一个 wsdl 文件对应一个接口方法,如下图

image

3、选择好测试方法之后,点击下面的 Request,进入测试界面,首先更换测试 的 URL,根据接口对接文档,更改参数,如下图

image

整合总流程

  1. 配置maven包(pom.xml)

  2. 编写webservice工具类(封装xml格式的头部参数和body请求参数)

  3. 编写httpclient工具类

  4. 调用webservice请求

1、MAVEN配置

 <!-- Apache CXF核心库 -->
 <dependency>
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-rt-frontend-jaxws</artifactId>
   <version>3.4.3</version> <!-- 使用最新版本或你需要的版本 -->
 </dependency>
 <!-- Apache CXF SOAP支持 -->
 <dependency>
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-rt-transports-http</artifactId>
   <version>3.4.3</version> <!-- 使用最新版本或你需要的版本 -->
 </dependency>
 <dependency>
   <groupId>com.alibaba</groupId>
   <artifactId>fastjson</artifactId>
   <version>1.2.11</version>
 </dependency>

2、编写webservice工具类

       /**
        * 正常调用的(常用)
        * @param flag 对应部门
        * @param methodName 方法名称
        * @param param 请求头部参数
        * @param xml 请求参数
        * @param name 命名空间
        * @return
        */
       public static String getTemplatezw(String flag, String methodName, Map<String, String> headerMap, String xml, String name) {
         String nameSpace = StringUtils.isNotEmpty(name) ? name : "WEB";
         StringBuffer wsdl = getHeadzw(nameSpace, headerMap, flag); // 头部xml封装
         wsdl.append("<soapenv:Body>").append("\n");
         wsdl.append(getBodyByFlag(flag, methodName, headerMap, xml, nameSpace)); // 请求参数封装
         wsdl.append("</soapenv:Body>").append("\n");
         wsdl.append("</soapenv:Envelope>").append("\n");
         return wsdl.toString();
       }
 ​
     /**
      * 非公安部xml头部信息
      * @param nameSpace
      * @param headParam
      * @param flag
      * @return
      */
     public static StringBuffer getHeadzw(String nameSpace, Map<String, String> headParam, String flag) {
         StringBuffer head = new StringBuffer();
         changeXlns(head, nameSpace, flag); // xml头部信息
         head.append("<soapenv:Header>").append("\n");
         head.append("<tongtechheader>").append("\n");
         head.append("<gjzwfwpt_rid>" + (String)headParam.get("gjzwfwpt_rid") + "</gjzwfwpt_rid>").append("\n");
         head.append("<gjzwfwpt_sid>" + (String)headParam.get("gjzwfwpt_sid") + "</gjzwfwpt_sid>").append("\n");
         head.append("<gjzwfwpt_rtime>" + (String)headParam.get("gjzwfwpt_rtime") + "</gjzwfwpt_rtime>").append("\n");
         head.append("<gjzwfwpt_sign>" + (String)headParam.get("gjzwfwpt_sign") + "</gjzwfwpt_sign>").append("\n");
         head.append("</tongtechheader>").append("\n");
         head.append("</soapenv:Header>").append("\n");
         return head;
     }
 ​
     public static void changeXlns(StringBuffer head, String nameSpace, String flag) {
         if (flag.equals("GAB")) { // 对应部门
             head.append(GABRequestMsg.getHead());
         } else if (flag.equals("SWJ")) { // 对应部门
             head.append(SWJRequestMsg.getHead());
         }
     }
 ​
     public static String getHead() {
             return "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://webservice.com\" >";
     }
 ​
 ​
 ​
     public static String getBodyByFlag(String flag, String methodName, Map<String, String> headerMap, String xml, String nameSpace) {
         String body = "";
         if (flag.equals("GAB")) { // 对应部门
             body = GABRequestMsg.getBodyTemple(methodName, xml, nameSpace);
 ​
         } else if (flag.equals("SWJ")) { // 对应部门
             body = SWJRequestMsg.getBodyTemple("", xml, "");
         } else {
             body = xml;
         }
         return body;
     }
 ​
 ​
     /**
      * xml模板
      * @param methodName
      * @param xml 请求参数
      * @param nameSpace
      * @return
      */
     public static String getBodyTemple(String methodName, String xml, String nameSpace) {
         StringBuffer body = new StringBuffer();
         body.append("<dsp:queryQsxx>").append("\n");
         body.append("<dsp:xml>").append("\n");
         body.append(xml);
         body.append("</dsp:xml>").append("\n");
         body.append("</dsp:queryQsxx>").append("\n");
         return body.toString();
     }
   
     /**
      * map参数模板
      * 税务局_第三批-清税证明信息
      * @param param 请求参数
      * @return
      */
     public static String getBodyMap(Map<String, String> param) {
         StringBuffer body = new StringBuffer();
         body.append("<xsd:PAGE>" + (String)param.get("page") + "</xsd:PAGE>").append("\n");
         body.append("<xsd:PAGESIZE>" + (String)param.get("pagesize") + "</xsd:PAGESIZE>").append("\n");
         body.append("<xsd1:JGMC>" + (String)param.get("jgmc") + "</xsd1:JGMC>").append("\n");
         body.append("<xsd1:TYXYDM>" + (String)param.get("tyxydm") + "</xsd1:TYXYDM>").append("\n");
         return body.toString();
     }

3、编写httpclient工具类

HttpClientUtil.java
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.utils.URIBuilder;
 import org.apache.http.conn.ssl.NoopHostnameVerifier;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.ssl.SSLContexts;
 import org.apache.http.ssl.TrustStrategy;
 import org.apache.http.util.EntityUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Repository;
 import javax.net.ssl.SSLContext;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLEncoder;
 import java.security.KeyStore;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 ​
 @Repository
 public class HttpClientUtil {
     private static CloseableHttpClient httpClient = null;
     private static int connectTimeout = 5000;
     private static int cocketTimeout = 10000;
     private static final Logger log = LoggerFactory.getLogger(com.isoftstone.cascade02.utils.HttpClientUtil.class);
 ​
     public HttpClientUtil() {
         if (null == httpClient) {
             PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
             cm.setMaxTotal(200);
             cm.setDefaultMaxPerRoute(200);
             cm.setValidateAfterInactivity(cocketTimeout);
             httpClient = HttpClients.custom().setConnectionManager(cm).build();
         }
 ​
     }
 ​
     public static String doPost(String url, Map<String, String> headerMap, String json) {
         HttpPost httpPost = new HttpPost(url);
         RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
         httpPost.setConfig(requestConfig);
         httpPost.addHeader("Content-Type", "application/json");
         if (headerMap != null) {
             Iterator var5 = headerMap.entrySet().iterator();
 ​
             while(var5.hasNext()) {
                 Entry<String, String> entry = (Entry)var5.next();
                 httpPost.addHeader((String)entry.getKey(), (String)entry.getValue());
             }
         }
 ​
         StringEntity bodyParams = new StringEntity(json, "UTF-8");
         bodyParams.setContentType("text/json");
         bodyParams.setContentEncoding(new BasicHeader("Content-Type", "application/json"));
         httpPost.setEntity(bodyParams);
         CloseableHttpResponse response = null;
 ​
         String result;
         try {
             response = httpClient.execute(httpPost);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (IOException var12) {
             result = var12.getMessage();
         } finally {
             closeResponse(response);
         }
 ​
         return result;
     }
 ​
     public static String doPostsWSDL(String url, String soapRequestData) {
         String content = "";
         HttpPost httpPost = new HttpPost(url);
         RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
         httpPost.setConfig(requestConfig);
         httpPost.setHeader("Content-type", "application/soap+xml; charset=utf-8");
         StringEntity bodyParams = new StringEntity(soapRequestData, "UTF-8");
         httpPost.setEntity(bodyParams);
         CloseableHttpResponse response = null;
 ​
         try {
             response = httpClient.execute(httpPost);
             content = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (ClientProtocolException var12) {
             content = "http request error http ClientProtocolException";
             log.error(var12.getMessage());
         } catch (IOException var13) {
             content = "http request error http IOException";
             log.error(var13.getMessage());
         } finally {
             closeResponse(response);
         }
 ​
         return content;
     }
 ​
     public static String doPostNew(String url, Map<String, String> headerMap, String json) {
         HttpPost httpPost = new HttpPost(url);
         httpPost.setHeader("Content-type", "application/json; charset=utf-8");
         RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
         httpPost.setConfig(requestConfig);
         if (headerMap != null) {
             Iterator var5 = headerMap.entrySet().iterator();
 ​
             while(var5.hasNext()) {
                 Entry<String, String> entry = (Entry)var5.next();
                 httpPost.addHeader((String)entry.getKey(), ((String)entry.getValue()).toString());
             }
         }
         StringEntity bodyParams = new StringEntity(json, "UTF-8");
         httpPost.setEntity(bodyParams);
         CloseableHttpResponse response = null;
         String result;
         try {
             response = httpClient.execute(httpPost);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (Exception var12) {
             result = var12.getMessage();
         } finally {
             closeResponse(response);
         }
 ​
         return result;
     }
 ​
     public static String doPostNew2(String url, Map<String, String> headerMap, String json) {
         HttpPost httpPost = new HttpPost(url + json);
         RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
         httpPost.setConfig(requestConfig);
         httpPost.setHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
         if (headerMap != null) {
             Iterator var5 = headerMap.entrySet().iterator();
 ​
             while(var5.hasNext()) {
                 Entry<String, String> entry = (Entry)var5.next();
                 httpPost.addHeader((String)entry.getKey(), ((String)entry.getValue()).toString());
             }
         }
 ​
         CloseableHttpResponse response = null;
 ​
         String result;
         try {
             response = httpClient.execute(httpPost);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (IOException var11) {
             var11.printStackTrace();
             result = var11.getMessage();
         } finally {
             closeResponse(response);
         }
 ​
         return result;
     }
 ​
     public static String doGetNew2(String url, Map<String, String> headerMap, String json) {
         HttpGet httpGet = null;
         CloseableHttpResponse response = null;
 ​
         String result;
         try {
             httpGet = new HttpGet(url + json);
             RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
             httpGet.setConfig(requestConfig);
             httpGet.setHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
             if (headerMap != null) {
                 Iterator var7 = headerMap.entrySet().iterator();
 ​
                 while(var7.hasNext()) {
                     Entry<String, String> entry = (Entry)var7.next();
                     httpGet.addHeader((String)entry.getKey(), ((String)entry.getValue()).toString());
                 }
             }
 ​
             response = httpClient.execute(httpGet);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (IOException var12) {
             result = var12.getMessage();
         } finally {
             closeResponse(response);
         }
 ​
         return result;
     }
 ​
     public static void closeResponse(CloseableHttpResponse response) {
         if (null != response) {
             try {
                 response.close();
             } catch (IOException var2) {
                 var2.printStackTrace();
             }
         }
 ​
     }
   
     public static String doGetNew(String url, Map<String, String> map, Map<String, String> header) {
         String result = "";
         CloseableHttpResponse response = null;
 ​
         try {
             URIBuilder uriBuilder = new URIBuilder(url);
             if (map != null) {
                 Iterator var6 = map.entrySet().iterator();
 ​
                 while(var6.hasNext()) {
                     Entry<String, String> entry = (Entry)var6.next();
                     uriBuilder.setParameter((String)entry.getKey(), (String)entry.getValue());
                 }
             }
             HttpGet httpGet = new HttpGet(uriBuilder.build().toString());
             RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
             httpGet.setConfig(requestConfig);
             Set<String> keys = header.keySet();
             Iterator keyIt = keys.iterator();
 ​
             while(keyIt.hasNext()) {
                 String key = (String)keyIt.next();
                 httpGet.addHeader(key, (String)header.get(key));
             }
 ​
             response = httpClient.execute(httpGet);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (Exception var14) {
             result = var14.getMessage();
         } finally {
             closeResponse(response);
         }
 ​
         return result;
     }
 ​
     public static String doPostsWSDL2(String url, String soapRequestData) {
         String result = "";
         OutputStream os = null;
         InputStream is = null;
         HttpURLConnection conn = null;
 ​
         try {
             URL wsUrl = new URL(url);
             conn = (HttpURLConnection)wsUrl.openConnection();
             conn.setDoInput(true);
             conn.setDoOutput(true);
             conn.setRequestMethod("POST");
             conn.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");
             conn.setConnectTimeout(connectTimeout);
             conn.setReadTimeout(2000);
             os = conn.getOutputStream();
             os.write(soapRequestData.getBytes());
             is = conn.getInputStream();
             byte[] b = new byte[1024];
 ​
             String ss;
             int len;
             for(boolean var8 = false; (len = is.read(b)) != -1; result = result + ss) {
                 ss = new String(b, 0, len, "UTF-8");
             }
         } catch (IOException var18) {
             result = var18.getMessage();
         } finally {
             try {
                 if (null != is) {
                     is.close();
                 }
 ​
                 if (null != os) {
                     os.close();
                 }
 ​
                 if (null != conn) {
                     conn.disconnect();
                 }
             } catch (IOException var17) {
                 result = var17.getMessage();
             }
 ​
         }
 ​
         return result;
     }
 ​
     public static String doPost_new_Y(String url, Map<String, String> headerMap, Map<String, String> paramsMap) {
         HttpPost httpPost = new HttpPost(url);
         RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
         httpPost.setConfig(requestConfig);
         httpPost.addHeader("Content-Type", "application/json");
         if (headerMap != null) {
             Iterator var5 = headerMap.entrySet().iterator();
 ​
             while(var5.hasNext()) {
                 Entry<String, String> entry = (Entry)var5.next();
                 httpPost.addHeader((String)entry.getKey(), (String)entry.getValue());
             }
         }
         String paramsString = null;
         ObjectMapper mapper = new ObjectMapper();
         try {
             paramsString = mapper.writeValueAsString(paramsMap);
         } catch (JsonProcessingException var17) {
             var17.printStackTrace();
         }
 ​
         StringEntity bodyParams = new StringEntity(paramsString, "UTF-8");
         bodyParams.setContentType("text/json");
         bodyParams.setContentEncoding(new BasicHeader("Content-Type", "application/json"));
         httpPost.setEntity(bodyParams);
         CloseableHttpResponse response = null;
         String result;
         try {
             response = httpClient.execute(httpPost);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (IOException var15) {
             result = var15.getMessage();
         } finally {
             closeResponse(response);
         }
         return result;
     }
 ​
     public static void main(String[] args) {
         /*Map<String, String> headerMap = new HashMap();
         Map<String, String> parameMap = new HashMap();
         Map<String, String> parameMap2 = new HashMap();
         parameMap2.put("suspectLegalName", "suspectLegalName");
         parameMap2.put("suspectLegalPerson", "suspectLegalPerson");
         parameMap2.put("suspectUnifiedCode", "suspectUnifiedCode");
         ObjectMapper mapper = new ObjectMapper();
         try {
             parameMap.put("ueryParams",mapper.writeValueAsString(parameMap2));
         } catch (JsonProcessingException e) {
             LoggerUtIls.warn("输入参数 JSON转换失败!");
         }
         doGet_http_Y(Constants.COUNTRY_SERVICE_HTTP_GXB_XCHY, headerMap, parameMap);
         try {
             String url = URLEncoder.encode("hello 2", "UTF-8");
             System.out.println(url);
         } catch (UnsupportedEncodingException var2) {
             var2.printStackTrace();
         }*/
         String url = "http://59.255.22.70:8443/gateway/httpproxy?ueryParams={\"suspectUnifiedCode\":\"suspectUnifiedCode\",\"suspectLegalPerson\":\"suspectLegalPerson\",\"suspectLegalName\":\"suspectLegalName\"}";
         String substring = url.substring(54);
         System.out.println(substring);
 ​
     }
 ​
     public static String doGet_https_Y(String url, Map<String, String> headerMap, Map<String, String> paramsMap) {
         String result = "";
         try {
             TrustStrategy acceptingTrustStrategy = (x509Certificates, authType) -> {
                 return true;
             };
             SSLContext sslContext = SSLContexts.custom().loadTrustMaterial((KeyStore)null, acceptingTrustStrategy).build();
             SSLConnectionSocketFactory connectionSocketFactory = new SSLConnectionSocketFactory(sslContext, new NoopHostnameVerifier());
             HttpClientBuilder httpClientBuilder = HttpClients.custom();
             httpClientBuilder.setSSLSocketFactory(connectionSocketFactory);
             CloseableHttpClient httpClient = httpClientBuilder.build();
             StringBuilder sendUrl = new StringBuilder(url);
             if (paramsMap != null) {
                 sendUrl.append('?');
                 Iterator var10 = paramsMap.entrySet().iterator();
 ​
                 while(var10.hasNext()) {
                     Entry<String, String> entry = (Entry)var10.next();
                     sendUrl.append((String)entry.getKey());
                     sendUrl.append('=');
                     sendUrl.append(((String)entry.getValue()).toString());
                     sendUrl.append('&');
                 }
             }
 ​
             HttpGet httpGet = new HttpGet(sendUrl.toString());
             RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
             httpGet.setConfig(requestConfig);
             if (headerMap != null) {
                 Iterator var12 = headerMap.entrySet().iterator();
 ​
                 while(var12.hasNext()) {
                     Entry<String, String> entry = (Entry)var12.next();
                     httpGet.addHeader((String)entry.getKey(), ((String)entry.getValue()).toString());
                 }
             }
 ​
             httpGet.setHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
             CloseableHttpResponse response = httpClient.execute(httpGet);
             if (response.getStatusLine().getStatusCode() == 200) {
                 HttpEntity entity = response.getEntity();
                 result = EntityUtils.toString(entity, "utf-8");
                 EntityUtils.consume(response.getEntity());
             }
 ​
             response.close();
             httpClient.close();
         } catch (Exception var14) {
             var14.printStackTrace();
             result = var14.getMessage();
         }
         return result;
     }
 ​
     public static String doGet_http_Y(String url, Map<String, String> headerMap, Map<String, String> paramsMap) {
         HttpGet httpGet = null;
         CloseableHttpResponse response = null;
         String result;
         try {
             StringBuilder sendUrl = new StringBuilder(url);
             if (paramsMap != null) {
                 sendUrl.append('?');
                 Iterator var7 = paramsMap.entrySet().iterator();
                 int i = 0;
                 while(var7.hasNext()) {
                     if (i > 0) {
                         sendUrl.append('&');
                     }
                     Entry<String, String> entry = (Entry)var7.next();
                     sendUrl.append((String)entry.getKey());
                     sendUrl.append('=');
                     sendUrl.append(((String)entry.getValue()).toString());
                     i++;
                 }
             }
             httpGet = new HttpGet(sendUrl.toString());
             RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(cocketTimeout).setConnectTimeout(connectTimeout).build();
             httpGet.setConfig(requestConfig);
             httpGet.setHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
             if (headerMap != null) {
                 Iterator var16 = headerMap.entrySet().iterator();
 ​
                 while(var16.hasNext()) {
                     Entry<String, String> entry = (Entry)var16.next();
                     httpGet.addHeader((String)entry.getKey(), ((String)entry.getValue()).toString());
                 }
             }
             response = httpClient.execute(httpGet);
             result = EntityUtils.toString(response.getEntity(), "UTF-8");
             EntityUtils.consume(response.getEntity());
         } catch (IOException var13) {
             result = var13.getMessage();
         } finally {
             closeResponse(response);
         }
         return result;
     }
 }
 ​

 

4、调用webservice请求

 @Autowired
 private HttpClientUtil httpClientUtil;
 ​
     @Override
     public String getGJSWJQSZMINFO(String shxydm) {
         long startTime = CommonUtils.getTimestamp();
         String wyUUid = CommonUtils.getUUID();
         String strCs = "xxxx查询服务 请求唯一UUID=:" + wyUUid + ",开始时间:" + CommonUtils.df.format(new Date()) + ",方法:getGJSWJQSZMINFO,请求的参数:shxydm=" + shxydm ;
         LoggerUtIls.info(strCs);
         //        通过方法名获取该服务密钥配置信息
         CountrySecretConfig secretConfig = secretConfigService.findByMethod("getGJSWJQSZMINFO");
         String result = "";
         if (secretConfig != null) {
             Map<String, String> headerMap = CountryServiceUtils.getYthHeaderMap(secretConfig);
             Map<String, String> parameMap = new HashMap();
             parameMap.put("shxydm", shxydm);
             String selectJSON = JSONArray.toJSONString(parameMap); // 转化为JSOn格式
           //String selectxml = SWJRequestMsg.getBodyMap(parameMap); // 转化为xml格式
             result = HttpClientUtil.doPostsWSDL(Constants.COUNTRY_SERVICE_WEBSERVICE, XMLUtil.getTemplatezw("SWJ", "queryQsxx", headerMap, selectJSON, null));
             long endTime = System.currentTimeMillis();
             String strReturn = "xxxx查询服务 请求唯一UUID=" + wyUUid + ",结束时间:" + CommonUtils.df.format(new Date()) + ",国家返回时间毫秒数:" + (endTime - startTime) + ",国家返回结果:" + result;
             LoggerUtIls.info(strReturn);
             return result;
         }
         return "密钥配置信息不存在,请核实!";
     }
 ​

 

 

posted @ 2025-11-22 08:54  阿尔法哲  阅读(12)  评论(0)    收藏  举报