public async Task <EisppServiceClient> Connect() { BasicHttpBinding myBinding = new BasicHttpBinding(); myBinding.SendTimeout = new TimeSpan(0, 2, 30); myBinding.MaxReceivedMessageSize = int.MaxValue; myBinding.MaxBufferSize = int.MaxValue; myBinding.MaxBufferPoolSize = int.MaxValue; myBinding.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; EndpointAddress myEndpoint = new EndpointAddress(configuration.GetValue <string>("EISPP:Endpoint")); EisppServiceClient serviceClient = new EisppServiceClient(myBinding, myEndpoint); try { await serviceClient.OpenAsync(); return(serviceClient); } catch (Exception ex) { logger.LogError(ex, "Error while opening EISPP proxy client"); return(null); } }
public EisppServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(EisppServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public EisppServiceClient(EndpointConfiguration endpointConfiguration) : base(EisppServiceClient.GetBindingForEndpoint(endpointConfiguration), EisppServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public EisppServiceClient() : base(EisppServiceClient.GetDefaultBinding(), EisppServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IEisppService.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(EisppServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IEisppService)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(EisppServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IEisppService)); }