//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//
//     对此文件的更改可能导致不正确的行为，并在以下条件下丢失:
//     代码重新生成。
// </auto-generated>
//------------------------------------------------------------------------------

namespace FrayunAPI
{
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="FrayunAPI.ServiceSoap")]
    public interface ServiceSoap
    {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Create", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string Create(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Create", ReplyAction="*")]
        System.Threading.Tasks.Task<string> CreateAsync(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/CreatePre", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string CreatePre(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/CreatePre", ReplyAction="*")]
        System.Threading.Tasks.Task<string> CreatePreAsync(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/CreateToJson", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string CreateToJson(string UserName, string PassWord, string JsonData);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/CreateToJson", ReplyAction="*")]
        System.Threading.Tasks.Task<string> CreateToJsonAsync(string UserName, string PassWord, string JsonData);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/CreatePreToJson", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string CreatePreToJson(string UserName, string PassWord, string JsonData);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/CreatePreToJson", ReplyAction="*")]
        System.Threading.Tasks.Task<string> CreatePreToJsonAsync(string UserName, string PassWord, string JsonData);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Update", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string Update(
                    string UserName, 
                    string PassWord, 
                    string DpdNo, 
                    string ClientNumber, 
                    string ReceiveName, 
                    string ReceiveComName, 
                    string ReceiveTel, 
                    string ReceiveEmail, 
                    string ReceiveAddress, 
                    string ReceiveCity, 
                    string ReceiveProvince, 
                    string ReceiveCountry, 
                    string ReceiveCode, 
                    string SendType, 
                    int IsCharged, 
                    string JsonProductInfo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Update", ReplyAction="*")]
        System.Threading.Tasks.Task<string> UpdateAsync(
                    string UserName, 
                    string PassWord, 
                    string DpdNo, 
                    string ClientNumber, 
                    string ReceiveName, 
                    string ReceiveComName, 
                    string ReceiveTel, 
                    string ReceiveEmail, 
                    string ReceiveAddress, 
                    string ReceiveCity, 
                    string ReceiveProvince, 
                    string ReceiveCountry, 
                    string ReceiveCode, 
                    string SendType, 
                    int IsCharged, 
                    string JsonProductInfo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Delete", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string Delete(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Delete", ReplyAction="*")]
        System.Threading.Tasks.Task<string> DeleteAsync(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/PackingSlipAndInvoice", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string PackingSlipAndInvoice(string UserName, string PassWord, string DpdNo, string Autograph, string VatCompanyName, string VatDutyParagraph, string JsonPackingSlip, string JsonInvoice);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/PackingSlipAndInvoice", ReplyAction="*")]
        System.Threading.Tasks.Task<string> PackingSlipAndInvoiceAsync(string UserName, string PassWord, string DpdNo, string Autograph, string VatCompanyName, string VatDutyParagraph, string JsonPackingSlip, string JsonInvoice);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetPackingSlipAndInvoiceForExcel", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string GetPackingSlipAndInvoiceForExcel(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetPackingSlipAndInvoiceForExcel", ReplyAction="*")]
        System.Threading.Tasks.Task<string> GetPackingSlipAndInvoiceForExcelAsync(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetPdf", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string GetPdf(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetPdf", ReplyAction="*")]
        System.Threading.Tasks.Task<string> GetPdfAsync(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetPdfPre", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string GetPdfPre(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetPdfPre", ReplyAction="*")]
        System.Threading.Tasks.Task<string> GetPdfPreAsync(string UserName, string PassWord, string DpdNo);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetBalance", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string GetBalance(string UserName, string PassWord);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetBalance", ReplyAction="*")]
        System.Threading.Tasks.Task<string> GetBalanceAsync(string UserName, string PassWord);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetScanForm", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        string GetScanForm(string UserName, string PassWord, string JsonData);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetScanForm", ReplyAction="*")]
        System.Threading.Tasks.Task<string> GetScanFormAsync(string UserName, string PassWord, string JsonData);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Login", ReplyAction="*")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        bool Login(string UserName, string PassWord);
        
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/Login", ReplyAction="*")]
        System.Threading.Tasks.Task<bool> LoginAsync(string UserName, string PassWord);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    public interface ServiceSoapChannel : FrayunAPI.ServiceSoap, System.ServiceModel.IClientChannel
    {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.2")]
    public partial class ServiceSoapClient : System.ServiceModel.ClientBase<FrayunAPI.ServiceSoap>, FrayunAPI.ServiceSoap
    {
        
        /// <summary>
        /// 实现此分部方法，配置服务终结点。
        /// </summary>
        /// <param name="serviceEndpoint">要配置的终结点</param>
        /// <param name="clientCredentials">客户端凭据</param>
        static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
        
        public ServiceSoapClient(EndpointConfiguration endpointConfiguration) : 
                base(ServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), ServiceSoapClient.GetEndpointAddress(endpointConfiguration))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public ServiceSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
                base(ServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public ServiceSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(ServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public ServiceSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress)
        {
        }
        
        public string Create(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo)
        {
            return base.Channel.Create(UserName, PassWord, ClientNumber, ReceiveName, ReceiveComName, ReceiveTel, ReceiveEmail, ReceiveAddress, ReceiveCity, ReceiveProvince, ReceiveCountry, ReceiveCode, SendType, IsCharged, JsonProductInfo);
        }
        
        public System.Threading.Tasks.Task<string> CreateAsync(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo)
        {
            return base.Channel.CreateAsync(UserName, PassWord, ClientNumber, ReceiveName, ReceiveComName, ReceiveTel, ReceiveEmail, ReceiveAddress, ReceiveCity, ReceiveProvince, ReceiveCountry, ReceiveCode, SendType, IsCharged, JsonProductInfo);
        }
        
        public string CreatePre(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo)
        {
            return base.Channel.CreatePre(UserName, PassWord, ClientNumber, ReceiveName, ReceiveComName, ReceiveTel, ReceiveEmail, ReceiveAddress, ReceiveCity, ReceiveProvince, ReceiveCountry, ReceiveCode, SendType, IsCharged, JsonProductInfo);
        }
        
        public System.Threading.Tasks.Task<string> CreatePreAsync(string UserName, string PassWord, string ClientNumber, string ReceiveName, string ReceiveComName, string ReceiveTel, string ReceiveEmail, string ReceiveAddress, string ReceiveCity, string ReceiveProvince, string ReceiveCountry, string ReceiveCode, string SendType, int IsCharged, string JsonProductInfo)
        {
            return base.Channel.CreatePreAsync(UserName, PassWord, ClientNumber, ReceiveName, ReceiveComName, ReceiveTel, ReceiveEmail, ReceiveAddress, ReceiveCity, ReceiveProvince, ReceiveCountry, ReceiveCode, SendType, IsCharged, JsonProductInfo);
        }
        
        public string CreateToJson(string UserName, string PassWord, string JsonData)
        {
            return base.Channel.CreateToJson(UserName, PassWord, JsonData);
        }
        
        public System.Threading.Tasks.Task<string> CreateToJsonAsync(string UserName, string PassWord, string JsonData)
        {
            return base.Channel.CreateToJsonAsync(UserName, PassWord, JsonData);
        }
        
        public string CreatePreToJson(string UserName, string PassWord, string JsonData)
        {
            return base.Channel.CreatePreToJson(UserName, PassWord, JsonData);
        }
        
        public System.Threading.Tasks.Task<string> CreatePreToJsonAsync(string UserName, string PassWord, string JsonData)
        {
            return base.Channel.CreatePreToJsonAsync(UserName, PassWord, JsonData);
        }
        
        public string Update(
                    string UserName, 
                    string PassWord, 
                    string DpdNo, 
                    string ClientNumber, 
                    string ReceiveName, 
                    string ReceiveComName, 
                    string ReceiveTel, 
                    string ReceiveEmail, 
                    string ReceiveAddress, 
                    string ReceiveCity, 
                    string ReceiveProvince, 
                    string ReceiveCountry, 
                    string ReceiveCode, 
                    string SendType, 
                    int IsCharged, 
                    string JsonProductInfo)
        {
            return base.Channel.Update(UserName, PassWord, DpdNo, ClientNumber, ReceiveName, ReceiveComName, ReceiveTel, ReceiveEmail, ReceiveAddress, ReceiveCity, ReceiveProvince, ReceiveCountry, ReceiveCode, SendType, IsCharged, JsonProductInfo);
        }
        
        public System.Threading.Tasks.Task<string> UpdateAsync(
                    string UserName, 
                    string PassWord, 
                    string DpdNo, 
                    string ClientNumber, 
                    string ReceiveName, 
                    string ReceiveComName, 
                    string ReceiveTel, 
                    string ReceiveEmail, 
                    string ReceiveAddress, 
                    string ReceiveCity, 
                    string ReceiveProvince, 
                    string ReceiveCountry, 
                    string ReceiveCode, 
                    string SendType, 
                    int IsCharged, 
                    string JsonProductInfo)
        {
            return base.Channel.UpdateAsync(UserName, PassWord, DpdNo, ClientNumber, ReceiveName, ReceiveComName, ReceiveTel, ReceiveEmail, ReceiveAddress, ReceiveCity, ReceiveProvince, ReceiveCountry, ReceiveCode, SendType, IsCharged, JsonProductInfo);
        }
        
        public string Delete(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.Delete(UserName, PassWord, DpdNo);
        }
        
        public System.Threading.Tasks.Task<string> DeleteAsync(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.DeleteAsync(UserName, PassWord, DpdNo);
        }
        
        public string PackingSlipAndInvoice(string UserName, string PassWord, string DpdNo, string Autograph, string VatCompanyName, string VatDutyParagraph, string JsonPackingSlip, string JsonInvoice)
        {
            return base.Channel.PackingSlipAndInvoice(UserName, PassWord, DpdNo, Autograph, VatCompanyName, VatDutyParagraph, JsonPackingSlip, JsonInvoice);
        }
        
        public System.Threading.Tasks.Task<string> PackingSlipAndInvoiceAsync(string UserName, string PassWord, string DpdNo, string Autograph, string VatCompanyName, string VatDutyParagraph, string JsonPackingSlip, string JsonInvoice)
        {
            return base.Channel.PackingSlipAndInvoiceAsync(UserName, PassWord, DpdNo, Autograph, VatCompanyName, VatDutyParagraph, JsonPackingSlip, JsonInvoice);
        }
        
        public string GetPackingSlipAndInvoiceForExcel(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.GetPackingSlipAndInvoiceForExcel(UserName, PassWord, DpdNo);
        }
        
        public System.Threading.Tasks.Task<string> GetPackingSlipAndInvoiceForExcelAsync(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.GetPackingSlipAndInvoiceForExcelAsync(UserName, PassWord, DpdNo);
        }
        
        public string GetPdf(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.GetPdf(UserName, PassWord, DpdNo);
        }
        
        public System.Threading.Tasks.Task<string> GetPdfAsync(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.GetPdfAsync(UserName, PassWord, DpdNo);
        }
        
        public string GetPdfPre(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.GetPdfPre(UserName, PassWord, DpdNo);
        }
        
        public System.Threading.Tasks.Task<string> GetPdfPreAsync(string UserName, string PassWord, string DpdNo)
        {
            return base.Channel.GetPdfPreAsync(UserName, PassWord, DpdNo);
        }
        
        public string GetBalance(string UserName, string PassWord)
        {
            return base.Channel.GetBalance(UserName, PassWord);
        }
        
        public System.Threading.Tasks.Task<string> GetBalanceAsync(string UserName, string PassWord)
        {
            return base.Channel.GetBalanceAsync(UserName, PassWord);
        }
        
        public string GetScanForm(string UserName, string PassWord, string JsonData)
        {
            return base.Channel.GetScanForm(UserName, PassWord, JsonData);
        }
        
        public System.Threading.Tasks.Task<string> GetScanFormAsync(string UserName, string PassWord, string JsonData)
        {
            return base.Channel.GetScanFormAsync(UserName, PassWord, JsonData);
        }
        
        public bool Login(string UserName, string PassWord)
        {
            return base.Channel.Login(UserName, PassWord);
        }
        
        public System.Threading.Tasks.Task<bool> LoginAsync(string UserName, string PassWord)
        {
            return base.Channel.LoginAsync(UserName, PassWord);
        }
        
        public virtual System.Threading.Tasks.Task OpenAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
        }
        
        public virtual System.Threading.Tasks.Task CloseAsync()
        {
            return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
        }
        
        private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.ServiceSoap))
            {
                System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
                result.MaxBufferSize = int.MaxValue;
                result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
                result.MaxReceivedMessageSize = int.MaxValue;
                result.AllowCookies = true;
                return result;
            }
            if ((endpointConfiguration == EndpointConfiguration.ServiceSoap12))
            {
                System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
                System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
                textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
                result.Elements.Add(textBindingElement);
                System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
                httpBindingElement.AllowCookies = true;
                httpBindingElement.MaxBufferSize = int.MaxValue;
                httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
                result.Elements.Add(httpBindingElement);
                return result;
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.ServiceSoap))
            {
                return new System.ServiceModel.EndpointAddress("http://services.frayun.com/Service.asmx");
            }
            if ((endpointConfiguration == EndpointConfiguration.ServiceSoap12))
            {
                return new System.ServiceModel.EndpointAddress("http://services.frayun.com/Service.asmx");
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        public enum EndpointConfiguration
        {
            
            ServiceSoap,
            
            ServiceSoap12,
        }
    }
}
