You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2014/01/19 23:08:00 UTC

svn commit: r1559590 [1/5] - in /juddi/trunk: juddi-client/src/main/java/org/apache/juddi/v3/annotations/ juddi-client/src/main/java/org/apache/juddi/v3/client/ juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-client/src/main/java/or...

Author: alexoree
Date: Sun Jan 19 22:07:59 2014
New Revision: 1559590

URL: http://svn.apache.org/r1559590
Log:
JUDDI-797 in progress

Modified:
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/Release.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/Cryptor.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorUtil.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/DigSigUtil.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/TripleDESCrytor.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIClientSubscriptionListenerImpl.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/wadl/WADL2UDDI.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/wsdl/BPEL2UDDI.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/wsdl/ReadWSDL.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/wsdl/WSDL2UDDI.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/wsdl/WSDLLocatorImpl.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/subscription/SubscriptionCallbackListener.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/RequestHandler.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/model/AuthToken.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/model/UddiEntity.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/model/UddiEntityPublisher.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/SubscriptionNotifier.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/v3/auth/LdapSimpleAuthenticator.java
    juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckCommon.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java
    juddi/trunk/uddi-ws/src/main/java/org/apache/juddi/jaxb/EntityCreator.java
    juddi/trunk/uddi-ws/src/main/java/org/apache/juddi/v3_service/JUDDIApiPortType.java
    juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/UDDICustodyTransferPortType.java
    juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/UDDIPublicationPortType.java
    juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/UDDIReplicationPortType.java
    juddi/trunk/uddi-ws/src/main/java/org/uddi/v3_service/UDDISubscriptionPortType.java

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java Sun Jan 19 22:07:59 2014
@@ -175,7 +175,8 @@ public class AnnotationProcessor {
 	 * parse something like: [keyName=uddi-org:types:wsdl,keyValue=wsdlDeployment,tModelKey=uddi:uddi.org:categorization:types]
 							
 	 * @param categoryBagStr
-	 * @return
+	 * @return a UDDI CategoryBag
+         * @see CategoryBag
 	 */
 	protected CategoryBag parseCategoryBag(String categoryBagStr) {
 		

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/Release.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/Release.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/Release.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/Release.java Sun Jan 19 22:07:59 2014
@@ -37,7 +37,7 @@ public class Release {
         /**
          * Returns the version of this jUDDI-Client jar as defined in the manifest.
          * Calls getRegistryVersion()
-         * @return 
+         * @return  the version number of the release
          * @since 3.2
          */
         public static String getjUDDIClientVersion() {
@@ -46,7 +46,7 @@ public class Release {
         /**
          * Returns the version of this jUDDI-Client jar as defined in the manifest.
          * This function is poorly named, but left in place for backward compatibility
-         * @return 
+         * @return  the version number of the release
          */
 	public static String getRegistryVersion() {
 		if (registryVersion == null) {

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java Sun Jan 19 22:07:59 2014
@@ -218,7 +218,7 @@ public class ClientConfig 
          * signals that the specified classes/wsdls are registered with the UDDI server
          * when UDDIClient.start() is called
          * client.clerks[@registerOnStartup]
-         * @return 
+         * @return true/false
          */
 	public boolean isRegisterOnStartup() {
 		boolean isRegisterOnStartup = false;
@@ -361,7 +361,7 @@ public class ClientConfig 
         
         /**
          * Used for WADL/WSDL to WSDL
-         * @return 
+         * @return true/false
          */
         public boolean isX_To_Wsdl_Ignore_SSL_Errors()
         {
@@ -373,8 +373,10 @@ public class ClientConfig 
         /**
          * Fetches all digital signature related properties for the digital signature utility.
          * warning, this will decrypt all passwords
-         * @return
+         * @return a properties object
          * @throws Exception 
+         * @see DigSigUtil
+         * @see Properties
          */
     public Properties getDigitalSignatureConfiguration() throws Exception {
         Properties p = new Properties();

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java Sun Jan 19 22:07:59 2014
@@ -197,9 +197,10 @@ public class UDDIClerk implements Serial
         }
 
         /**
-         * Is this used?
+         * This is not used within the jUDDI code base and will be removed in the next release
          *
-         * @return
+         * @return a map
+         * @deprecated 
          */
         @Deprecated
         public Map<String, Properties> getServices() {
@@ -207,7 +208,9 @@ public class UDDIClerk implements Serial
         }
 
         /**
-         * Is this used?
+         * This is not used within the jUDDI code base and will be removed in the next release
+         * @param services
+         * @deprecated 
          */
         @Deprecated
         public void setServices(Map<String, Properties> services) {
@@ -217,7 +220,7 @@ public class UDDIClerk implements Serial
         /**
          * The client manager name as defined in the config file client[@name]
          *
-         * @return
+         * @return the manager name
          */
         public String getManagerName() {
                 return managerName;
@@ -360,7 +363,7 @@ public class UDDIClerk implements Serial
          * Note, if registration fails, no exception is thrown
          *
          * @param subscription
-         * @return
+         * @return a subscription object, or null if failed
          */
         public Subscription register(Subscription subscription) {
                 return register(subscription, this.getUDDINode().getApiNode());
@@ -417,7 +420,7 @@ public class UDDIClerk implements Serial
          *
          * @param tModel
          * @param node
-         * @return
+         * @return a tModel object or null if registration failed
          */
         public TModelDetail register(TModel tModel, Node node) {
                 TModelDetail tModelDetail = null;
@@ -445,7 +448,7 @@ public class UDDIClerk implements Serial
          * Note, if registration fails, no exception is thrown
          *
          * @param binding
-         * @return
+         * @return a binding object or null
          */
         public BindingTemplate register(BindingTemplate binding) {
                 return register(binding, this.getUDDINode().getApiNode());
@@ -457,7 +460,7 @@ public class UDDIClerk implements Serial
          *
          * @param binding
          * @param node
-         * @return
+         * @return a binding object or null
          */
         public BindingTemplate register(BindingTemplate binding, Node node) {
 
@@ -487,7 +490,7 @@ public class UDDIClerk implements Serial
          * if registration fails, no exception is thrown and null is returned
          *
          * @param service
-         * @return
+         * @return a service object or null
          */
         public BusinessService register(BusinessService service) {
                 return register(service, this.getUDDINode().getApiNode());
@@ -860,7 +863,7 @@ public class UDDIClerk implements Serial
          * @throws RemoteException
          * @throws TransportException
          * @throws ConfigurationException
-         * @deprecated see
+         * @deprecated see getServiceDetail
          */
         @Deprecated
         public BusinessService findService(String serviceKey) throws RemoteException,
@@ -925,7 +928,7 @@ public class UDDIClerk implements Serial
         /**
          *
          * @param bindingKey
-         * @return
+         * @return returns a binding template or null if not found
          * @throws DispositionReportFaultMessage
          * @throws RemoteException
          * @throws TransportException
@@ -957,7 +960,7 @@ public class UDDIClerk implements Serial
          * @deprecated use getServiceBindingDetail instead
          * @param bindingKey
          * @param node
-         * @return
+         * @return null if not found
          * @throws DispositionReportFaultMessage
          * @throws RemoteException
          * @throws TransportException
@@ -1208,7 +1211,7 @@ public class UDDIClerk implements Serial
          * callback API 8/20/2013 AO
          *
          * @param endpointURL
-         * @return
+         * @return an auth token
          * @throws TransportException
          * @throws DispositionReportFaultMessage
          * @throws RemoteException
@@ -1256,7 +1259,7 @@ public class UDDIClerk implements Serial
          * Note: this API call should only be used with secure ports (SSL/TLS)
          *
          * @param node
-         * @return
+         * @return a node or null if registration fails
          */
         public NodeDetail saveNode(Node node) {
                 NodeDetail nodeDetail = null;
@@ -1283,7 +1286,7 @@ public class UDDIClerk implements Serial
          * Note: this API call should only be used with secure ports (SSL/TLS)
          *
          * @param senderClerk
-         * @return
+         * @return null if registration fails
          */
         public ClerkDetail saveClerk(UDDIClerk senderClerk) {
                 ClerkDetail clerkDetail = null;
@@ -1308,7 +1311,7 @@ public class UDDIClerk implements Serial
          * both on the jUDDI Client and on the jUDDI Web Service (not part of
          * the UDDI spec).
          *
-         * @return
+         * @return the config file defined clerk
          */
         public Clerk getApiClerk() {
                 Clerk apiClerk = new Clerk();
@@ -1322,7 +1325,7 @@ public class UDDIClerk implements Serial
         /**
          * client.clerks.clerk(" + i + ")[@name]
          *
-         * @return
+         * @return name
          */
         public String getName() {
                 return name;
@@ -1349,7 +1352,7 @@ public class UDDIClerk implements Serial
         /**
          * This is the username client.clerks.clerk(" + i + ")[@publisher]
          *
-         * @return
+         * @return the username
          */
         public String getPublisher() {
                 return publisher;
@@ -1369,7 +1372,7 @@ public class UDDIClerk implements Serial
          * otherwise the cipher text will be returned. client.clerks.clerk(" + i
          * + ")[@password]
          *
-         * @return
+         * @return unencrypted password
          */
         public String getPassword() {
                 if (isencrypted) {
@@ -1387,7 +1390,7 @@ public class UDDIClerk implements Serial
          * the clear text will be returned. client.clerks.clerk(" + i +
          * ")[@password]
          *
-         * @return
+         * @return password as is in the config file
          */
         public String getRawPassword() {
                 return password;
@@ -1407,7 +1410,7 @@ public class UDDIClerk implements Serial
          * Used for the automated registration of services via WSDL2UDDI<br>
          * config file: client.clerks.clerk(" + i + ").wsdl
          *
-         * @return
+         * @return a WSDL array
          * @see WSDL2UDDI
          */
         public WSDL[] getWsdls() {
@@ -1446,7 +1449,7 @@ public class UDDIClerk implements Serial
         /**
          * client.clerks.clerk(" + i + ")[@cryptoProvider]
          *
-         * @return
+         * @return may be null if not defined
          */
         public String getCryptoProvider() {
                 return this.cryptoProvider;
@@ -1455,13 +1458,16 @@ public class UDDIClerk implements Serial
         /**
          * client.clerks.clerk(" + i + ")[@isPasswordEncrypted]
          *
-         * @return
+         * @return true/false
          */
         public boolean getIsPasswordEncrypted() {
                 return this.isencrypted;
 
         }
 
+        /**
+         * Internal classed used for wsdl registration
+         */
         public class WSDL {
 
                 private String businessKey;
@@ -1628,10 +1634,10 @@ public class UDDIClerk implements Serial
          * <li>1.0</li>
          * <li>0.1</li>
          * </ul>
-         * @param version
-         * @param bindingTemplate
+         * @param bindingTemplate the input binding template, must not be null
          * @return a list if binding templates where the version equals ignoring
          * case trimmed equals the version value
+         * @throws IllegalArgumentException if the version or bindingTemplate is null
          */
         public static Set<BindingTemplate> getBindingByVersion(String version, List<BindingTemplate> bindingTemplate) throws IllegalArgumentException {
                 if (version == null) {
@@ -1669,7 +1675,7 @@ public class UDDIClerk implements Serial
          * <i>should</i> be accessible for the given service.
          *
          * @param serviceKey
-         * @return
+         * @return a list of URI endpoints
          */
         public List<String> getEndpoints(String serviceKey) {
                 List<String> items = new ArrayList<String>();
@@ -1754,7 +1760,7 @@ public class UDDIClerk implements Serial
          * fetches a wsdl endpoint and parses for execution urls
          *
          * @param value
-         * @return
+         * @return a list of endpoints from a WSDL provided it is reachable and parsable 
          */
         private List<String> FetchWSDL(String value) {
                 List<String> items = new ArrayList<String>();
@@ -1793,7 +1799,7 @@ public class UDDIClerk implements Serial
          * Gets service details or NULL if it doesn't exist or an error occurred
          *
          * @param getDetail
-         * @return
+         * @return null if not found
          * @throws RemoteException
          * @throws ConfigurationException
          * @throws TransportException
@@ -1807,7 +1813,7 @@ public class UDDIClerk implements Serial
          *
          * @param getDetail
          * @param node
-         * @return
+         * @return null if not found
          * @throws RemoteException
          * @throws TransportException
          * @throws ConfigurationException

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java Sun Jan 19 22:07:59 2014
@@ -23,7 +23,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -34,6 +33,7 @@ import org.apache.juddi.v3.client.UDDICo
 import org.apache.juddi.v3.client.embed.EmbeddedRegistry;
 import org.apache.juddi.v3.client.mapping.ServiceLocator;
 import org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl;
+import org.apache.juddi.v3.client.subscription.SubscriptionCallbackListener;
 import org.apache.juddi.v3.client.transport.InVMTransport;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.uddi.api_v3.BindingTemplate;
@@ -44,423 +44,446 @@ import org.uddi.api_v3.TModelInstanceDet
 import org.uddi.api_v3.TModelInstanceInfo;
 
 /**
- * <p>The UDDIClient is the main entry point for using the jUDDI client. The UDDICLient
- * provides a simple way to get interact with a UDDI registry using the UDDI v3 API.</p>
- * 
+ * <p>
+ * The UDDIClient is the main entry point for using the jUDDI client. The
+ * UDDICLient provides a simple way to get interact with a UDDI registry using
+ * the UDDI v3 API.</p>
+ *
  * <h3>Note:</h3>
- * <p>It is also possible to use the Java API for XML Registries (JAXR). Apache Scout is
- * an implementation of this API that can be configured to -behind the scenes- use the
- * jUDDI Client code to access either UDDIv2 or UDDIv3 registry. The advantage of using
- * JAXR is that your code can be configured to interact with any XML Registry (such as UDDI
- * or ebXML). The downside is that JAXR has not evolved beyond the 1.0 release and is
- * tightly coupled to the ebXML data structures, which being mapped to the UDDI data structures.
- * For more information on JAXR see the Apache Scout project, which is a sub project of Apache jUDDI.
- * If programmatic acess to a UDDIv3 registry is what you want, we recommend using the UDDIv3 
- * API with the UDDIClient.</p>
- * 
- * <p>The UDDIClient uses a XML formatted configuration file, which by default is loaded from the classpath
- * from location META-INF/uddi.xml.</p>
- * 
+ * <p>
+ * It is also possible to use the Java API for XML Registries (JAXR). Apache
+ * Scout is an implementation of this API that can be configured to -behind the
+ * scenes- use the jUDDI Client code to access either UDDIv2 or UDDIv3 registry.
+ * The advantage of using JAXR is that your code can be configured to interact
+ * with any XML Registry (such as UDDI or ebXML). The downside is that JAXR has
+ * not evolved beyond the 1.0 release and is tightly coupled to the ebXML data
+ * structures, which being mapped to the UDDI data structures. For more
+ * information on JAXR see the Apache Scout project, which is a sub project of
+ * Apache jUDDI. If programmatic acess to a UDDIv3 registry is what you want, we
+ * recommend using the UDDIv3 API with the UDDIClient.</p>
+ *
+ * <p>
+ * The UDDIClient uses a XML formatted configuration file, which by default is
+ * loaded from the classpath from location META-INF/uddi.xml.</p>
+ *
  * @author kstam
  *
  */
 public class UDDIClient {
 
-    private static Log log = LogFactory.getLog(UDDIClient.class);
-    private ClientConfig clientConfig = null;
-    private String CONFIG_FILE = "META-INF/uddi.xml";
-    private Properties properties = null;
-    private static Map<String, ServiceLocator> serviceLocators = new HashMap<String, ServiceLocator>();
-
-    /**
-     * Default constructor, loads from the default config, META-INF/uddi.xml
-     *
-     * @throws ConfigurationException
-     */
-    public UDDIClient() throws ConfigurationException {
-        super();
-        log.info("jUDDI Client version - " + Release.getjUDDIClientVersion());
-        clientConfig = new ClientConfig(CONFIG_FILE, properties);
-        UDDIClientContainer.addClient(this);
-    }
-
-    /**
-     * Manages the clerks. Initiates reading the client configuration from the
-     * uddi.xml.
-     *
-     * @throws ConfigurationException
-     */
-    public UDDIClient(String configurationFile) throws ConfigurationException {
-        super();
-        log.info("jUDDI Client version - " + Release.getjUDDIClientVersion());
-        clientConfig = new ClientConfig(configurationFile);
-        UDDIClientContainer.addClient(this);
-    }
-
-    /**
-     * Manages the clerks. Initiates reading the client configuration from the
-     * uddi.xml.
-     *
-     * @throws ConfigurationException
-     */
-    public UDDIClient(String configurationFile, Properties properties) throws ConfigurationException {
-        super();
-        log.info("jUDDI Client version - " + Release.getjUDDIClientVersion());
-        clientConfig = new ClientConfig(configurationFile, properties);
-        UDDIClientContainer.addClient(this);
-    }
-
-    /**
-     * Uses the client config, and looks for a clerk called "default"
-     *
-     * @return
-     * @throws ConfigurationException
-     */
-    public synchronized ServiceLocator getServiceLocator() throws ConfigurationException {
-        return getServiceLocator(null);
-    }
-
-    /**
-     * @param clerkName - if null defaults to "default"
-     * @return
-     * @throws ConfigurationException
-     */
-    public synchronized ServiceLocator getServiceLocator(String clerkName) throws ConfigurationException {
-        UDDIClerk clerk = getClerk(clerkName);
-        if (!serviceLocators.containsKey(clerk.getName())) {
-            ServiceLocator serviceLocator = new ServiceLocator(clerk, new URLLocalizerDefaultImpl(), properties);
-            serviceLocators.put(clerk.getName(), serviceLocator);
-        }
-        return serviceLocators.get(clerk.getName());
-    }
-
-    /**
-     * Stops the clerks. If transport is InVM, all database resources are released.
-     * If anything was auto registered, it will be removed prior to shutdown
-     *
-     * @throws ConfigurationException
-     */
-    public void stop() throws ConfigurationException {
-        log.info("Stopping UDDI Client " + clientConfig.getClientName());
-        releaseResources();
-        //fix for when someone runs UDDIClient.stop more than once
-        if (UDDIClientContainer.contains(getName()))
-            UDDIClientContainer.removeClerkManager(getName());
-
-        //If running in embedded mode
-        if (InVMTransport.class.getCanonicalName().equals(getClientConfig().getHomeNode().getProxyTransport())) {
-            log.info("Shutting down embedded Server");
-            stopEmbeddedServer();
-        }
-        log.info("UDDI Clerks shutdown completed for manager " + clientConfig.getClientName());
-    }
-
-    private void releaseResources() {
-        if (this.clientConfig.isRegisterOnStartup()) {
-            unRegisterWSDLs();
-            unRegisterBindingsOfAnnotatedServices(true);
-        }
-    }
-
-    /**
-     * Initializes the UDDI Clerk. If transport is set to InVM, this will initialize 
-     * all database connections, other it will trigger all background registration threads
-     *
-     * @throws ConfigurationException
-     */
-    public void start() throws ConfigurationException {
-
-        if (UDDIClientContainer.addClient(this)) {
-            //If running in embedded mode
-            if (InVMTransport.class.getCanonicalName().equals(getClientConfig().getHomeNode().getProxyTransport())) {
-                log.info("Starting embedded Server");
-                startEmbeddedServer();
-            }
-            if (this.clientConfig.isRegisterOnStartup()) {
-                Runnable runnable = new BackGroundRegistration(this);
-                Thread thread = new Thread(runnable);
-                thread.start();
-            }
-        }
-    }
-
-    protected void startEmbeddedServer() throws ConfigurationException {
-
-        try {
-            String embeddedServerClass = getClientConfig().getHomeNode().getProperties().getProperty("embeddedServer", "org.apache.juddi.v3.client.embed.JUDDIRegistry");
-            Class<?> clazz = ClassUtil.forName(embeddedServerClass, this.getClass());
-            EmbeddedRegistry embeddedRegistry = (EmbeddedRegistry) clazz.newInstance();
-            embeddedRegistry.start();
-        } catch (Exception e) {
-            throw new ConfigurationException(e.getMessage(), e);
-        }
-    }
-
-    protected void stopEmbeddedServer() throws ConfigurationException {
-
-        try {
-            String embeddedServerClass = getClientConfig().getHomeNode().getProperties().getProperty("embeddedServer", "org.apache.juddi.v3.client.embed.JUDDIRegistry");
-            Class<?> clazz = ClassUtil.forName(embeddedServerClass, this.getClass());
-            EmbeddedRegistry embeddedRegistry = (EmbeddedRegistry) clazz.newInstance();
-            embeddedRegistry.stop();
-        } catch (Exception e) {
-            throw new ConfigurationException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * calls stop and start again
-     * @throws ConfigurationException 
-     */
-    public void restart() throws ConfigurationException {
-        stop();
-        start();
-    }
-
-    /**
-     * Saves the clerk and node info from the uddi.xml to the home jUDDI
-     * registry. This info is needed if you want to JUDDI Server to do
-     * XRegistration/"replication".
-     */
-    public void saveClerkAndNodeInfo() {
-
-        Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
-
-        if (uddiClerks.size() > 0) {
-
-            //obtaining a clerk that can write to the home registry
-            UDDIClerk homeClerk = null;
-            for (UDDIClerk clerk : uddiClerks.values()) {
-                if (clerk.getUDDINode().isHomeJUDDI()) {
-                    homeClerk = clerk;
-                }
-            }
-            //registering nodes and clerks
-            if (homeClerk != null) {
-                int numberOfHomeJUDDIs = 0;
-                for (UDDINode uddiNode : clientConfig.getUDDINodes().values()) {
-                    if (uddiNode.isHomeJUDDI()) {
-                        numberOfHomeJUDDIs++;
-                    }
-                    homeClerk.saveNode(uddiNode.getApiNode());
-                }
-                if (numberOfHomeJUDDIs == 1) {
-                    for (UDDIClerk clerk : clientConfig.getUDDIClerks().values()) {
-                        homeClerk.saveClerk(clerk);
-                    }
-                } else {
-                    log.error("The client config needs to have one homeJUDDI node and found " + numberOfHomeJUDDIs);
-                }
-            } else {
-                log.debug("No home clerk found.");
-            }
-        }
-    }
-
-    /**
-     * X-Register services listed in the uddi.xml
-     */
-    public void xRegister() {
-        log.debug("Starting cross registration...");
-        //XRegistration of listed businesses
-        Set<XRegistration> xBusinessRegistrations = clientConfig.getXBusinessRegistrations();
-        for (XRegistration xRegistration : xBusinessRegistrations) {
-            xRegistration.xRegisterBusiness();
-        }
-        //XRegistration of listed serviceBindings
-        Set<XRegistration> xServiceBindingRegistrations = clientConfig.getXServiceBindingRegistrations();
-        for (XRegistration xRegistration : xServiceBindingRegistrations) {
-            xRegistration.xRegisterServiceBinding();
-        }
-        log.debug("Cross registration completed");
-    }
-
-    /**
-     * Registers services to UDDI using a clerk, and the uddi.xml configuration.
-     */
-    public void registerAnnotatedServices() {
-        Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
-        if (uddiClerks.size() > 0) {
-            AnnotationProcessor ap = new AnnotationProcessor();
-            for (UDDIClerk uddiClerk : uddiClerks.values()) {
-                Collection<BusinessService> services = ap.readServiceAnnotations(
-                        uddiClerk.getClassWithAnnotations(), uddiClerk.getUDDINode().getProperties());
-                for (BusinessService businessService : services) {
-                    log.info("Node=" + uddiClerk.getUDDINode().getApiNode().getName());
-                    uddiClerk.register(businessService, uddiClerk.getUDDINode().getApiNode());
-                }
-            }
-        }
-    }
-
-    /**
-     * Removes the service and all of its bindingTemplates of the annotated
-     * classes.
-     *
-     */
-    public void unRegisterAnnotatedServices() {
-        Map<String, UDDIClerk> clerks = clientConfig.getUDDIClerks();
-        if (clerks.size() > 0) {
-            AnnotationProcessor ap = new AnnotationProcessor();
-            for (UDDIClerk clerk : clerks.values()) {
-                Collection<BusinessService> services = ap.readServiceAnnotations(
-                        clerk.getClassWithAnnotations(), clerk.getUDDINode().getProperties());
-                for (BusinessService businessService : services) {
-                    clerk.unRegisterService(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
-                }
-            }
-        }
-    }
-
-    /**
-     * Removes the bindings of the services in the annotated classes. Multiple
-     * nodes may register the same service using different BindingTempates. If
-     * the last BindingTemplate is removed the service can be removed as well.
-     *
-     * @param removeServiceWithNoBindingTemplates - if set to true it will
-     * remove the service if there are no other BindingTemplates.
-     */
-    public void unRegisterBindingsOfAnnotatedServices(boolean removeServiceWithNoBindingTemplates) {
-
-        Map<String, UDDIClerk> clerks = clientConfig.getUDDIClerks();
-        if (clerks.size() > 0) {
-            AnnotationProcessor ap = new AnnotationProcessor();
-            for (UDDIClerk clerk : clerks.values()) {
-                Collection<BusinessService> services = ap.readServiceAnnotations(
-                        clerk.getClassWithAnnotations(), clerk.getUDDINode().getProperties());
-                for (BusinessService businessService : services) {
-                    if (businessService.getBindingTemplates() != null) {
-                        List<BindingTemplate> bindingTemplates = businessService.getBindingTemplates().getBindingTemplate();
-                        for (BindingTemplate bindingTemplate : bindingTemplates) {
-                            clerk.unRegisterBinding(bindingTemplate.getBindingKey(), clerk.getUDDINode().getApiNode());
-                        }
-                    }
-                    if (removeServiceWithNoBindingTemplates) {
-                        try {
-                            BusinessService existingService = clerk.getServiceDetail(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
-                            if (existingService.getBindingTemplates() == null || existingService.getBindingTemplates().getBindingTemplate().size() == 0) {
-                                clerk.unRegisterService(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
-                            }
-                        } catch (Exception e) {
-                            log.error(e.getMessage(), e);
-                        }
-                    }
-                }
-            }
-        }
-
-    }
-
-    /**
-     * Returns a live instance of the raw configuration file
-     * @return 
-     */
-    public ClientConfig getClientConfig() {
-        return clientConfig;
-    }
-    
-    /**
-     * returns getClientConfig().getClientName()
-     * @return 
-     */
-    public String getName() {
-        return clientConfig.getClientName();
-    }
-    /**
-     * maps to config file
-     * client[@callbackUrl]
-     * Not currently used
-     * @return 
-     */
-    @Deprecated
-    public String getClientCallbackUrl() {
-        return clientConfig.getClientCallbackUrl();
-    }
-
-    /**
-     * Returns the transport defined for the node with the given name "default".
-     * deprecated, use the getTransport(String nodeName) instead. Returns the
-     * "default" jUDDI nodes Transport.
-     * @deprecated, use the getTransport(String nodeName) instead. Returns the
-     * "default" jUDDI nodes Transport.
-     * Note: this will always return a new instance of Transport
-     * @return
-     * @throws ConfigurationException
-     */
-    public Transport getTransport() throws ConfigurationException {
-        return getTransport("default");
-    }
-
-    /**
-     * Returns the transport defined for the node with the given nodeName.
-     * Note: this will always return a new instance of Transport
-     * @param nodeName
-     * @return
-     * @throws ConfigurationException
-     */
-    public Transport getTransport(String nodeName) throws ConfigurationException {
-        try {
-            String clazz = clientConfig.getUDDINode(nodeName).getProxyTransport();
-            String managerName = clientConfig.getClientName();
-            Class<?> transportClass = ClassUtil.forName(clazz, UDDIClient.class);
-            if (transportClass != null) {
-                Transport transport = (Transport) transportClass.getConstructor(String.class, String.class).newInstance(managerName, nodeName);
-                return transport;
-            } else {
-                throw new ConfigurationException("ProxyTransport was not defined in the " + clientConfig.getConfigurationFile());
-            }
-        } catch (Exception e) {
-            throw new ConfigurationException(e.getMessage(), e);
-        }
-    }
-
-    /**
-     * Gets the UDDI Clerk, the entry point into many functions of the juddi
-     * client
-     *
-     * @param clerkName - This references the uddi/client/clerk@name of the
-     * juddi client config file. it stores credentials if necessary and
-     * associates it with a particular UDDI node (server/cluster) If not
-     * specified, the value of "default" will be used.
-     * @return A clerk instance if the clerk is defined in the config file or NULL if not found
-     */
-    public UDDIClerk getClerk(String clerkName) {
-        if (clerkName == null || clerkName.length() == 0) {
-            return getClientConfig().getUDDIClerks().get("default");
-        }
-        return getClientConfig().getUDDIClerks().get(clerkName);
-    }
-
-    /**
-     * Registers services to UDDI using a clerk, and the uddi.xml configuration.
-     *
-          */
-    public void registerWSDLs() {
-        Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
-        if (uddiClerks.size() > 0) {
-            for (UDDIClerk uddiClerk : uddiClerks.values()) {
-                uddiClerk.registerWsdls();
-            }
-        }
-    }
-
-    /**
-     * unregisters all config defined wsdls
-     */
-    public void unRegisterWSDLs() {
-        Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
-        if (uddiClerks.size() > 0) {
-            for (UDDIClerk uddiClerk : uddiClerks.values()) {
-                uddiClerk.unRegisterWsdls();
-            }
-        }
-    }
-    
-    /**
-     * adds the typical SOAP tmodel references, but only if they aren't already present
-     * @param bt
-     * @return 
-     */
+        private static Log log = LogFactory.getLog(UDDIClient.class);
+        private ClientConfig clientConfig = null;
+        private String CONFIG_FILE = "META-INF/uddi.xml";
+        private Properties properties = null;
+        private static Map<String, ServiceLocator> serviceLocators = new HashMap<String, ServiceLocator>();
+
+        /**
+         * Default constructor, loads from the default config, META-INF/uddi.xml
+         *
+         * @throws ConfigurationException
+         */
+        public UDDIClient() throws ConfigurationException {
+                super();
+                log.info("jUDDI Client version - " + Release.getjUDDIClientVersion());
+                clientConfig = new ClientConfig(CONFIG_FILE, properties);
+                UDDIClientContainer.addClient(this);
+        }
+
+        /**
+         * Manages the clerks. Initiates reading the client configuration from
+         * the uddi.xml.
+         *
+         * @throws ConfigurationException
+         */
+        public UDDIClient(String configurationFile) throws ConfigurationException {
+                super();
+                log.info("jUDDI Client version - " + Release.getjUDDIClientVersion());
+                clientConfig = new ClientConfig(configurationFile);
+                UDDIClientContainer.addClient(this);
+        }
+
+        /**
+         * Manages the clerks. Initiates reading the client configuration from
+         * the uddi.xml.
+         *
+         * @param configurationFile
+         * @param properties
+         * @throws ConfigurationException
+         */
+        public UDDIClient(String configurationFile, Properties properties) throws ConfigurationException {
+                super();
+                log.info("jUDDI Client version - " + Release.getjUDDIClientVersion());
+                clientConfig = new ClientConfig(configurationFile, properties);
+                UDDIClientContainer.addClient(this);
+        }
+
+        /**
+         * Uses the client config, and looks for a clerk called "default"
+         *
+         * @return returns getServiceLocator(null);
+         * @throws ConfigurationException
+         */
+        public synchronized ServiceLocator getServiceLocator() throws ConfigurationException {
+                return getServiceLocator(null);
+        }
+
+        /**
+         * @param clerkName - if null defaults to "default"
+         * @return a serviceLocator object
+         * @throws ConfigurationException
+         */
+        public synchronized ServiceLocator getServiceLocator(String clerkName) throws ConfigurationException {
+                UDDIClerk clerk = getClerk(clerkName);
+                if (!serviceLocators.containsKey(clerk.getName())) {
+                        ServiceLocator serviceLocator = new ServiceLocator(clerk, new URLLocalizerDefaultImpl(), properties);
+                        serviceLocators.put(clerk.getName(), serviceLocator);
+                }
+                return serviceLocators.get(clerk.getName());
+        }
+
+        /**
+         * Stops the clerks. If transport is InVM, all database resources are
+         * released. If anything was auto registered, it will be removed prior
+         * to shutdown
+         *
+         * @throws ConfigurationException
+         */
+        public void stop() throws ConfigurationException {
+                log.info("Stopping UDDI Client " + clientConfig.getClientName());
+                releaseResources();
+                //fix for when someone runs UDDIClient.stop more than once
+                if (UDDIClientContainer.contains(getName())) {
+                        UDDIClientContainer.removeClerkManager(getName());
+                }
+
+                //If running in embedded mode
+                if (InVMTransport.class.getCanonicalName().equals(getClientConfig().getHomeNode().getProxyTransport())) {
+                        log.info("Shutting down embedded Server");
+                        stopEmbeddedServer();
+                }
+                log.info("UDDI Clerks shutdown completed for manager " + clientConfig.getClientName());
+        }
+
+        private void releaseResources() {
+                if (this.clientConfig.isRegisterOnStartup()) {
+                        unRegisterWSDLs();
+                        unRegisterBindingsOfAnnotatedServices(true);
+                }
+        }
+
+        /**
+         * Initializes the UDDI Clerk. If transport is set to InVM, this will
+         * initialize all database connections, other it will trigger all
+         * background registration threads
+         *
+         * @throws ConfigurationException
+         */
+        public void start() throws ConfigurationException {
+
+                if (UDDIClientContainer.addClient(this)) {
+                        //If running in embedded mode
+                        if (InVMTransport.class.getCanonicalName().equals(getClientConfig().getHomeNode().getProxyTransport())) {
+                                log.info("Starting embedded Server");
+                                startEmbeddedServer();
+                        }
+                        if (this.clientConfig.isRegisterOnStartup()) {
+                                Runnable runnable = new BackGroundRegistration(this);
+                                Thread thread = new Thread(runnable);
+                                thread.start();
+                        }
+                }
+        }
+
+        protected void startEmbeddedServer() throws ConfigurationException {
+
+                try {
+                        String embeddedServerClass = getClientConfig().getHomeNode().getProperties().getProperty("embeddedServer", "org.apache.juddi.v3.client.embed.JUDDIRegistry");
+                        Class<?> clazz = ClassUtil.forName(embeddedServerClass, this.getClass());
+                        EmbeddedRegistry embeddedRegistry = (EmbeddedRegistry) clazz.newInstance();
+                        embeddedRegistry.start();
+                } catch (Exception e) {
+                        throw new ConfigurationException(e.getMessage(), e);
+                }
+        }
+
+        protected void stopEmbeddedServer() throws ConfigurationException {
+
+                try {
+                        String embeddedServerClass = getClientConfig().getHomeNode().getProperties().getProperty("embeddedServer", "org.apache.juddi.v3.client.embed.JUDDIRegistry");
+                        Class<?> clazz = ClassUtil.forName(embeddedServerClass, this.getClass());
+                        EmbeddedRegistry embeddedRegistry = (EmbeddedRegistry) clazz.newInstance();
+                        embeddedRegistry.stop();
+                } catch (Exception e) {
+                        throw new ConfigurationException(e.getMessage(), e);
+                }
+        }
+
+        /**
+         * calls stop and start again
+         *
+         * @throws ConfigurationException
+         */
+        public void restart() throws ConfigurationException {
+                stop();
+                start();
+        }
+
+        /**
+         * Saves the clerk and node info from the uddi.xml to the home jUDDI
+         * registry. This info is needed if you want to JUDDI Server to do
+         * XRegistration/"replication".
+         */
+        public void saveClerkAndNodeInfo() {
+
+                Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
+
+                if (uddiClerks.size() > 0) {
+
+                        //obtaining a clerk that can write to the home registry
+                        UDDIClerk homeClerk = null;
+                        for (UDDIClerk clerk : uddiClerks.values()) {
+                                if (clerk.getUDDINode().isHomeJUDDI()) {
+                                        homeClerk = clerk;
+                                }
+                        }
+                        //registering nodes and clerks
+                        if (homeClerk != null) {
+                                int numberOfHomeJUDDIs = 0;
+                                for (UDDINode uddiNode : clientConfig.getUDDINodes().values()) {
+                                        if (uddiNode.isHomeJUDDI()) {
+                                                numberOfHomeJUDDIs++;
+                                        }
+                                        homeClerk.saveNode(uddiNode.getApiNode());
+                                }
+                                if (numberOfHomeJUDDIs == 1) {
+                                        for (UDDIClerk clerk : clientConfig.getUDDIClerks().values()) {
+                                                homeClerk.saveClerk(clerk);
+                                        }
+                                } else {
+                                        log.error("The client config needs to have one homeJUDDI node and found " + numberOfHomeJUDDIs);
+                                }
+                        } else {
+                                log.debug("No home clerk found.");
+                        }
+                }
+        }
+
+        /**
+         * X-Register services listed in the uddi.xml
+         */
+        public void xRegister() {
+                log.debug("Starting cross registration...");
+                //XRegistration of listed businesses
+                Set<XRegistration> xBusinessRegistrations = clientConfig.getXBusinessRegistrations();
+                for (XRegistration xRegistration : xBusinessRegistrations) {
+                        xRegistration.xRegisterBusiness();
+                }
+                //XRegistration of listed serviceBindings
+                Set<XRegistration> xServiceBindingRegistrations = clientConfig.getXServiceBindingRegistrations();
+                for (XRegistration xRegistration : xServiceBindingRegistrations) {
+                        xRegistration.xRegisterServiceBinding();
+                }
+                log.debug("Cross registration completed");
+        }
+
+        /**
+         * Registers services to UDDI using a clerk, and the uddi.xml
+         * configuration.
+         */
+        public void registerAnnotatedServices() {
+                Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
+                if (uddiClerks.size() > 0) {
+                        AnnotationProcessor ap = new AnnotationProcessor();
+                        for (UDDIClerk uddiClerk : uddiClerks.values()) {
+                                Collection<BusinessService> services = ap.readServiceAnnotations(
+                                        uddiClerk.getClassWithAnnotations(), uddiClerk.getUDDINode().getProperties());
+                                for (BusinessService businessService : services) {
+                                        log.info("Node=" + uddiClerk.getUDDINode().getApiNode().getName());
+                                        uddiClerk.register(businessService, uddiClerk.getUDDINode().getApiNode());
+                                }
+                        }
+                }
+        }
+
+        /**
+         * Removes the service and all of its bindingTemplates of the annotated
+         * classes.
+         *
+         */
+        public void unRegisterAnnotatedServices() {
+                Map<String, UDDIClerk> clerks = clientConfig.getUDDIClerks();
+                if (clerks.size() > 0) {
+                        AnnotationProcessor ap = new AnnotationProcessor();
+                        for (UDDIClerk clerk : clerks.values()) {
+                                Collection<BusinessService> services = ap.readServiceAnnotations(
+                                        clerk.getClassWithAnnotations(), clerk.getUDDINode().getProperties());
+                                for (BusinessService businessService : services) {
+                                        clerk.unRegisterService(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
+                                }
+                        }
+                }
+        }
+
+        /**
+         * Removes the bindings of the services in the annotated classes.
+         * Multiple nodes may register the same service using different
+         * BindingTempates. If the last BindingTemplate is removed the service
+         * can be removed as well.
+         *
+         * @param removeServiceWithNoBindingTemplates - if set to true it will
+         * remove the service if there are no other BindingTemplates.
+         */
+        public void unRegisterBindingsOfAnnotatedServices(boolean removeServiceWithNoBindingTemplates) {
+
+                Map<String, UDDIClerk> clerks = clientConfig.getUDDIClerks();
+                if (clerks.size() > 0) {
+                        AnnotationProcessor ap = new AnnotationProcessor();
+                        for (UDDIClerk clerk : clerks.values()) {
+                                Collection<BusinessService> services = ap.readServiceAnnotations(
+                                        clerk.getClassWithAnnotations(), clerk.getUDDINode().getProperties());
+                                for (BusinessService businessService : services) {
+                                        if (businessService.getBindingTemplates() != null) {
+                                                List<BindingTemplate> bindingTemplates = businessService.getBindingTemplates().getBindingTemplate();
+                                                for (BindingTemplate bindingTemplate : bindingTemplates) {
+                                                        clerk.unRegisterBinding(bindingTemplate.getBindingKey(), clerk.getUDDINode().getApiNode());
+                                                }
+                                        }
+                                        if (removeServiceWithNoBindingTemplates) {
+                                                try {
+                                                        BusinessService existingService = clerk.getServiceDetail(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
+                                                        if (existingService.getBindingTemplates() == null || existingService.getBindingTemplates().getBindingTemplate().size() == 0) {
+                                                                clerk.unRegisterService(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
+                                                        }
+                                                } catch (Exception e) {
+                                                        log.error(e.getMessage(), e);
+                                                }
+                                        }
+                                }
+                        }
+                }
+
+        }
+
+        /**
+         * Returns a live instance of the raw configuration file
+         *
+         * @return the client config loaded from file
+         */
+        public ClientConfig getClientConfig() {
+                return clientConfig;
+        }
+
+        /**
+         * returns getClientConfig().getClientName()
+         *
+         * @return getClientConfig().getClientName()
+         */
+        public String getName() {
+                return clientConfig.getClientName();
+        }
+
+        /**
+         * maps to config file client[@callbackUrl] Not currently used
+         *
+         * @return client[@callbackUrl]
+         * @deprecated use SubscriptionCallbackListener
+         * @see SubscriptionCallbackListener
+         */
+        @Deprecated 
+        public String getClientCallbackUrl() {
+                return clientConfig.getClientCallbackUrl();
+        }
+
+        /**
+         * Returns the transport defined for the node with the given name
+         * "default". deprecated, use the getTransport(String nodeName) instead.
+         * Returns the "default" jUDDI nodes Transport.
+         *
+         * @deprecated, use the getTransport(String nodeName) instead. Returns
+         * the "default" jUDDI nodes Transport. Note: this will always return a
+         * new instance of Transport
+         * @return a transport object
+         * @throws ConfigurationException
+         */
+        public Transport getTransport() throws ConfigurationException {
+                return getTransport("default");
+        }
+
+        /**
+         * Returns the transport defined for the node with the given nodeName.
+         * Note: this will always return a new instance of Transport
+         *
+         * @param nodeName
+         * @return a transport object
+         * @throws ConfigurationException
+         */
+        public Transport getTransport(String nodeName) throws ConfigurationException {
+                try {
+                        String clazz = clientConfig.getUDDINode(nodeName).getProxyTransport();
+                        String managerName = clientConfig.getClientName();
+                        Class<?> transportClass = ClassUtil.forName(clazz, UDDIClient.class);
+                        if (transportClass != null) {
+                                Transport transport = (Transport) transportClass.getConstructor(String.class, String.class).newInstance(managerName, nodeName);
+                                return transport;
+                        } else {
+                                throw new ConfigurationException("ProxyTransport was not defined in the " + clientConfig.getConfigurationFile());
+                        }
+                } catch (Exception e) {
+                        throw new ConfigurationException(e.getMessage(), e);
+                }
+        }
+
+        /**
+         * Gets the UDDI Clerk, the entry point into many functions of the juddi
+         * client
+         *
+         * @param clerkName - This references the uddi/client/clerk@name of the
+         * juddi client config file. it stores credentials if necessary and
+         * associates it with a particular UDDI node (server/cluster) If not
+         * specified, the value of "default" will be used.
+         * @return A clerk instance if the clerk is defined in the config file
+         * or NULL if not found
+         */
+        public UDDIClerk getClerk(String clerkName) {
+                if (clerkName == null || clerkName.length() == 0) {
+                        return getClientConfig().getUDDIClerks().get("default");
+                }
+                return getClientConfig().getUDDIClerks().get(clerkName);
+        }
+
+        /**
+         * Registers services to UDDI using a clerk, and the uddi.xml
+         * configuration.
+         *
+         */
+        public void registerWSDLs() {
+                Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
+                if (uddiClerks.size() > 0) {
+                        for (UDDIClerk uddiClerk : uddiClerks.values()) {
+                                uddiClerk.registerWsdls();
+                        }
+                }
+        }
+
+        /**
+         * unregisters all config defined wsdls
+         */
+        public void unRegisterWSDLs() {
+                Map<String, UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
+                if (uddiClerks.size() > 0) {
+                        for (UDDIClerk uddiClerk : uddiClerks.values()) {
+                                uddiClerk.unRegisterWsdls();
+                        }
+                }
+        }
+
+        /**
+         * adds the typical SOAP tmodel references, but only if they aren't
+         * already present
+         *
+         * @param bt
+         * @return a modified instance of the source binding template
+         */
         public static BindingTemplate addSOAPtModels(BindingTemplate bt) {
                 if (bt.getCategoryBag() == null) {
                         bt.setCategoryBag(new CategoryBag());
@@ -475,10 +498,12 @@ public class UDDIClient {
                                 }
                         }
                 }
-                if (!found)
-                         bt.getCategoryBag().getKeyedReference().add(new KeyedReference( "uddi:uddi.org:categorization:types","uddi-org:types:wsdl", "wsdlDeployment" ));
-                if (bt.getCategoryBag().getKeyedReference().isEmpty() && bt.getCategoryBag().getKeyedReferenceGroup().isEmpty())
+                if (!found) {
+                        bt.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "uddi-org:types:wsdl", "wsdlDeployment"));
+                }
+                if (bt.getCategoryBag().getKeyedReference().isEmpty() && bt.getCategoryBag().getKeyedReferenceGroup().isEmpty()) {
                         bt.setCategoryBag(null);
+                }
                 if (bt.getTModelInstanceDetails() == null) {
                         bt.setTModelInstanceDetails(new TModelInstanceDetails());
                 }
@@ -563,9 +588,11 @@ public class UDDIClient {
         }
 
         /**
-         * adds the typical REST tmodel references, but only if they aren't already present
+         * adds the typical REST tmodel references, but only if they aren't
+         * already present
+         *
          * @param bt
-         * @return 
+         * @return a modified instance of the source binding template
          */
         public static BindingTemplate addRESTtModels(BindingTemplate bt) {
                 if (bt.getTModelInstanceDetails() == null) {

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDINode.java Sun Jan 19 22:07:59 2014
@@ -155,7 +155,7 @@ public class UDDINode implements Seriali
 	}
         
         /**
-         * used ONLY for jUDDI's HTTP GET (REST) endpoint
+         * used ONLY for UDDI's HTTP GET (REST) endpoint
          * @since 3.2
          * @param url 
          */
@@ -165,7 +165,7 @@ public class UDDINode implements Seriali
         /**
          * used ONLY for jUDDI's HTTP GET (REST) endpoint
          * @since 3.2
-         * @return 
+         * @return the REST url for the Inquiry, not supported by all registries 
          */
         public String getInquiry_REST_Url() {
 		return inquiryRESTUrl;

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java Sun Jan 19 22:07:59 2014
@@ -50,7 +50,7 @@ public class WebHelper {
 	 * &lt;/context-param&gt;
 	 * </pre>
 	 * @param servletContext
-	 * @return
+	 * @return a UDDI Client instance
 	 * @throws ConfigurationException
 	 */
 	public static UDDIClient getUDDIClient(ServletContext servletContext) throws ConfigurationException 

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/Cryptor.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/Cryptor.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/Cryptor.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/Cryptor.java Sun Jan 19 22:07:59 2014
@@ -14,7 +14,6 @@
  * limitations under the License.
  *
  */
-
 package org.apache.juddi.v3.client.cryptor;
 
 import java.security.InvalidAlgorithmParameterException;
@@ -28,38 +27,47 @@ import javax.crypto.NoSuchPaddingExcepti
 /**
  * @author Anou Manavalan
  */
-public interface Cryptor
-{
-  /**
-   * Encrypt the string, if unable to encrypt, return null
-   */
-  String encrypt(String str)
-    throws  NoSuchPaddingException,
-            NoSuchAlgorithmException,
-            InvalidAlgorithmParameterException,
-            InvalidKeyException,
-            IllegalBlockSizeException,
-            BadPaddingException;
-           /**
-            * decrypts the string
-             * @param str
-             * @return, if the password can be decrypted, the decrypted value is returned, otherwise the original value is returned<br>
-             * In the event that decryption fails, the error message must be logged.
-            * @throws NoSuchPaddingException
-            * @throws NoSuchAlgorithmException
-            * @throws InvalidAlgorithmParameterException
-            * @throws InvalidKeyException
-            * @throws IllegalBlockSizeException
-            * @throws BadPaddingException 
-            */
-    public String decrypt(String str)  throws  NoSuchPaddingException,
-            NoSuchAlgorithmException,
-            InvalidAlgorithmParameterException,
-            InvalidKeyException,
-            IllegalBlockSizeException,
-            BadPaddingException;
+public interface Cryptor {
 
-    
+        /**
+         * Encrypt the string, if unable to encrypt, return null
+         *
+         * @param str
+         * @return encrypted text
+         * @throws NoSuchPaddingException
+         * @throws NoSuchAlgorithmException
+         * @throws InvalidAlgorithmParameterException
+         * @throws InvalidKeyException
+         * @throws IllegalBlockSizeException
+         * @throws BadPaddingException
+         */
+        String encrypt(String str)
+                throws NoSuchPaddingException,
+                NoSuchAlgorithmException,
+                InvalidAlgorithmParameterException,
+                InvalidKeyException,
+                IllegalBlockSizeException,
+                BadPaddingException;
+
+        /**
+         * decrypts the string
+         *
+         * @param str
+         * @return, if the password can be decrypted, the decrypted value is
+         * returned, otherwise the original value is returned<br>
+         * In the event that decryption fails, the error message must be logged.
+         * @throws NoSuchPaddingException
+         * @throws NoSuchAlgorithmException
+         * @throws InvalidAlgorithmParameterException
+         * @throws InvalidKeyException
+         * @throws IllegalBlockSizeException
+         * @throws BadPaddingException
+         */
+        public String decrypt(String str) throws NoSuchPaddingException,
+                NoSuchAlgorithmException,
+                InvalidAlgorithmParameterException,
+                InvalidKeyException,
+                IllegalBlockSizeException,
+                BadPaddingException;
 
-  
-}
\ No newline at end of file
+}

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorFactory.java Sun Jan 19 22:07:59 2014
@@ -18,11 +18,9 @@ package org.apache.juddi.v3.client.crypt
 
 import java.util.HashMap;
 import java.util.Map;
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.v3.client.ClassUtil;
-import org.apache.juddi.v3.client.config.ClientConfig;
 import org.apache.juddi.v3.client.config.Property;
 
 /**
@@ -36,7 +34,7 @@ import org.apache.juddi.v3.client.config
  */
 public abstract class CryptorFactory {
 
-    private static Log log = LogFactory.getLog(CryptorFactory.class);
+    private static final Log log = LogFactory.getLog(CryptorFactory.class);
     // the shared Cryptor instance
     private static Cryptor cryptor = null;
     private static Map<String, Cryptor> cache = new HashMap<String, Cryptor>();
@@ -44,7 +42,7 @@ public abstract class CryptorFactory {
     /**
      * Returns a crypto provider with the matching classname, throws if not possible
      * @param className
-     * @return
+     * @return a Cryptor instance
      * @throws Exception 
      */
     public static Cryptor getCryptor(String className) throws Exception {

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorUtil.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorUtil.java?rev=1559590&r1=1559589&r2=1559590&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorUtil.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/cryptor/CryptorUtil.java Sun Jan 19 22:07:59 2014
@@ -17,9 +17,10 @@ package org.apache.juddi.v3.client.crypt
 
  
 /**
- *
+ * A static entry point for encrypting text via CLI
+ * @since 3.1.5
  * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
- * @see org.apache.juddi.cryptor.DefaultCryptor
+ * @see CryptorFactory
  */
 public class CryptorUtil {
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org