public static ServiceProxies.IOService.NanoIOSystemAPIInterfaceClient GetIOService(string url = null) { /* if (String.IsNullOrEmpty(url)) url = CONST.EntryPointUrl; string ioServiceUrl = GetEntryPointService(url).GetServiceUri(ServiceNames.Data.ToString()); var address = new EndpointAddress(ioServiceUrl); */ var address = new EndpointAddress(Config.AppSettings[STORAGE_CONFIG_NAME]); var mtomBind = new MtomMessageEncodingBindingElement(); mtomBind.MessageVersion = MessageVersion.Soap11; var httpBind = new HttpTransportBindingElement(); var binding = new CustomBinding(new BindingElement[] { mtomBind, httpBind }); var service = new ServiceProxies.IOService.NanoIOSystemAPIInterfaceClient(binding, address); return service; }
public static ServiceProxies.IOService.NanoIOSystemAPIInterfaceClient GetIOService(string url = null) { /* * if (String.IsNullOrEmpty(url)) * url = CONST.EntryPointUrl; * * string ioServiceUrl = GetEntryPointService(url).GetServiceUri(ServiceNames.Data.ToString()); * var address = new EndpointAddress(ioServiceUrl); */ var address = new EndpointAddress(Config.AppSettings[STORAGE_CONFIG_NAME]); var mtomBind = new MtomMessageEncodingBindingElement(); mtomBind.MessageVersion = MessageVersion.Soap11; var httpBind = new HttpTransportBindingElement(); var binding = new CustomBinding(new BindingElement[] { mtomBind, httpBind }); var service = new ServiceProxies.IOService.NanoIOSystemAPIInterfaceClient(binding, address); return(service); }