// This actually calls the service to perform the tax calculation, and returns the calculation result.
        public async Task<GetTaxResult> GetTax(GetTaxRequest req)
        {
            // Convert the request to XML
            XmlSerializerNamespaces namesp = new XmlSerializerNamespaces();
            namesp.Add(string.Empty, string.Empty);
            XmlWriterSettings settings = new XmlWriterSettings {OmitXmlDeclaration = true};
            XmlSerializer x = new XmlSerializer(req.GetType());
            StringBuilder sb = new StringBuilder();
            x.Serialize(XmlWriter.Create(sb, settings), req, namesp);
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(sb.ToString());

            // Call the service
            Uri address = new Uri(_svcUrl + "tax/get");
            var request = HttpHelper.CreateRequest(address, _accountNumber, _license);
            request.Method = "POST";
            request.ContentType = "text/xml";
            //request.ContentLength = sb.Length;
            Stream newStream = await request.GetRequestStreamAsync();
            newStream.Write(Encoding.ASCII.GetBytes(sb.ToString()), 0, sb.Length);
            GetTaxResult result = new GetTaxResult();
            try
            {
                WebResponse response = await request.GetResponseAsync();
                XmlSerializer r = new XmlSerializer(result.GetType());
                result = (GetTaxResult) r.Deserialize(response.GetResponseStream());
            }
            catch (WebException ex)
            {
                XmlSerializer r = new XmlSerializer(result.GetType());
                result = (GetTaxResult) r.Deserialize(((HttpWebResponse) ex.Response).GetResponseStream());
            }

            return result;
        }