Exemple #1
0
 private void doCallWsImportationAsynch()
 {
     if (!String.IsNullOrEmpty(sfwServiceTache.Properties.Settings.Default.liste_wsimport_soap.ToString()))
     {
         string[] liste_ws_importation = sfwServiceTache.Properties.Settings.Default.liste_wsimport_soap.ToString().Split(';');
         foreach (string ws_importationUrl in liste_ws_importation)
         {
             try
             {
                 log.Info("AVANT APPEL ws_import à l'adresse[" + ws_importationUrl + "]");
                 ws_imp     = new ws_importation.wsimport();
                 ws_imp.Url = ws_importationUrl;
                 log.Info("DEFAULT TIMEOUT Wsimportation" + ws_imp.Timeout.ToString());
                 // ws_imp.TacheImportCompleted += new ws_importation.TacheImportCompletedEventHandler(this.TacheImportCompleted);
                 object userState = "";
                 ws_imp.TacheImportAsync("", userState);
                 log.Info("RETOUR : " + (string)userState);
                 //ws_imp.Dispose();
             }
             catch (Exception ex)
             {
                 log.Error(ex.ToString());
             }
         }
     }
 }
Exemple #2
0
 private static void doCallWsImportation()
 {
     if (!String.IsNullOrEmpty(sfwServiceTache.Properties.Settings.Default.liste_wsimport_soap.ToString()))
     {
         string[] liste_ws_importation = sfwServiceTache.Properties.Settings.Default.liste_wsimport_soap.ToString().Split(';');
         foreach (string ws_importationUrl in liste_ws_importation)
         {
             try
             {
                 log.Info("AVANT APPEL ws_import à l'adresse[" + ws_importationUrl + "]");
                 ws_importation.wsimport ws_imp = new ws_importation.wsimport();
                 ws_imp.Url = ws_importationUrl;
                 log.Info("RETOUR : " + ws_imp.TacheImport(""));
                 //ws_imp.Dispose();
             }
             catch (Exception ex)
             {
                 log.Error(ex.Message);
             }
         }
     }
 }