public async Task <string> GetCityFullName() { string AuthKey = Request.Form["AuthKey"].ToString(); int CityID = -1; int.TryParse(Request.Form["CityID"].ToString(), out CityID); OfficialCityServiceSoapClient client = new OfficialCityServiceSoapClient(OfficialCityServiceSoapClient.EndpointConfiguration.OfficialCityServiceSoap); return(await client.GetCityFullNameAsync(AuthKey, CityID)); }
public async Task <string> GetSubCitysBySuperJson() { string AuthKey = Request.Form["AuthKey"].ToString(); string AesKey = Request.Form["AesKey"].ToString(); string Iv = Request.Form["Iv"].ToString(); int CityID = 1; int.TryParse(Request.Form["CityID"].ToString(), out CityID); OfficialCityServiceSoapClient client = new OfficialCityServiceSoapClient(OfficialCityServiceSoapClient.EndpointConfiguration.OfficialCityServiceSoap); var result = await client.GetSubCitysBySuperJsonAsync(AuthKey, CityID); if (!string.IsNullOrWhiteSpace(result) && result != "null") { return(AesCryptoService.DecryptText(result, AesKey, Iv)); } else { return(result); } }
public OfficialCityServiceSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(OfficialCityServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public OfficialCityServiceSoapClient(EndpointConfiguration endpointConfiguration) : base(OfficialCityServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), OfficialCityServiceSoapClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }