void ModifyEndPoint(OlapWebService.OlapWebServiceSoapClient service) { if (service != null) { if (!String.IsNullOrEmpty(URL)) { service.Endpoint.Address = new System.ServiceModel.EndpointAddress(new Uri(URL)); } else { service.Endpoint.Address = new System.ServiceModel.EndpointAddress(new Uri(Application.Current.Host.Source, "/OlapWebService.asmx")); } } }
void ModifyEndPoint(OlapWebService.OlapWebServiceSoapClient service) { if (service != null) { // Таймаут service.InnerChannel.OperationTimeout = new TimeSpan(0, 10, 0); if (!String.IsNullOrEmpty(URL)) { service.Endpoint.Address = new System.ServiceModel.EndpointAddress(new Uri(URL)); } else { service.Endpoint.Address = new System.ServiceModel.EndpointAddress(new Uri(Application.Current.Host.Source, "/OlapWebService.asmx")); } } }
public void Invoke(object schema, object state) { if (schema == null) { throw new ArgumentNullException("schema"); } OlapWebService.OlapWebServiceSoapClient service = Services.ServiceManager.CreateService <Ranet.AgOlap.OlapWebService.OlapWebServiceSoapClient , Ranet.AgOlap.OlapWebService.OlapWebServiceSoap >(URL); // ModifyEndPoint(service); service.PerformOlapServiceActionCompleted += service_PerformStorageActionCompleted; service.PerformOlapServiceActionAsync("StorageAction", schema.ToString(), state); }