//------------------------------------------------------------------------------
// 
//     此代码由工具生成。
//
//     对此文件的更改可能导致不正确的行为,并在以下条件下丢失:
//     代码重新生成。
// 
//------------------------------------------------------------------------------
namespace ServiceReference1
{
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://com.bsoft.ws", ConfigurationName="ServiceReference1.bstjPortType")]
    public interface bstjPortType
    {
        
        [System.ServiceModel.OperationContractAttribute(Action="urn:invoke", ReplyAction="urn:invokeResponse")]
        [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
        System.Threading.Tasks.Task invokeAsync(ServiceReference1.invokeRequest request);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(WrapperName="invoke", WrapperNamespace="http://webservice.rim.bsoft.com", IsWrapped=true)]
    public partial class invokeRequest
    {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.rim.bsoft.com", Order=0)]
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string args0;
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.rim.bsoft.com", Order=1)]
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string args1;
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.rim.bsoft.com", Order=2)]
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string args2;
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.rim.bsoft.com", Order=3)]
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string args3;
        
        public invokeRequest()
        {
        }
        
        public invokeRequest(string args0, string args1, string args2, string args3)
        {
            this.args0 = args0;
            this.args1 = args1;
            this.args2 = args2;
            this.args3 = args3;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(WrapperName="invokeResponse", WrapperNamespace="http://webservice.rim.bsoft.com", IsWrapped=true)]
    public partial class invokeResponse
    {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.rim.bsoft.com", Order=0)]
        [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
        public string @return;
        
        public invokeResponse()
        {
        }
        
        public invokeResponse(string @return)
        {
            this.@return = @return;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")]
    public interface bstjPortTypeChannel : ServiceReference1.bstjPortType, System.ServiceModel.IClientChannel
    {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.2.0-preview1.23462.5")]
    public partial class bstjPortTypeClient : System.ServiceModel.ClientBase, ServiceReference1.bstjPortType
    {
        
        /// 
        /// 实现此分部方法,配置服务终结点。
        /// 
        /// 要配置的终结点
        /// 客户端凭据
        static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
        
        public bstjPortTypeClient(EndpointConfiguration endpointConfiguration) : 
                base(bstjPortTypeClient.GetBindingForEndpoint(endpointConfiguration), bstjPortTypeClient.GetEndpointAddress(endpointConfiguration))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public bstjPortTypeClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : 
                base(bstjPortTypeClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public bstjPortTypeClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(bstjPortTypeClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
        {
            this.Endpoint.Name = endpointConfiguration.ToString();
            ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
        }
        
        public bstjPortTypeClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress)
        {
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        System.Threading.Tasks.Task ServiceReference1.bstjPortType.invokeAsync(ServiceReference1.invokeRequest request)
        {
            return base.Channel.invokeAsync(request);
        }
        
        public System.Threading.Tasks.Task invokeAsync(string args0, string args1, string args2, string args3)
        {
            ServiceReference1.invokeRequest inValue = new ServiceReference1.invokeRequest();
            inValue.args0 = args0;
            inValue.args1 = args1;
            inValue.args2 = args2;
            inValue.args3 = args3;
            return ((ServiceReference1.bstjPortType)(this)).invokeAsync(inValue);
        }
        
        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.ServiceModel.ICommunicationObject)(this)).EndOpen));
        }
        
        private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
        {
            if ((endpointConfiguration == EndpointConfiguration.bstjHttpSoap11Endpoint))
            {
                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.bstjHttpSoap12Endpoint))
            {
                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.bstjHttpSoap11Endpoint))
            {
                return new System.ServiceModel.EndpointAddress("http://10.1.12.140:8082/gemse-tj/services/bstj.bstjHttpSoap11Endpoint/");
            }
            if ((endpointConfiguration == EndpointConfiguration.bstjHttpSoap12Endpoint))
            {
                return new System.ServiceModel.EndpointAddress("http://10.1.12.140:8082/gemse-tj/services/bstj.bstjHttpSoap12Endpoint/");
            }
            throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
        }
        
        public enum EndpointConfiguration
        {
            
            bstjHttpSoap11Endpoint,
            
            bstjHttpSoap12Endpoint,
        }
    }
}