예제 #1
0
        /// <summary>
        /// 开始测试
        /// </summary>
        public void Start(ESBInvokeParam invokeParam)
        {
            m_Stop           = false;
            m_ThreadPool     = new List <Thread>();
            m_ESBInvokeParam = invokeParam;

            for (int i = 0; i < m_ThreadNum; i++)
            {
                AddThread();
            }
        }
예제 #2
0
파일: TestManager.cs 프로젝트: vebin/soa
        /// <summary>
        /// 开始测试
        /// </summary>
        public void Start(ESBInvokeParam invokeParam)
        {
            m_Stop = false;
            m_ThreadPool = new List<Thread>();
            m_ESBInvokeParam = invokeParam;

            for (int i = 0; i < m_ThreadNum; i++)
            {
                AddThread();
            }
        }
예제 #3
0
        /// <summary>
        /// 调用测试
        /// </summary>
        /// <param name="param"></param>
        private void CallService(ESBInvokeParam esbParam)
        {
            String uri = String.Format("{0}?ServiceName={1}&Version={2}&MethodName={3}&Message={4}",
                                       esbParam.CallCenterUrl, esbParam.ServiceName, esbParam.Version, esbParam.MethodName, esbParam.Message);

            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri);

            webRequest.Method      = "GET";
            webRequest.ContentType = "text/xml; charset=utf-8";


            HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();

            using (Stream newstream = webResponse.GetResponseStream())
            {
                using (StreamReader srRead = new StreamReader(newstream, System.Text.Encoding.UTF8))
                {
                    String outString = srRead.ReadToEnd();

                    //txtMessage.Text = outString;
                }
            }
        }
예제 #4
0
파일: TestManager.cs 프로젝트: vebin/soa
        /// <summary>
        /// 调用测试
        /// </summary>
        /// <param name="param"></param>
        private void CallService(ESBInvokeParam esbParam)
        {
            String uri = String.Format("{0}?ServiceName={1}&Version={2}&MethodName={3}&Message={4}",
                esbParam.CallCenterUrl, esbParam.ServiceName, esbParam.Version, esbParam.MethodName, esbParam.Message);

            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri);
            webRequest.Method = "GET";
            webRequest.ContentType = "text/xml; charset=utf-8";


            HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();

            using (Stream newstream = webResponse.GetResponseStream())
            {
                using (StreamReader srRead = new StreamReader(newstream, System.Text.Encoding.UTF8))
                {
                    String outString = srRead.ReadToEnd();

                    //txtMessage.Text = outString;
                }
            }
        }