• MesureDeviceWebServiceDAS


    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;
    }*/
    }

  • 相关阅读:
    AOP面向切面编程
    java中与运算,或运算,异或运算,取反运算
    Java中replace和replaceall的区别
    Satisfying memory ordering requirements between partial reads and non-snoop accesses
    JS判断字符串中是否存在某个字符
    PHP 简介
    PHP 是什么
    mysql substr() 函数
    MySQL 数学函数
    MySQL 字符串截取SUBSTRING()函数
  • 原文地址:https://www.cnblogs.com/pureEve/p/6547385.html
Copyright © 2020-2023  润新知