Ejemplo n.º 1
0
        public NganluongResponse <ResponseTranfer> DoTranfer(string receive_email, string amout, string description)
        {
            var            _action         = "/tranfer";
            XmlDocument    soapEnvelopeXml = CreateSoapBody(getTranferRequest(receive_email, amout, description));
            HttpWebRequest webRequest      = CreateWebRequest(_action, soapEnvelopeXml.InnerText.Length);

            InsertSoapEnvelopeIntoWebRequest(soapEnvelopeXml, webRequest);

            string soapResult = "";

            using (WebResponse webResponse = webRequest.GetResponse())
            {
                using (StreamReader rd = new StreamReader(webResponse.GetResponseStream()))
                {
                    soapResult = rd.ReadToEnd();
                }
            }
            NganluongResponse <ResponseTranfer> result = XmlUtilites <ResponseTranfer> .ConvertXmlToObject(soapResult);

            return(result);
        }
Ejemplo n.º 2
0
        public NganluongResponse <ResponseInfo> DoGetInfo()
        {
            var            _action         = "/getInfo";
            XmlDocument    soapEnvelopeXml = CreateSoapBody(getInfoRequest());
            HttpWebRequest webRequest      = CreateWebRequest(_action, soapEnvelopeXml.InnerText.Length);

            InsertSoapEnvelopeIntoWebRequest(soapEnvelopeXml, webRequest);

            string soapResult = "";

            using (WebResponse webResponse = webRequest.GetResponse())
            {
                using (StreamReader rd = new StreamReader(webResponse.GetResponseStream()))
                {
                    soapResult = rd.ReadToEnd();
                }
            }
            NganluongResponse <ResponseInfo> result = XmlUtilites <ResponseInfo> .ConvertXmlToObject(soapResult);

            return(result);
        }