Пример #1
0
        public bool RequestReply(string FunctionName, string sRequest, ref string sReply)
        {
            try
            {
                bool bRet = false;
                bRet = oWebService.RequestReply(FunctionName, sRequest, ref sReply);

                return(bRet);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        public static bool RAS_Resource_Event(string FunctionName, RAS_Resource_Event_In_Tag Resource_Event_In, ref RAS_Resource_Event_Out_Tag Resource_Event_Out)
        {
            try
            {
                if (null == MESUrl || MESUrl.Trim().Equals(""))
                {
                    throw new Exception("INVALID_URL");
                }

                if (0 >= MESTimeOut)
                {
                    throw new Exception("INVALID_TIMEOUT");
                }

                string            sReplyMsg   = null;
                string            sSendMsg    = null;
                byte[]            aReplyData  = null;
                SmartWebService   oWebService = new SmartWebService();
                StreamTransformer former      = new StreamTransformerImpl();

                oWebService.SetUrl(MESUrl);
                oWebService.SetTimeOut(MESTimeOut);

                MESType.serialize_RAS_Resource_Event_In_Tag(former, Resource_Event_In);

                sSendMsg = FwxCmnFunction.PackMessage(former.getBytes());
                oWebService.RequestReply(FunctionName, sSendMsg, ref sReplyMsg);
                aReplyData = FwxCmnFunction.UnPackMessage(sReplyMsg);

                former = new StreamTransformerImpl(aReplyData);
                MESType.transform_RAS_Resource_Event_Out_Tag(former, ref Resource_Event_Out);

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        public static bool WIP_View_Factory_List(string FunctionName, WIP_View_Factory_List_In_Tag View_Factory_List_In, ref WIP_View_Factory_List_Out_Tag View_Factory_List_Out)
        {
            try
            {
                if (null == WIPUrl || WIPUrl.Trim().Equals(""))
                {
                    throw new Exception("INVALID_URL");
                }

                if (0 >= WIPTimeOut)
                {
                    throw new Exception("INVALID_TIMEOUT");
                }

                string            sReplyMsg   = null;
                string            sSendMsg    = null;
                byte[]            aReplyData  = null;
                SmartWebService   oWebService = new SmartWebService();
                StreamTransformer former      = new StreamTransformerImpl();

                oWebService.SetUrl(WIPUrl);
                oWebService.SetTimeOut(WIPTimeOut);

                WIPType.serialize_WIP_View_Factory_List_In_Tag(former, View_Factory_List_In);

                sSendMsg = FwxCmnFunction.PackMessage(former.getBytes());
                oWebService.RequestReply(FunctionName, sSendMsg, ref sReplyMsg);
                aReplyData = FwxCmnFunction.UnPackMessage(sReplyMsg);

                former = new StreamTransformerImpl(aReplyData);
                WIPType.transform_WIP_View_Factory_List_Out_Tag(former, ref View_Factory_List_Out);

                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }