Commit adf94f21 by yuwei

项目初始化

parent d821a3ae
......@@ -84,22 +84,22 @@ public class ServiceExecuteServiceImpl implements ServiceExecuteService {
}
// http服务
HttpMethod httpMethod = HttpMethod.GET;
if (ReqMethod.POST.getDesc().equals(serviceIntegrationEntity.getServiceHttpMethod())) {
if (ReqMethod.POST.getDesc().equals(serviceIntegrationEntity.getHttpService().getHttpMethod())) {
httpMethod = HttpMethod.POST;
}
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<>(params, headers);
try {
response = restTemplate.exchange(serviceIntegrationEntity.getServiceUrl(), httpMethod, httpEntity, String.class);
response = restTemplate.exchange(serviceIntegrationEntity.getHttpService().getUrl(), httpMethod, httpEntity, String.class);
} catch (Exception e) {
throw new DataException(e.getMessage());
}
} else if (ServiceType.WEBSERVICE.getKey().equals(serviceIntegrationEntity.getServiceType())) {
// webservice服务
headers.add("SOAPAction", serviceIntegrationEntity.getServiceTargetNamespace() + serviceIntegrationEntity.getServiceMethod());
headers.add("SOAPAction", serviceIntegrationEntity.getWebService().getTargetNamespace() + serviceIntegrationEntity.getWebService().getMethod());
headers.add("Content-Type", "text/xml;charset=UTF-8");
HttpEntity<String> entity = new HttpEntity<>(execute.getSoap(), headers);
try {
response = restTemplate.exchange(serviceIntegrationEntity.getServiceWsdl(), HttpMethod.POST, entity, String.class);
response = restTemplate.exchange(serviceIntegrationEntity.getWebService().getWsdl(), HttpMethod.POST, entity, String.class);
} catch (Exception e) {
throw new DataException(e.getMessage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment