|
|
|
@ -35,36 +35,38 @@ public class WebServiceImpl implements Webservcies {
|
|
|
|
|
|
|
|
|
|
@Value("${webservice.address}")
|
|
|
|
|
public String address;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
@Value("${webservice.connecttime}")
|
|
|
|
|
public Integer connecttime;
|
|
|
|
|
public int connecttime;
|
|
|
|
|
|
|
|
|
|
@Value("${webservice.receivetime}")
|
|
|
|
|
public Integer receivetime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int receivetime;
|
|
|
|
|
|
|
|
|
|
// private static String address = "http://10.238.71.98:18096/ppa/webservice/CAGAccessService?wsdl";
|
|
|
|
|
//
|
|
|
|
|
// public static int receivetime = 60;
|
|
|
|
|
//
|
|
|
|
|
// public static int connecttime = 60;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 上传cac数据
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void uploadData() {
|
|
|
|
|
// log.info("实时数据定时任务启动");
|
|
|
|
|
// // 动态客户端
|
|
|
|
|
// JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
// log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
// //根据WebServices接口地址创建client
|
|
|
|
|
// Client client = clientFactory.createClient(address);
|
|
|
|
|
// HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
// HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
// policy.setAllowChunking(false);
|
|
|
|
|
// // 连接服务器超时时间 60秒
|
|
|
|
|
// policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// // 等待服务器响应超时时间 60秒
|
|
|
|
|
// policy.setReceiveTimeout(receivetime);
|
|
|
|
|
// conduit.setClient(policy);
|
|
|
|
|
Client client = null;
|
|
|
|
|
log.info("实时数据定时任务启动");
|
|
|
|
|
// 动态客户端
|
|
|
|
|
JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
//根据WebServices接口地址创建client
|
|
|
|
|
Client client = clientFactory.createClient(address);
|
|
|
|
|
HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
policy.setAllowChunking(false);
|
|
|
|
|
// 连接服务器超时时间 60秒
|
|
|
|
|
policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// 等待服务器响应超时时间 60秒
|
|
|
|
|
policy.setReceiveTimeout(receivetime);
|
|
|
|
|
conduit.setClient(policy);
|
|
|
|
|
log.info("开始执行定时任务-查询数据库");
|
|
|
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
|
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
|
|
@ -88,21 +90,20 @@ public class WebServiceImpl implements Webservcies {
|
|
|
|
|
//放到配置文件
|
|
|
|
|
@Override
|
|
|
|
|
public void uploadyspData() {
|
|
|
|
|
// log.info("油色谱数据定时任务启动");
|
|
|
|
|
// // 动态客户端
|
|
|
|
|
// JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
// log.info("油色谱数据 publicsecurity webService url : {}", address);
|
|
|
|
|
// //根据WebServices接口地址创建client
|
|
|
|
|
// Client client = clientFactory.createClient(address);
|
|
|
|
|
// HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
// HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
// policy.setAllowChunking(false);
|
|
|
|
|
// // 连接服务器超时时间 60秒
|
|
|
|
|
// policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// // 等待服务器响应超时时间 60秒
|
|
|
|
|
// policy.setReceiveTimeout(receivetime);
|
|
|
|
|
// conduit.setClient(policy);
|
|
|
|
|
Client client = null;
|
|
|
|
|
log.info("油色谱数据定时任务启动");
|
|
|
|
|
// 动态客户端
|
|
|
|
|
JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
log.info("油色谱数据 publicsecurity webService url : {}", address);
|
|
|
|
|
//根据WebServices接口地址创建client
|
|
|
|
|
Client client = clientFactory.createClient(address);
|
|
|
|
|
HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
policy.setAllowChunking(false);
|
|
|
|
|
// 连接服务器超时时间 60秒
|
|
|
|
|
policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// 等待服务器响应超时时间 60秒
|
|
|
|
|
policy.setReceiveTimeout(receivetime);
|
|
|
|
|
conduit.setClient(policy);
|
|
|
|
|
log.info("开始执行定时任务-查询数据库");
|
|
|
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
|
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
|
|
@ -115,21 +116,20 @@ public class WebServiceImpl implements Webservcies {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void uploadjfjcData() {
|
|
|
|
|
// log.info("局放监测数据定时任务启动");
|
|
|
|
|
// // 动态客户端
|
|
|
|
|
// JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
// log.info("局放监测数据 publicsecurity webService url : {}", address);
|
|
|
|
|
// //根据WebServices接口地址创建client
|
|
|
|
|
// Client client = clientFactory.createClient(address);
|
|
|
|
|
// HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
// HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
// policy.setAllowChunking(false);
|
|
|
|
|
// // 连接服务器超时时间 60秒
|
|
|
|
|
// policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// // 等待服务器响应超时时间 60秒
|
|
|
|
|
// policy.setReceiveTimeout(receivetime);
|
|
|
|
|
// conduit.setClient(policy);
|
|
|
|
|
Client client = null;
|
|
|
|
|
log.info("局放监测数据定时任务启动");
|
|
|
|
|
// 动态客户端
|
|
|
|
|
JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
log.info("局放监测数据 publicsecurity webService url : {}", address);
|
|
|
|
|
//根据WebServices接口地址创建client
|
|
|
|
|
Client client = clientFactory.createClient(address);
|
|
|
|
|
HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
policy.setAllowChunking(false);
|
|
|
|
|
// 连接服务器超时时间 60秒
|
|
|
|
|
policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// 等待服务器响应超时时间 60秒
|
|
|
|
|
policy.setReceiveTimeout(receivetime);
|
|
|
|
|
conduit.setClient(policy);
|
|
|
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
|
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
|
|
|
for (Niec_Sensors item : niec_sensors) {
|
|
|
|
@ -142,21 +142,20 @@ public class WebServiceImpl implements Webservcies {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void uploadyxData() {
|
|
|
|
|
// log.info("实时数据定时任务启动");
|
|
|
|
|
// // 动态客户端
|
|
|
|
|
// JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
// log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
// //根据WebServices接口地址创建client
|
|
|
|
|
// Client client = clientFactory.createClient(address);
|
|
|
|
|
// HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
// HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
// policy.setAllowChunking(false);
|
|
|
|
|
// // 连接服务器超时时间 60秒
|
|
|
|
|
// policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// // 等待服务器响应超时时间 60秒
|
|
|
|
|
// policy.setReceiveTimeout(receivetime);
|
|
|
|
|
// conduit.setClient(policy);
|
|
|
|
|
Client client = null;
|
|
|
|
|
log.info("实时数据定时任务启动");
|
|
|
|
|
// 动态客户端
|
|
|
|
|
JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
//根据WebServices接口地址创建client
|
|
|
|
|
Client client = clientFactory.createClient(address);
|
|
|
|
|
HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
policy.setAllowChunking(false);
|
|
|
|
|
// 连接服务器超时时间 60秒
|
|
|
|
|
policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// 等待服务器响应超时时间 60秒
|
|
|
|
|
policy.setReceiveTimeout(receivetime);
|
|
|
|
|
conduit.setClient(policy);
|
|
|
|
|
log.info("开始执行定时任务-查询数据库");
|
|
|
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
|
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
|
|
@ -169,21 +168,20 @@ public class WebServiceImpl implements Webservcies {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void uploaddcywData() {
|
|
|
|
|
// log.info("实时数据定时任务启动");
|
|
|
|
|
// // 动态客户端
|
|
|
|
|
// JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
// log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
// //根据WebServices接口地址创建client
|
|
|
|
|
// Client client = clientFactory.createClient(address);
|
|
|
|
|
// HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
// HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
// policy.setAllowChunking(false);
|
|
|
|
|
// // 连接服务器超时时间 60秒
|
|
|
|
|
// policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// // 等待服务器响应超时时间 60秒
|
|
|
|
|
// policy.setReceiveTimeout(receivetime);
|
|
|
|
|
// conduit.setClient(policy);
|
|
|
|
|
Client client = null;
|
|
|
|
|
log.info("实时数据定时任务启动");
|
|
|
|
|
// 动态客户端
|
|
|
|
|
JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
//根据WebServices接口地址创建client
|
|
|
|
|
Client client = clientFactory.createClient(address);
|
|
|
|
|
HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
policy.setAllowChunking(false);
|
|
|
|
|
// 连接服务器超时时间 60秒
|
|
|
|
|
policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// 等待服务器响应超时时间 60秒
|
|
|
|
|
policy.setReceiveTimeout(receivetime);
|
|
|
|
|
conduit.setClient(policy);
|
|
|
|
|
log.info("开始执行定时任务-查询数据库");
|
|
|
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
|
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
|
|
@ -196,21 +194,20 @@ public class WebServiceImpl implements Webservcies {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void uploadjsyhwjyjcData() {
|
|
|
|
|
// log.info("实时数据定时任务启动");
|
|
|
|
|
// // 动态客户端
|
|
|
|
|
// JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
// log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
// //根据WebServices接口地址创建client
|
|
|
|
|
// Client client = clientFactory.createClient(address);
|
|
|
|
|
// HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
// HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
// policy.setAllowChunking(false);
|
|
|
|
|
// // 连接服务器超时时间 60秒
|
|
|
|
|
// policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// // 等待服务器响应超时时间 60秒
|
|
|
|
|
// policy.setReceiveTimeout(receivetime);
|
|
|
|
|
// conduit.setClient(policy);
|
|
|
|
|
Client client = null;
|
|
|
|
|
log.info("实时数据定时任务启动");
|
|
|
|
|
// 动态客户端
|
|
|
|
|
JaxWsDynamicClientFactory clientFactory = JaxWsDynamicClientFactory.newInstance();
|
|
|
|
|
log.info("实时数据 publicsecurity webService url : {}", address);
|
|
|
|
|
//根据WebServices接口地址创建client
|
|
|
|
|
Client client = clientFactory.createClient(address);
|
|
|
|
|
HTTPConduit conduit = (HTTPConduit) client.getConduit();
|
|
|
|
|
HTTPClientPolicy policy = new HTTPClientPolicy();
|
|
|
|
|
policy.setAllowChunking(false);
|
|
|
|
|
// 连接服务器超时时间 60秒
|
|
|
|
|
policy.setConnectionTimeout(connecttime);
|
|
|
|
|
// 等待服务器响应超时时间 60秒
|
|
|
|
|
policy.setReceiveTimeout(receivetime);
|
|
|
|
|
conduit.setClient(policy);
|
|
|
|
|
log.info("开始执行定时任务-查询数据库");
|
|
|
|
|
HashMap<Integer, Niec_Sensors> equipMap = new HashMap();
|
|
|
|
|
List<Niec_Sensors> niec_sensors = niec_sensorsDao.selectAll();
|
|
|
|
|