private void LoadWebServiceConfiguration() { try { _recipesWebServiceConfiguration = _webServiceConfigurationManager.Get("RecipeServiceSoap"); _remainsWebServiceConfiguration = _webServiceConfigurationManager.Get("DrugstoreServiceSoap"); if (_recipesWebServiceConfiguration != null) { View.RecipesServiceAddress = _recipesWebServiceConfiguration.RemoteAddress; } if (_remainsWebServiceConfiguration != null) { View.RemainsServiceAddress = _remainsWebServiceConfiguration.RemoteAddress; } } catch (ArgumentNullException ex) { _log.Error(ex.ToString()); } catch (RepositoryLoadException ex) { _log.Error(ex.ToString()); View.Error = "Невозможно загрузить настройки подключения к веб-сервисам" + Environment.NewLine + ex.Message; } }
/// <summary> /// Static constructor. /// </summary> static WebServiceProxy() { // Set default proxy configuration values. _internetProtocol = InternetProtocol.Https; _webServiceProtocol = WebServiceProtocol.Binary; Configuration = new WebServiceConfiguration(); // Create web service proxies. AnalysisService = new AnalysisServiceProxy(); NorsService = new NorsServiceProxy(); GeoReferenceService = new GeoReferenceServiceProxy(); KulService = new KulServiceProxy(); MvmService = new MvmServiceProxy(); NorwayTaxonService = new NorwayTaxonServiceProxy(); PESINameService = new PESINameServiceProxy(); PictureService = new PictureServiceProxy(); ReferenceService = new ReferenceServiceProxy(); SersService = new SersServiceProxy(); SpeciesObservationHarvestService = new SpeciesObservationHarvestServiceProxy(); SwedishSpeciesObservationService = new SwedishSpeciesObservationServiceProxy(); SwedishSpeciesObservationSOAPService = new SwedishSpeciesObservationSOAPServiceProxy(); TaxonAttributeService = new TaxonAttributeServiceProxy(); TaxonService = new TaxonServiceProxy(); DyntaxaInternalService = new DyntaxaInternalServiceProxy(); UserService = new UserServiceProxy(); WramService = new WramServiceProxy(); }
private void LoadWebServiceConfiguration() { try { _recipesWebServiceConfiguration = _webServiceConfigurationManager.Get("RecipeServiceSoap"); _remainsWebServiceConfiguration = _webServiceConfigurationManager.Get("DrugstoreServiceSoap"); if (_recipesWebServiceConfiguration != null) { View.RecipesServiceAddress = _recipesWebServiceConfiguration.RemoteAddress; } if (_remainsWebServiceConfiguration != null) { View.RemainsServiceAddress = _remainsWebServiceConfiguration.RemoteAddress; } } catch (ArgumentNullException ex) { _log.Error(ex.ToString()); } catch (RepositoryLoadException ex) { _log.Error(ex.ToString()); View.Error = "Can't load web service connection strings" + Environment.NewLine + ex.Message; } }
public void TestXmlSerialization() { var config = new WebServiceConfiguration(CatalogueRepository) { Username = "******", Password = "******" }; var state = config.SaveStateToString(); config.RestoreStateFrom(state); }
public WebServiceTest(IOptions <WebServiceConfiguration> config) { _config = config.Value; }