public ValidateResult Validate(ValidateRequest validateRequest)
        {
            try
            {
                _avaLog.Debug("AddressSvc.Validate");

                Utilities.VerifyRequestObject(validateRequest);

                _avaLog.Debug("Copying address into proxy object");
                ProxyValidateRequest proxyRequest = new ProxyValidateRequest();
                validateRequest.CopyTo(proxyRequest);
                //Record time take for address validation
                Perf monitor = new Perf();
                monitor.Start();

                ProxyValidateResult svcResult = (ProxyValidateResult)base.InvokeService(typeof(ProxyAddressSvc), MethodBase.GetCurrentMethod().Name, new object[] { proxyRequest });

                monitor.Stop(this, ref svcResult);
                _avaLog.Debug("Copying address from proxy object");
                ValidateResult localResult = new ValidateResult();
                localResult.CopyFrom(svcResult);

                return(localResult);
            }
            catch (Exception ex)
            {
                return(ValidateResult.CastFromBaseResult(ExceptionManager.HandleException(ex)));
            }
        }
示例#2
0
        public ProxyGetTaxResult GetTax(ProxyGetTaxRequest GetTaxRequest)
        {
            AvaLogger _avaLog = AvaLogger.GetLogger();
            Perf      monitor = new Perf();

            monitor.Start();

            object[] results = this.Invoke("GetTax", new object[] {
                GetTaxRequest
            });

            monitor.Stop();
            _avaLog.Debug("GetTax (webservice method): " + monitor.ElapsedSeconds(3).ToString());

            return((ProxyGetTaxResult)(results[0]));
        }