Информация об изменениях

Сообщение WCF как задать SOAP12 для BasicHttpBinding от 10.07.2018 14:57

Изменено 10.07.2018 18:36 dsalodki

WCF как задать SOAP12 для BasicHttpBinding
или можно использоавать что-то другое?

https://www.screencast.com/t/wh7fmByY

WSDL содержит xmlns:soap12bind="http://schemas.xmlsoap.org/wsdl/soap12/"

использую asp.net core 2.0 не знаю как использовать web.config

            var binding = new BasicHttpBinding();
            //binding.MessageVersion.Envelope
            binding.MaxReceivedMessageSize = 1048576;
            binding.SendTimeout = TimeSpan.FromSeconds(30);
            binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
            binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
            binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Basic;
            var endpoint = new EndpointAddress(new Uri("http://62.140.242.253:8088/1cbase_sql/ws/InfoTaxer?wsdl"));
            InfoTaxerPortTypeClient client = new InfoTaxerPortTypeClient(binding, endpoint);
            client.ClientCredentials.UserName.UserName = "";
            client.ClientCredentials.UserName.Password = "";
            Data result = await client.GetDataAsync(innSearch);
WCF как задать SOAP12 для BasicHttpBinding
или можно использоавать что-то другое?

https://www.screencast.com/t/wh7fmByY

WSDL содержит xmlns:soap12bind="http://schemas.xmlsoap.org/wsdl/soap12/"

использую asp.net core 2.0 не знаю как использовать web.config

            var binding = new BasicHttpBinding();
            //binding.MessageVersion.Envelope
            binding.MaxReceivedMessageSize = 1048576;
            binding.SendTimeout = TimeSpan.FromSeconds(30);
            binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
            binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
            binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Basic;
            var endpoint = new EndpointAddress(new Uri(""));
            InfoTaxerPortTypeClient client = new InfoTaxerPortTypeClient(binding, endpoint);
            client.ClientCredentials.UserName.UserName = "";
            client.ClientCredentials.UserName.Password = "";
            Data result = await client.GetDataAsync(innSearch);