public static UDDIClient getUDDIClient(String clientName)
 {
     if (clientName != null)
     {
         if (clients.ContainsKey(clientName))
         {
             return (clients[clientName]);
         }
         else
         {
             throw new ConfigurationErrorsException("No client by name " + clientName + " was found. " +
                     " Please check your client uddi.xml files, and make sure this client was started");
         }
     }
     else if (clients.Count == 1 && clientName == null)
     {
         log.warn("Deprecated, please specify a client name");
         Dictionary<string, UDDIClient>.ValueCollection.Enumerator it = clients.Values.GetEnumerator();
         it.MoveNext();
         return it.Current;
         //return clients.Values.GetEnumerator().MoveNext()..iterator().next();
     }
     else
     {
         log.warn("Deprecated, please specify a client name");
         UDDIClient client = new UDDIClient(null);
         addClient(client);
         client.start();
         return client;
     }
 }
Beispiel #2
0
 public static UDDIClient getUDDIClient(String clientName)
 {
     if (clientName != null)
     {
         if (clients.ContainsKey(clientName))
         {
             return(clients[clientName]);
         }
         else
         {
             throw new ConfigurationErrorsException("No client by name " + clientName + " was found. " +
                                                    " Please check your client uddi.xml files, and make sure this client was started");
         }
     }
     else if (clients.Count == 1 && clientName == null)
     {
         log.warn("Deprecated, please specify a client name");
         Dictionary <string, UDDIClient> .ValueCollection.Enumerator it = clients.Values.GetEnumerator();
         it.MoveNext();
         return(it.Current);
         //return clients.Values.GetEnumerator().MoveNext()..iterator().next();
     }
     else
     {
         log.warn("Deprecated, please specify a client name");
         UDDIClient client = new UDDIClient(null);
         addClient(client);
         client.start();
         return(client);
     }
 }