package com.accu.business.pms.webservice;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.encoding.XMLType;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

import com.accu.common.util.FileUtils;

public class MesureDeviceWebServiceDAS {

public static String queryMesureDevice(String commond, String guidStationId){
String result = "";
try {
Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationName(new QName("", "changeMesureDevice"));
call.addParameter("commond", XMLType.XSD_STRING, ParameterMode.IN);
call.setTargetEndpointAddress(new URL( FileUtils.getProperties("accuwebservice","mesureDeviceWebServiceDAS"+guidStationId)));
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
result=(String)call.invoke(new Object[] {commond});
} catch (Exception e) {
e.printStackTrace();
result = "error";
}
return result;
}

public static String queryMesureParam(String commond, String guidStationId){
String result = "";
try {
Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationName(new QName("", "changeMesureParam"));
call.addParameter("commond", XMLType.XSD_STRING, ParameterMode.IN);
call.setTargetEndpointAddress(new URL( FileUtils.getProperties("accuwebservice","mesureDeviceWebServiceDAS"+guidStationId)));
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
result=(String)call.invoke(new Object[] {commond});
} catch (Exception e) {
e.printStackTrace();
result = "error";
}
return result;
}

/* public static Boolean queryMesureDevice(String stationId){
Boolean result = true;
MesureDeviceWebService rdrw = pws.getServiceClass();
try {
MetersMapper mmapper = SpringContextHolder.getBeanbyClass(MetersMapper.class);
List<Meters> metersList = mmapper.getMesureDeviceByStationId(stationId);
rdrw.changeMesureDevice(metersList);
} catch (Exception e) {
e.printStackTrace();
result = false;
}
return result;
}

public static Boolean queryMesureParam(String stationId){
Boolean result = true;
MesureDeviceWebService rdrw = pws.getServiceClass();
try {
MeasureParamMapper mpMapper = SpringContextHolder.getBeanbyClass(MeasureParamMapper.class);
List<MeasureParam> measureParamList = mpMapper.getMesureParamByStationId(stationId);
rdrw.changeMesureParam(measureParamList);
} catch (Exception e) {
e.printStackTrace();
result = false;
}
return result;
}*/
}

MesureDeviceWebServiceDAS的更多相关文章

随机推荐

  1. RDP协议暴力破解

    真实案例|RDP协议暴力破解卷土重来! 作者:aqniu星期六, 七月 2, 20160   背景 RDP(Remote Desktop Protocol)称为“远程桌面登录协议”,即当某台计算机开启 ...

  2. 026——VUE中事件修饰符之使用$event与$prevent修饰符操作表单

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  3. 同一主机,不同域名绑定不同网站(IIS主机头实现方法)

    说明: 网站A域名:www.weba.com 网站A路径:D:\website\weba 网站B域名:www.webb.com 网站B路径:D:\website\webb 公用主机IP:111.222 ...

  4. 【lightoj-1024】Eid (高精度)

    [题意] 给定n个数,求这n个数的最小公倍数. [题解] 最小公倍数当然不能按常规方法来求,因为最大的数将近是10000^1000级别的.然鹅最小公倍数怎么搞呢? 这里发现了一个规律: 4 5 6 3 ...

  5. 十四、dbms_obfuscation_toolkit(用于加密和解密应用数据)

    1.概述 作用:用于加密和解密应用数据,另外还可以生成密码检验和.通过加密输入数据,可以防止黑客或其他用户窃取私有数据;而通过结合使用加密和密码检验和,可以防止黑客破坏初加密的数据.当使用该包加密数据 ...

  6. UITextField 限制用户输入小数点后位数的方法

    UITextField 限制用户输入小数点后位数的方法 位数限制: limited 在UITextField的代理方法中添加类似如下代码 - (BOOL)textField:(UITextField ...

  7. Linux:uniq命令详解

    uniq uniq命令用于报告或忽略文件中的重复行,一般与sort命令结合使用. 语法 uniq(选项)(参数) 选项 -c或——count:在每列旁边显示该行重复出现的次数: -d或--repeat ...

  8. Python3 flask nginx uwsgi 环境搭建

    配置项目的时候一般使用虚拟环境,是各个项目的环境独立起来,更多方便管理.至于如何使用搜索即可,并不难 1.安装python3 yum -y install zlib-devel bzip2-devel ...

  9. asp.net button浏览器端事件和服务器端事件

    OnClientClick:触发浏览器端的响应,OnClick触发服务器端响应; 在服务器aspx.cs脚本中设置按钮属性: this.btnTest.Attributes["OnClick ...

  10. WIP - Study Perf (by quqi99)

    版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明 (http://blog.csdn.net/quqi99) Perf Flame Graph sudo perf ...