zoukankan      html  css  js  c++  java
  • 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;
    }*/
    }

  • 相关阅读:
    bzoj4196: [Noi2015]软件包管理器
    bzoj3083: 遥远的国度
    bzoj4034: [HAOI2015]T2
    2.EXIT_KEY
    AD如何1比1打印
    编程时注意,
    同步事件、异步事件、轮询
    事件位
    挂起进程相关API
    PROCESS_EVENT_POLL事件
  • 原文地址:https://www.cnblogs.com/pureEve/p/6547385.html
Copyright © 2011-2022 走看看