|
@@ -80,9 +80,13 @@ public class YongchengRequestApiComponents {
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
MediaType mediaType = MediaType.parseMediaType("text/xml;charset=UTF-8");
|
|
MediaType mediaType = MediaType.parseMediaType("text/xml;charset=UTF-8");
|
|
|
|
|
+
|
|
|
|
|
+ httpHeaders.set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 " +
|
|
|
|
|
+ "Safari/537.36");
|
|
|
httpHeaders.setContentType(mediaType);
|
|
httpHeaders.setContentType(mediaType);
|
|
|
|
|
|
|
|
- String xmlString = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"http://newWS.front.app.echannel.ebiz.alltrust.com/\">";
|
|
|
|
|
|
|
+ String xmlString = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tns=\"http://newWS.front" +
|
|
|
|
|
+ ".app.echannel.ebiz.alltrust.com/\">";
|
|
|
xmlString += "<soapenv:Body>";
|
|
xmlString += "<soapenv:Body>";
|
|
|
|
|
|
|
|
xmlString += gainXmlMapper().writeValueAsString(q);
|
|
xmlString += gainXmlMapper().writeValueAsString(q);
|
|
@@ -90,7 +94,8 @@ public class YongchengRequestApiComponents {
|
|
|
xmlString += "</soapenv:Body>\n" +
|
|
xmlString += "</soapenv:Body>\n" +
|
|
|
"</soapenv:Envelope>";
|
|
"</soapenv:Envelope>";
|
|
|
|
|
|
|
|
- InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\t---------> URl: {} \n---------> 保险公司:{} {}\n---------> 请求参数:{}", url, InsuranceEnum.AICS.getName(), requestUrl.getDesc(), xmlString);
|
|
|
|
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\t---------> URl: {} \n---------> 保险公司:{} {}\n---------> 请求参数:{}", url,
|
|
|
|
|
+ InsuranceEnum.AICS.getName(), requestUrl.getDesc(), xmlString);
|
|
|
HttpEntity<String> httpEntity = new HttpEntity<>(xmlString, httpHeaders);
|
|
HttpEntity<String> httpEntity = new HttpEntity<>(xmlString, httpHeaders);
|
|
|
|
|
|
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
|
|
@@ -100,7 +105,7 @@ public class YongchengRequestApiComponents {
|
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> 响应参数:{}", responseStringMsg);
|
|
InsuranceLog.infoLog(InsuranceEnum.AICS.getPinyin(), "\n\n---------> 响应参数:{}", responseStringMsg);
|
|
|
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseStringMsg);
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseStringMsg);
|
|
|
- if(!cleanStr.contains("<")){
|
|
|
|
|
|
|
+ if (!cleanStr.contains("<")) {
|
|
|
return (S) cleanStr;
|
|
return (S) cleanStr;
|
|
|
}
|
|
}
|
|
|
|
|
|