Example #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();
            }
        }
Example #2
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();
            }
        }
Example #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;
                }
            }
        }
Example #4
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;
                }
            }
        }