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/08 04:36:12 UTC

svn commit: r1556437 [2/3] - in /juddi/trunk: juddi-client.net/juddi-client.net-sample/org.apache.juddi.client.samples/ juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/ juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.ma...

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=1556437&r1=1556436&r2=1556437&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 Wed Jan  8 03:36:11 2014
@@ -75,6 +75,8 @@ import org.uddi.api_v3.KeyedReference;
 import org.uddi.api_v3.Name;
 import org.uddi.api_v3.OverviewDoc;
 import org.uddi.api_v3.OverviewURL;
+import org.uddi.api_v3.PublisherAssertion;
+import org.uddi.api_v3.PublisherAssertions;
 import org.uddi.api_v3.RelatedBusinessesList;
 import org.uddi.api_v3.Result;
 import org.uddi.api_v3.SaveBinding;
@@ -89,19 +91,20 @@ import org.uddi.api_v3.TModelList;
 import org.uddi.sub_v3.DeleteSubscription;
 import org.uddi.sub_v3.Subscription;
 import org.uddi.v3_service.DispositionReportFaultMessage;
+
 /**
- * The UDDIClerk provides an easy way to access a UDDI service. The clerk
- * can be configured programmatically, but it is recommended to specify the
- * server endpoint and access credentials in a uddi.xml file.
- * 
+ * The UDDIClerk provides an easy way to access a UDDI service. The clerk can be
+ * configured programmatically, but it is recommended to specify the server
+ * endpoint and access credentials in a uddi.xml file.
+ *
  * Recommended use:
  * <pre>
  * {@code
  * UDDIClient uddiClient = new UDDIClient();
  * UDDIClerk clerk = uddiClient.getClerk(clerkName);
  * }
- * </pre>
- * where the clerkName "MyClerk" is defined as attribute on the clerk element
+ * </pre> where the clerkName "MyClerk" is defined as attribute on the clerk
+ * element
  * <pre>
  * {@code
  *  <clerks registerOnStartup="true">
@@ -110,1228 +113,1634 @@ import org.uddi.v3_service.DispositionRe
  *    </clerk>
  *  </clerks>
  * }
- * </pre>
- * Credentials:
- * In the clerk section you need to specify the publisher to be used, as well the password.
- * The password can be encrypted and a cryptoProvider class can be set.
- * 
- * UDDI Annotations:
- * If you want to register classes containing UDDIAnnotations, then you need to set registerOnStartup="true"
- * and you can list the classes with the annotations as subelements. See the HelloWorldImpl class
- * above, as well as the uddi-annotations example.
- * 
+ * </pre> Credentials: In the clerk section you need to specify the publisher to
+ * be used, as well the password. The password can be encrypted and a
+ * cryptoProvider class can be set.
+ *
+ * UDDI Annotations: If you want to register classes containing UDDIAnnotations,
+ * then you need to set registerOnStartup="true" and you can list the classes
+ * with the annotations as subelements. See the HelloWorldImpl class above, as
+ * well as the uddi-annotations example.
+ *
  * @author kstam
  *
  */
 public class UDDIClerk implements Serializable {
 
-    private static final long serialVersionUID = -8597375975981358134L;
-    
-    private Log log = LogFactory.getLog(this.getClass());
-    protected String name;
-    protected UDDINode uddiNode;
-    protected String publisher;
-    protected String password;
-    private Date tokenBirthDate;
-    private String authToken;
-    private String cryptoProvider;
-    private boolean isencrypted=false;
-    private String[] classWithAnnotations;
-    private WSDL[] wsdls;
-    private String managerName;
-    private Map<String, Properties> services = new HashMap<String, Properties>();
-
-    public UDDIClerk() {
-        super();
-        // TODO Auto-generated constructor stub
-    }
-
-    public UDDIClerk(Clerk clerk) {
-        super();
-        this.name = clerk.getName();
-        this.password = clerk.getPassword();
-        this.publisher = clerk.getPublisher();
-        this.uddiNode = new UDDINode(clerk.getNode());
-    }
-
-    public String[] getClassWithAnnotations() {
-        return classWithAnnotations;
-    }
-    
-    public UDDINode getUDDINode()
-    {
-        return this.uddiNode;
-    }
-
-    public void setClassWithAnnotations(String[] classWithAnnotations) {
-        this.classWithAnnotations = classWithAnnotations;
-    }
-
-    public Map<String, Properties> getServices() {
-        return services;
-    }
-
-    public void setServices(Map<String, Properties> services) {
-        this.services = services;
-    }
-
-    public String getManagerName() {
-        return managerName;
-    }
-
-    public void setManagerName(String managerName) {
-        this.managerName = managerName;
-    }
-    
-    public void registerWsdls() {
-    	registerWsdls(null);
-    }
-
-    /**
-     * Registers the WSDL files referenced in the clerk onto the UDDI node referenced by the clerk.
-     * <pre>
-     * {@code
-     * <clerks registerOnStartup="false">
-     *     <clerk name="joe" node="default" publisher="joepublisher" password="joepublisher" isPasswordEncrypted="false" cryptoProvider="">
-     *        <wsdl businessName="WSDL-Business">wsdl/helloworld.wsdl</wsdl>
-     *     </clerk>
-     *  </clerks>
-     * }
-     * </pre>
-     * 
-     * @param localizerBaseUrl - The baseUrl part which will be used when building the bindingTemplate.
-     */
-    public void registerWsdls(URL localizerBaseUrl) {
-        if (this.getWsdls() != null) {
-            Properties properties = new Properties();
-            properties.putAll(this.getUDDINode().getProperties());
-
-            for (WSDL wsdl : this.getWsdls()) {
-                try {
-                    URL wsdlUrl = this.getClass().getClassLoader().getResource(wsdl.getFileName());
-                    ReadWSDL rw = new ReadWSDL();
-                    Definition wsdlDefinition = rw.readWSDL(wsdlUrl);
-                    if (wsdl.keyDomain != null) {
-                        properties.setProperty("keyDomain", wsdl.keyDomain);
-                    }
-                    if (wsdl.businessKey != null) {
-                        properties.setProperty("businessKey", wsdl.getBusinessKey());
-                    }
-                    
-                    WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizerDefaultImpl(localizerBaseUrl), properties);
-                    wsdl2UDDI.registerBusinessServices(wsdlDefinition);
+        private static final long serialVersionUID = -8597375975981358134L;
+
+        private Log log = LogFactory.getLog(this.getClass());
+        protected String name;
+        protected UDDINode uddiNode;
+        protected String publisher;
+        protected String password;
+        private Date tokenBirthDate;
+        private String authToken;
+        private String cryptoProvider;
+        private boolean isencrypted = false;
+        private String[] classWithAnnotations;
+        private WSDL[] wsdls;
+        private String managerName;
+        private Map<String, Properties> services = new HashMap<String, Properties>();
+
+        /**
+         * use caution calling the default constructor, many of the functions of
+         * the UDDI Clerk will not function unless manually set. The Node must
+         * be set for using most of the functions provided by this class.
+         */
+        public UDDIClerk() {
+                super();
+                // TODO Auto-generated constructor stub
+        }
+
+        public UDDIClerk(Clerk clerk) {
+                super();
+                this.name = clerk.getName();
+                this.password = clerk.getPassword();
+                this.publisher = clerk.getPublisher();
+                this.uddiNode = new UDDINode(clerk.getNode());
+        }
+
+        /**
+         * A list of classes defined in the config file that have UDDI
+         * Annotations on them for automated registration
+         * <br>client.clerks.clerk(" + i + ").class
+         *
+         * @return
+         * @see org.apache.juddi.v3.annotations.UDDIService
+         * @see org.apache.juddi.v3.annotations.UDDIServiceBinding
+         */
+        public String[] getClassWithAnnotations() {
+                return classWithAnnotations;
+        }
+
+        /**
+         * Returns the UDDI node that this clerk is associated with
+         * client.clerks.clerk(" + i + ")@node
+         *
+         * @return
+         */
+        public UDDINode getUDDINode() {
+                return this.uddiNode;
+        }
+
+        /**
+         * A list of classes defined in the config file that have UDDI
+         * Annotations on them for automated registration
+         * <br>client.clerks.clerk(" + i + ").class
+         *
+         * @see org.apache.juddi.v3.annotations.UDDIService
+         * @see org.apache.juddi.v3.annotations.UDDIServiceBinding
+         */
+        public void setClassWithAnnotations(String[] classWithAnnotations) {
+                this.classWithAnnotations = classWithAnnotations;
+        }
+
+        /**
+         * Is this used?
+         *
+         * @return
+         */
+        @Deprecated
+        public Map<String, Properties> getServices() {
+                return services;
+        }
+
+        /**
+         * Is this used?
+         */
+        @Deprecated
+        public void setServices(Map<String, Properties> services) {
+                this.services = services;
+        }
+
+        /**
+         * The client manager name as defined in the config file client[@name]
+         *
+         * @return
+         */
+        public String getManagerName() {
+                return managerName;
+        }
+
+        /**
+         * The client manager name as defined in the config file client[@name]
+         *
+         * @param managerName
+         */
+        public void setManagerName(String managerName) {
+                this.managerName = managerName;
+        }
+
+        /**
+         * Performans the process of parsing the configuration defined wsdls to
+         * UDDI. This is a convenience wrapper Note, if registration fails, no
+         * exception is thrown
+         */
+        public void registerWsdls() {
+                registerWsdls(null);
+        }
+
+        /**
+         * Registers the WSDL files referenced in the clerk onto the UDDI node
+         * referenced by the clerk. Note, if registration fails, no exception is
+         * thrown
+         * <pre>
+         * {@code
+         * <clerks registerOnStartup="false">
+         *     <clerk name="joe" node="default" publisher="joepublisher" password="joepublisher" isPasswordEncrypted="false" cryptoProvider="">
+         *        <wsdl businessName="WSDL-Business">wsdl/helloworld.wsdl</wsdl>
+         *     </clerk>
+         *  </clerks>
+         * }
+         * </pre>
+         *
+         * @param localizerBaseUrl - The baseUrl part which will be used when
+         * building the bindingTemplate.
+         */
+        public void registerWsdls(URL localizerBaseUrl) {
+                if (this.getWsdls() != null) {
+                        Properties properties = new Properties();
+                        properties.putAll(this.getUDDINode().getProperties());
+
+                        for (WSDL wsdl : this.getWsdls()) {
+                                try {
+                                        URL wsdlUrl = this.getClass().getClassLoader().getResource(wsdl.getFileName());
+                                        ReadWSDL rw = new ReadWSDL();
+                                        Definition wsdlDefinition = rw.readWSDL(wsdlUrl);
+                                        if (wsdl.keyDomain != null) {
+                                                properties.setProperty("keyDomain", wsdl.keyDomain);
+                                        }
+                                        if (wsdl.businessKey != null) {
+                                                properties.setProperty("businessKey", wsdl.getBusinessKey());
+                                        }
+
+                                        WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizerDefaultImpl(localizerBaseUrl), properties);
+                                        wsdl2UDDI.registerBusinessServices(wsdlDefinition);
+                                } catch (Exception e) {
+                                        log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + e.getMessage(), e);
+                                } catch (Throwable t) {
+                                        log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + t.getMessage(), t);
+                                }
+                        }
+                }
+        }
+
+        /**
+         * Registers a WSDL Definition onto the UDDI node referenced by the
+         * clerk. Note, if registration fails, no exception is thrown
+         *
+         * @param wsdlDefinition - the WSDL Definition
+         * @param keyDomain - the keyDomain which will be used to construct the
+         * UDDI key IDs. If left null the keyDomain defined in the node's
+         * properties will be used.
+         * @param businessKey - the key of the business to which this service
+         * belongs. If left null the businessKey defined in the node's
+         * properties will be used.
+         *
+         */
+        public void registerWsdls(Definition wsdlDefinition, String keyDomain, String businessKey) {
+
+                try {
+                        Properties properties = new Properties();
+                        properties.putAll(this.getUDDINode().getProperties());
+                        if (keyDomain != null) {
+                                properties.setProperty("keyDomain", keyDomain);
+                        }
+                        if (businessKey != null) {
+                                properties.setProperty("businessKey", businessKey);
+                        }
+
+                        WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizerDefaultImpl(), properties);
+                        wsdl2UDDI.registerBusinessServices(wsdlDefinition);
                 } catch (Exception e) {
-                    log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + e.getMessage(), e);
+                        log.error("Unable to register wsdl " + " ." + e.getMessage(), e);
                 } catch (Throwable t) {
-                    log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + t.getMessage(), t);
+                        log.error("Unable to register wsdl " + " ." + t.getMessage(), t);
+                }
+        }
+
+        /**
+         * Removes the UDDI data structures belonging to the WSDLs for this
+         * clerk from the UDDI node. Note, if registration fails, no exception
+         * is thrown
+         */
+        public void unRegisterWsdls() {
+                if (this.getWsdls() != null) {
+                        Properties properties = new Properties();
+                        properties.putAll(this.getUDDINode().getProperties());
+
+                        for (WSDL wsdl : this.getWsdls()) {
+                                try {
+                                        URL wsdlUrl = this.getClass().getClassLoader().getResource(wsdl.getFileName());
+                                        ReadWSDL rw = new ReadWSDL();
+                                        Definition wsdlDefinition = rw.readWSDL(wsdlUrl);
+                                        if (wsdl.keyDomain != null) {
+                                                properties.setProperty("keyDomain", wsdl.keyDomain);
+                                        }
+                                        if (wsdl.businessKey != null) {
+                                                properties.setProperty("businessKey", wsdl.getBusinessKey());
+                                        }
+
+                                        WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizerDefaultImpl(), properties);
+                                        wsdl2UDDI.unRegisterBusinessServices(wsdlDefinition);
+                                } catch (Exception e) {
+                                        log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + e.getMessage(), e);
+                                } catch (Throwable t) {
+                                        log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + t.getMessage(), t);
+                                }
+                        }
+                }
+        }
+
+        /**
+         * Registers the Subscription that is passed in to the UDDI node for
+         * this clerk.
+         *
+         * Note, if registration fails, no exception is thrown
+         *
+         * @param subscription
+         * @return
+         */
+        public Subscription register(Subscription subscription) {
+                return register(subscription, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Register a Subscription to UDDI node passed in. Make sure you use a
+         * clerk that has credentials for this node. Note, if registration
+         * fails, no exception is thrown
+         *
+         * @param subscription a UDDI subscription, remember only one filter
+         * type is allowed by UDDI
+         * @param node the UDDI node referenced from the config file
+         * @return the potentially UDDI server modified subscription
+         */
+        public Subscription register(Subscription subscription, Node node) {
+
+                log.info("Registering subscription with key " + subscription.getSubscriptionKey());
+                Holder<List<Subscription>> holder = new Holder<List<Subscription>>();
+                try {
+                        List<Subscription> subscriptions = new ArrayList<Subscription>();
+                        subscriptions.add(subscription);
+                        holder.value = subscriptions;
+                        getUDDINode().getTransport().getUDDISubscriptionService(node.getSubscriptionUrl()).
+                                saveSubscription(getAuthToken(node.getSecurityUrl()), holder);
+                        if (log.isDebugEnabled()) {
+                                log.debug("Registering subscription " + subscription.getSubscriptionKey() + " completed.");
+                        }
+                } catch (Exception e) {
+                        log.error("Unable to register subscription " + subscription.getSubscriptionKey()
+                                + " ." + e.getMessage(), e);
+                } catch (Throwable t) {
+                        log.error("Unable to register subscriptionl " + subscription.getSubscriptionKey()
+                                + " ." + t.getMessage(), t);
+                }
+                subscription = holder.value.get(0);
+                return subscription;
+        }
+
+        /**
+         * Register a tModel, using the node of current clerk ('this'). Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param tModel
+         * @return the TModelDetail of the newly registered TModel
+         */
+        public TModelDetail register(TModel tModel) {
+                return register(tModel, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Register a tModel. Note, if registration fails, no exception is
+         * thrown
+         * @param tModel
+         * @param node
+         * @return 
+         */
+        public TModelDetail register(TModel tModel, Node node) {
+                TModelDetail tModelDetail = null;
+                log.info("Registering tModel with key " + tModel.getTModelKey());
+                try {
+                        SaveTModel saveTModel = new SaveTModel();
+                        saveTModel.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        saveTModel.getTModel().add(tModel);
+                        tModelDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveTModel(saveTModel);
+                        if (log.isDebugEnabled()) {
+                                log.debug("Registering tModel " + tModel.getTModelKey() + " completed.");
+                        }
+                } catch (Exception e) {
+                        log.error("Unable to register tModel " + tModel.getTModelKey()
+                                + " ." + e.getMessage(), e);
+                } catch (Throwable t) {
+                        log.error("Unable to register tModel " + tModel.getTModelKey()
+                                + " ." + t.getMessage(), t);
+                }
+                return tModelDetail;
+        }
+
+        /**
+         * Register a BindingTemplate, using the node of current clerk ('this').
+         * Note, if registration fails, no exception is thrown
+         * @param binding
+         * @return 
+         */
+        public BindingTemplate register(BindingTemplate binding) {
+                return register(binding, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Register a BindingTemplate. Note, if registration fails, no exception
+         * is thrown
+         * @param binding
+         * @param node
+         * @return 
+         */
+        public BindingTemplate register(BindingTemplate binding, Node node) {
+
+                BindingTemplate bindingTemplate = null;
+                log.info("Registering bindingTemplate with key " + binding.getBindingKey());
+                try {
+                        SaveBinding saveBinding = new SaveBinding();
+                        saveBinding.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        saveBinding.getBindingTemplate().add(binding);
+                        BindingDetail bindingDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBinding(saveBinding);
+                        bindingTemplate = bindingDetail.getBindingTemplate().get(0);
+                        if (log.isDebugEnabled()) {
+                                log.debug("Registering template binding " + bindingTemplate.getBindingKey() + " completed.");
+                        }
+                } catch (Exception e) {
+                        log.error("Unable to register template binding " + binding.getBindingKey()
+                                + " ." + e.getMessage(), e);
+                } catch (Throwable t) {
+                        log.error("Unable to register template binding " + binding.getBindingKey()
+                                + " ." + t.getMessage(), t);
+                }
+                return bindingTemplate;
+        }
+
+        /**
+         * Register a service, using the node of current clerk ('this'). Note,
+         * if registration fails, no exception is thrown
+         *
+         * @param service
+         * @return
+         */
+        public BusinessService register(BusinessService service) {
+                return register(service, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Register a service.
+         *
+         * Note, if registration fails, no exception is thrown
+         *
+         * @param service the element returned by the server, it may be modified from the original
+         * @param node
+         * @return the potentially modified service by the UDDI server
+         */
+        public BusinessService register(BusinessService service, Node node) {
+
+                BusinessService businessService = null;
+                log.info("Registering service " + service.getName().get(0).getValue()
+                        + " with key " + service.getServiceKey());
+                try {
+                        SaveService saveService = new SaveService();
+                        saveService.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        saveService.getBusinessService().add(service);
+                        ServiceDetail serviceDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveService(saveService);
+                        businessService = serviceDetail.getBusinessService().get(0);
+                        if (log.isDebugEnabled()) {
+                                log.debug("Registering service " + service.getName().get(0).getValue() + " completed.");
+                        }
+                } catch (Exception e) {
+                        log.error("Unable to register service " + service.getName().get(0).getValue()
+                                + " ." + e.getMessage(), e);
+                } catch (Throwable t) {
+                        log.error("Unable to register service " + service.getName().get(0).getValue()
+                                + " ." + t.getMessage(), t);
+                }
+                return businessService;
+        }
+
+        /**
+         * registers a UDDI business. This is a convenience wrapper
+         *
+         * @param business
+         * @return a possibility modified business entity as registered
+         */
+        public BusinessEntity register(BusinessEntity business) {
+                return register(business, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Registers a UDDI Business referencing the specified Node from the
+         * config file
+         *
+         * @param business
+         * @param node
+         * @return a possibility modified business entity as registered
+         */
+        public BusinessEntity register(BusinessEntity business, Node node) {
+
+                if (business.getName().get(0) == null) {
+                        log.error("Unable to register business because no Name elements have been added.");
+                        return null;
+                }
+                BusinessEntity businessEntity = null;
+                log.info("Registering business " + business.getName().get(0).getValue()
+                        + " with key " + business.getBusinessKey());
+                try {
+                        SaveBusiness saveBusiness = new SaveBusiness();
+                        saveBusiness.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        saveBusiness.getBusinessEntity().add(business);
+                        BusinessDetail businessDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBusiness(saveBusiness);
+                        businessEntity = businessDetail.getBusinessEntity().get(0);
+                        if (log.isDebugEnabled()) {
+                                log.debug("Registering businessEntity " + businessEntity.getName().get(0).getValue() + " completed.");
+                        }
+                } catch (Exception e) {
+                        log.error("Unable to register business " + business.getName().get(0).getValue()
+                                + " ." + e.getMessage(), e);
+                } catch (Throwable t) {
+                        log.error("Unable to register business " + business.getName().get(0).getValue()
+                                + " ." + t.getMessage(), t);
+                }
+                return businessEntity;
+        }
+
+        /**
+         * removes a business from UDDI. This is a convenience wrapper Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param businessKey
+         */
+        public void unRegisterBusiness(String businessKey) {
+                unRegisterBusiness(businessKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Unregisters the service with specified serviceKey using the specified
+         * Node, as defined in the config file Note, if registration fails, no
+         * exception is thrown
+         *
+         * @param businessKey
+         * @param node
+         */
+        public void unRegisterBusiness(String businessKey, Node node) {
+                log.info("UnRegistering the business " + businessKey);
+                try {
+                        DeleteBusiness deleteBusiness = new DeleteBusiness();
+                        deleteBusiness.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        deleteBusiness.getBusinessKey().add(businessKey);
+                        getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteBusiness(deleteBusiness);
+                } catch (Exception e) {
+                        log.error("Unable to register service " + businessKey
+                                + " ." + e.getMessage(), e);
+                }
+        }
+
+        /**
+         * removes a service by key. This is a convenience wrapper Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param serviceKey
+         */
+        public void unRegisterService(String serviceKey) {
+                unRegisterService(serviceKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Unregisters the service with specified serviceKey. Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param serviceKey
+         * @param node
+         */
+        public void unRegisterService(String serviceKey, Node node) {
+                log.info("UnRegistering the service " + serviceKey);
+                try {
+                        DeleteService deleteService = new DeleteService();
+                        deleteService.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        deleteService.getServiceKey().add(serviceKey);
+                        getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteService(deleteService);
+                } catch (Exception e) {
+                        log.error("Unable to register service " + serviceKey
+                                + " ." + e.getMessage(), e);
+                }
+        }
+
+        /**
+         * removes a binding by key. This is a convenience wrapper Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param bindingKey
+         */
+        public void unRegisterBinding(String bindingKey) {
+                unRegisterBinding(bindingKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Unregisters the BindingTemplate with specified bindingKey and
+         * referenced node defined in the config file Note, if registration
+         * fails, no exception is thrown
+         *
+         * @param bindingKey
+         * @param node
+         */
+        public void unRegisterBinding(String bindingKey, Node node) {
+                log.info("UnRegistering binding key " + bindingKey);
+                try {
+                        DeleteBinding deleteBinding = new DeleteBinding();
+                        deleteBinding.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        deleteBinding.getBindingKey().add(bindingKey);
+                        getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteBinding(deleteBinding);
+                } catch (Exception e) {
+                        log.error("Unable to unregister bindingkey " + bindingKey
+                                + " ." + e.getMessage(), e);
+                }
+        }
+
+        /**
+         * removes a tModel. Note, UDDI just flags tModels as deleted, it will
+         * still be accessible but not returned in a search. This is a
+         * convenience wrapper Note, if registration fails, no exception is
+         * thrown
+         *
+         * @param tModelKey
+         */
+        public void unRegisterTModel(String tModelKey) {
+                unRegisterTModel(tModelKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Unregisters the BindingTemplate with specified bindingKey. Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param tModelKey
+         * @param node
+         */
+        public void unRegisterTModel(String tModelKey, Node node) {
+                log.info("UnRegistering tModel key " + tModelKey);
+                try {
+                        String authToken = getAuthToken(node.getSecurityUrl());
+                        DeleteTModel deleteTModel = new DeleteTModel();
+                        deleteTModel.setAuthInfo(authToken);
+                        deleteTModel.getTModelKey().add(tModelKey);
+                        getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteTModel(deleteTModel);
+                } catch (Exception e) {
+                        log.error("Unable to unregister tModelkey " + tModelKey
+                                + " ." + e.getMessage(), e);
+                }
+        }
+
+        /**
+         * removes a subscription by key. This is a convenience wrapper Note, if
+         * registration fails, no exception is thrown
+         *
+         * @param subscriptionKey
+         */
+        public void unRegisterSubscription(String subscriptionKey) {
+                unRegisterSubscription(subscriptionKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * removes a subscription by key, referencing the specified node in the
+         * config file Note, if registration fails, no exception is thrown
+         *
+         * @param subscriptionKey
+         * @param node
+         */
+        public void unRegisterSubscription(String subscriptionKey, Node node) {
+                log.info("UnRegistering subscription with key " + subscriptionKey);
+                try {
+                        String authToken = getAuthToken(node.getSecurityUrl());
+                        DeleteSubscription deleteSubscription = new DeleteSubscription();
+                        deleteSubscription.setAuthInfo(authToken);
+                        deleteSubscription.getSubscriptionKey().add(subscriptionKey);
+                        getUDDINode().getTransport().getUDDISubscriptionService(node.getSubscriptionUrl()).deleteSubscription(deleteSubscription);
+                } catch (Exception e) {
+                        log.error("Unable to unregister subscription key " + subscriptionKey
+                                + " ." + e.getMessage(), e);
+                }
+        }
+
+        /**
+         * finds a tmodel. This is a convenience wrapper
+         *
+         * @param findTModel
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws ConfigurationException
+         * @throws TransportException
+         */
+        public TModelList findTModel(FindTModel findTModel) throws RemoteException, ConfigurationException, TransportException {
+                return findTModel(findTModel, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * finds a tModel
+         *
+         * @param findTModel
+         * @param node
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public TModelList findTModel(FindTModel findTModel, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+
+                findTModel.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                try {
+                        TModelList tModelList = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).findTModel(findTModel);
+                        return tModelList;
+                } catch (DispositionReportFaultMessage dr) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
+                        checkForErrorInDispositionReport(report, null, null);
+                } catch (SOAPFaultException sfe) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
+                        checkForErrorInDispositionReport(report, null, null);
+                } catch (UndeclaredThrowableException ute) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
+                        checkForErrorInDispositionReport(report, null, null);
+                }
+                return null;
+        }
+
+        /**
+         * Gets the details of a tModel by the key. This is a convenience
+         * wrapper
+         *
+         * @param tModelKey
+         * @return null if not found or error, otherwise the details of the
+         * tModel(s)
+         * @throws RemoteException
+         * @throws ConfigurationException
+         * @throws TransportException
+         */
+        public TModelDetail getTModelDetail(String tModelKey) throws RemoteException, ConfigurationException, TransportException {
+                GetTModelDetail getTModelDetail = new GetTModelDetail();
+                getTModelDetail.getTModelKey().add(tModelKey);
+                return getTModelDetail(getTModelDetail);
+        }
+
+        /**
+         * Gets the details of a tModel by the key. This is a convenience
+         * wrapper
+         *
+         * @param getTModelDetail
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws ConfigurationException
+         * @throws TransportException
+         */
+        public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail) throws RemoteException, ConfigurationException, TransportException {
+                return getTModelDetail(getTModelDetail, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Gets the details of a tModel by the key using the referenced Node
+         * from the config file
+         *
+         * @param getTModelDetail
+         * @param node
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+
+                getTModelDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                try {
+                        TModelDetail tModelDetail = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getTModelDetail(getTModelDetail);
+                        return tModelDetail;
+                } catch (DispositionReportFaultMessage dr) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
+                        checkForErrorInDispositionReport(report, null, null);
+                } catch (SOAPFaultException sfe) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
+                        checkForErrorInDispositionReport(report, null, null);
+                } catch (UndeclaredThrowableException ute) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
+                        checkForErrorInDispositionReport(report, null, null);
                 }
-            }
+                return null;
         }
-    }
 
-    /**
-     * Registers a WSDL Definition onto the UDDI node referenced by the clerk.
-     * 
-     * @param wsdlDefinition - the WSDL Definition
-     * @param keyDomain - the keyDomain which will be used to construct the UDDI key IDs.
-     * If left null the keyDomain defined in the node's properties will be used.
-     * @param businessKey - the key of the business to which this service belongs. If left null
-     * the businessKey defined in the node's properties will be used.
-     */
-    public void registerWsdls(Definition wsdlDefinition, String keyDomain, String businessKey) {
-
-        try {
-            Properties properties = new Properties();
-            properties.putAll(this.getUDDINode().getProperties());
-            if (keyDomain != null) {
-                properties.setProperty("keyDomain", keyDomain);
-            }
-            if (businessKey != null) {
-                properties.setProperty("businessKey", businessKey);
-            }
-
-            WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizerDefaultImpl(), properties);
-            wsdl2UDDI.registerBusinessServices(wsdlDefinition);
-        } catch (Exception e) {
-            log.error("Unable to register wsdl " + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to register wsdl " + " ." + t.getMessage(), t);
-        }
-    }
-    /**
-     * Removes the UDDI data structures belonging to the WSDLs for this clerk from the UDDI node.
-     */
-    public void unRegisterWsdls() {
-        if (this.getWsdls() != null) {
-            Properties properties = new Properties();
-            properties.putAll(this.getUDDINode().getProperties());
-
-            for (WSDL wsdl : this.getWsdls()) {
-                try {
-                    URL wsdlUrl = this.getClass().getClassLoader().getResource(wsdl.getFileName());
-                    ReadWSDL rw = new ReadWSDL();
-                    Definition wsdlDefinition = rw.readWSDL(wsdlUrl);
-                    if (wsdl.keyDomain != null) {
-                        properties.setProperty("keyDomain", wsdl.keyDomain);
-                    }
-                    if (wsdl.businessKey != null) {
-                        properties.setProperty("businessKey", wsdl.getBusinessKey());
-                    }
+        /**
+         * Finds a service by the key, . This is a convenience wrapper
+         *
+         * @param serviceKey
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public BusinessService getServiceDetail(String serviceKey) throws RemoteException,
+                TransportException, ConfigurationException {
+                return getServiceDetail(serviceKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Finds a service by the key, . This is a convenience wrapper
+         *
+         * @param serviceKey
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         * @deprecated see
+         */
+        @Deprecated
+        public BusinessService findService(String serviceKey) throws RemoteException,
+                TransportException, ConfigurationException {
+                return getServiceDetail(serviceKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Finds a service by the key, referencing the specific Node from the
+         * configuration file
+         *
+         * @param serviceKey
+         * @param node
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         * @deprecated see getServiceDetail
+         */
+        @Deprecated
+        public BusinessService findService(String serviceKey, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+                return getServiceDetail(serviceKey, node);
+        }
+
+        /**
+         * Finds a service by the key, referencing the specific Node from the
+         * configuration file
+         *
+         * @param serviceKey
+         * @param node
+         * @return null if not found or error
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public BusinessService getServiceDetail(String serviceKey, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+                GetServiceDetail getServiceDetail = new GetServiceDetail();
+                getServiceDetail.getServiceKey().add(serviceKey);
+                getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                try {
+                        ServiceDetail sd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getServiceDetail);
+                        List<BusinessService> businessServiceList = sd.getBusinessService();
+                        if (businessServiceList.size() == 0) {
+                                throw new ConfigurationException("Could not find Service with key=" + serviceKey);
+                        }
+                        return businessServiceList.get(0);
+                } catch (DispositionReportFaultMessage dr) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
+                } catch (SOAPFaultException sfe) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
+                } catch (UndeclaredThrowableException ute) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
+                }
+                return null;
+        }
+
+        /**
+         *
+         * @param bindingKey
+         * @return
+         * @throws DispositionReportFaultMessage
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         * @deprecated see getServiceBindingDetail
+         */
+        @Deprecated
+        public BindingTemplate findServiceBinding(String bindingKey) throws DispositionReportFaultMessage, RemoteException,
+                TransportException, ConfigurationException {
+                return getServiceBindingDetail(bindingKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * gets a binding detail by key
+         *
+         * @param bindingKey
+         * @return null if not found or error, or the binding template
+         * @throws DispositionReportFaultMessage
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public BindingTemplate getServiceBindingDetail(String bindingKey) throws DispositionReportFaultMessage, RemoteException,
+                TransportException, ConfigurationException {
+                return getServiceBindingDetail(bindingKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * @deprecated use getServiceBindingDetail instead
+         * @param bindingKey
+         * @param node
+         * @return
+         * @throws DispositionReportFaultMessage
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         * @deprecated
+         */
+        @Deprecated
+        public BindingTemplate findServiceBinding(String bindingKey, Node node) throws DispositionReportFaultMessage, RemoteException,
+                TransportException, ConfigurationException {
+                return getServiceBindingDetail(bindingKey, node);
+
+        }
+
+        /**
+         * Gets the details of a specific service binding key
+         *
+         * @param bindingKey
+         * @param node
+         * @return null if not found, or error, or the details of the binding
+         * @throws DispositionReportFaultMessage
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public BindingTemplate getServiceBindingDetail(String bindingKey, Node node) throws DispositionReportFaultMessage, RemoteException,
+                TransportException, ConfigurationException {
+                GetBindingDetail getBindingDetail = new GetBindingDetail();
+                getBindingDetail.getBindingKey().add(bindingKey);
+                getBindingDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                try {
+                        BindingDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBindingDetail(getBindingDetail);
+                        List<BindingTemplate> bindingTemplateList = bd.getBindingTemplate();
+                        if (bindingTemplateList.size() == 0) {
+                                throw new ConfigurationException("Could not find ServiceBinding with key=" + bindingKey);
+                        }
+                        return bindingTemplateList.get(0);
+                } catch (DispositionReportFaultMessage dr) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
+                } catch (SOAPFaultException sfe) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
+                } catch (UndeclaredThrowableException ute) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
+                }
+                return null;
+        }
+
+        /**
+         * finds a business
+         *
+         * @deprecated Use getBusinessDetail instead
+         * @param businessKey
+         * @return BusinessEntity if found, or null if not found.
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        @Deprecated
+        public BusinessEntity findBusiness(String businessKey) throws RemoteException,
+                TransportException, ConfigurationException {
+                return getBusinessDetail(businessKey, this.getUDDINode().getApiNode());
+        }
+
+        /**
+         * Looks up the BusinessEntiry in the registry, will return null if is
+         * not found.
+         *
+         * @deprecated Use getBusinessDetail instead
+         * @param businessKey - the key we are looking for
+         * @param node - the node which is going to be queried
+         * @return BusinessEntity if found, or null if not found.
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        @Deprecated
+        public BusinessEntity findBusiness(String businessKey, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+                return getBusinessDetail(businessKey, node);
+        }
+
+        /**
+         * Looks up the BusinessEntiry in the registry, will return null if is
+         * not found.
+         *
+         * @param businessKey - the key we are looking for
+         * @param node - the node which is going to be queried
+         * @return BusinessEntity is found, or null if not found.
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public BusinessEntity getBusinessDetail(String businessKey, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+                GetBusinessDetail getBusinessDetail = new GetBusinessDetail();
+                getBusinessDetail.getBusinessKey().add(businessKey);
+                getBusinessDetail.setAuthInfo(node.getSecurityUrl());
+                try {
+                        BusinessDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBusinessDetail(getBusinessDetail);
+                        return bd.getBusinessEntity().get(0);
+                } catch (DispositionReportFaultMessage dr) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
+                } catch (SOAPFaultException sfe) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
+                } catch (UndeclaredThrowableException ute) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
+                }
+                return null;
+        }
+
+        /**
+         * Looks up the BusinessEntity in the registry for "related" businesses.
+         * This means that there is a business relationship defined. This is
+         * also referred to as a "Publisher Assertion",
+         *
+         * @see PublisherAssertion
+         * @see PublisherAssertions
+         * @param businessKey - the key we are looking for
+         * @param node - the node which is going to be queried
+         * @return BusinessEntity is found, or null if not found.
+         * @throws RemoteException
+         * @throws TransportException
+         * @throws ConfigurationException
+         */
+        public RelatedBusinessesList findRelatedBusinesses(String businessKey, Node node) throws RemoteException,
+                TransportException, ConfigurationException {
+                FindRelatedBusinesses findRelatedBusinesses = new FindRelatedBusinesses();
+                findRelatedBusinesses.setBusinessKey(businessKey);
+                findRelatedBusinesses.setAuthInfo(node.getSecurityUrl());
+                try {
+                        RelatedBusinessesList rbl = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).findRelatedBusinesses(findRelatedBusinesses);
+                        return rbl;
+                } catch (DispositionReportFaultMessage dr) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
+                } catch (SOAPFaultException sfe) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
+                } catch (UndeclaredThrowableException ute) {
+                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
+                        checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
+                }
+                return null;
+        }
+
+        private void checkForErrorInDispositionReport(DispositionReport report, String Error, String entityKey) {
 
-                    WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(this, new URLLocalizerDefaultImpl(), properties);
-                    wsdl2UDDI.unRegisterBusinessServices(wsdlDefinition);
+                if (entityKey != null && report != null && report.countainsErrorCode(DispositionReport.E_INVALID_KEY_PASSED)) {
+                        log.info("entityKey " + entityKey + " was not found in the registry");
+                } else {
+                        if (report == null) {
+                                log.info("Missing DispositionReport");
+                        } else {
+                                for (Result result : report.getResult()) {
+                                        log.error(result.getErrInfo().getErrCode() + " " + result.getErrInfo().getValue());
+                                }
+                        }
+                }
+        }
+
+        /**
+         * Gets an auth token from the uddi server using the uddi auth token
+         * <br>
+         * Notice: never log auth tokens! Treat it like a password
+         *
+         * notes: changed to public to have access from the subscription
+         * callback API 8/20/2013 AO
+         *
+         * @param endpointURL
+         * @return
+         * @throws TransportException
+         * @throws DispositionReportFaultMessage
+         * @throws RemoteException
+         */
+        public String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException {
+                //if the token is older then 10 minutes discard it, and create a new one.
+                if ((authToken != null && !"".equals(authToken)) && (tokenBirthDate != null && System.currentTimeMillis() > tokenBirthDate.getTime() + 600000)) {
+                        DiscardAuthToken discardAuthToken = new DiscardAuthToken();
+                        discardAuthToken.setAuthInfo(authToken);
+                        getUDDINode().getTransport().getUDDISecurityService(endpointURL).discardAuthToken(discardAuthToken);
+                        authToken = null;
+                }
+                if (authToken == null || "".equals(authToken)) {
+                        tokenBirthDate = new Date();
+                        GetAuthToken getAuthToken = new GetAuthToken();
+                        getAuthToken.setUserID(getPublisher());
+                        if (isencrypted) {
+                                if (cryptoProvider == null) {
+                                        log.fatal("Credentials are encrypted but no cryptoProvider was defined in the config file!");
+                                } else {
+                                        try {
+                                                getAuthToken.setCred(CryptorFactory.getCryptor(this.cryptoProvider).decrypt(getPassword()));
+                                        } catch (Exception ex) {
+                                                log.fatal("Unable to decrypt credentials! sending it as is", ex);
+                                                getAuthToken.setCred(getPassword());
+                                        }
+                                }
+                        } else {
+                                log.warn("Hey, I couldn't help but notice that your credentials aren't encrypted. Please consider doing so");
+                                getAuthToken.setCred(getPassword());
+                        }
+                        authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
+                }
+                return authToken;
+        }
+
+        /**
+         * This calls a jUDDI implementation specific API call and is used to
+         * help configure internode communication between jUDDI servers. This is
+         * NOT part of the UDDI specification.<br>
+         * Note: this API call should only be used with secure ports (SSL/TLS)
+         *
+         * @param node
+         * @return
+         */
+        public NodeDetail saveNode(Node node) {
+                NodeDetail nodeDetail = null;
+                try {
+                        log.info("Sending Node " + node.getName() + " info to jUDDI " + getUDDINode().getName());
+                        SaveNode saveNode = new SaveNode();
+                        saveNode.setAuthInfo(getAuthToken(node.getSecurityUrl()));
+                        saveNode.getNode().add(node);
+                        nodeDetail = getUDDINode().getTransport().getJUDDIApiService(node.getJuddiApiUrl()).saveNode(saveNode);
+                } catch (Exception e) {
+                        log.error("Unable to save node " + node.getName()
+                                + " ." + e.getMessage(), e);
+                } catch (Throwable t) {
+                        log.error("Unable to save node " + node.getName()
+                                + " ." + t.getMessage(), t);
+                }
+                return nodeDetail;
+        }
+
+        /**
+         * This calls a jUDDI implementation specific API call and is used to
+         * help configure internode communication between jUDDI servers. This is
+         * NOT part of the UDDI specification.<br>
+         * Note: this API call should only be used with secure ports (SSL/TLS)
+         *
+         * @param senderClerk
+         * @return
+         */
+        public ClerkDetail saveClerk(UDDIClerk senderClerk) {
+                ClerkDetail clerkDetail = null;
+                try {
+                        log.debug("Sending Clerk " + senderClerk.getName() + " info to jUDDI " + getUDDINode().getName());
+                        SaveClerk saveClerk = new SaveClerk();
+                        saveClerk.setAuthInfo(getAuthToken(senderClerk.getUDDINode().getSecurityUrl()));
+                        saveClerk.getClerk().add(getApiClerk());
+                        clerkDetail = getUDDINode().getTransport().getJUDDIApiService(senderClerk.getUDDINode().getJuddiApiUrl()).saveClerk(saveClerk);
                 } catch (Exception e) {
-                    log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + e.getMessage(), e);
+                        log.error("Unable to save clerk " + getName()
+                                + " ." + e.getMessage(), e);
                 } catch (Throwable t) {
-                    log.error("Unable to register wsdl " + wsdl.getFileName() + " ." + t.getMessage(), t);
+                        log.error("Unable to save clerk " + getName()
+                                + " ." + t.getMessage(), t);
                 }
-            }
+                return clerkDetail;
         }
-    }
 
-    /**
-     * Registers the Subscription that is passed in to the UDDI node for this clerk.
-     * @param subscription
-     * @return
-     */
-    public Subscription register(Subscription subscription) {
-        return register(subscription, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Register a Subscription to UDDI node passed in. Make sure you use a clerk that
-     * has credentials for this node.
-     */
-    public Subscription register(Subscription subscription, Node node) {
-
-        log.info("Registering subscription with key " + subscription.getSubscriptionKey());
-        Holder<List<Subscription>> holder = new Holder<List<Subscription>>();
-        try {
-            List<Subscription> subscriptions = new ArrayList<Subscription>();
-            subscriptions.add(subscription);
-            holder.value = subscriptions;
-            getUDDINode().getTransport().getUDDISubscriptionService(node.getSubscriptionUrl()).
-                    saveSubscription(getAuthToken(node.getSecurityUrl()), holder);
-            if (log.isDebugEnabled()) {
-                log.debug("Registering subscription " + subscription.getSubscriptionKey() + " completed.");
-            }
-        } catch (Exception e) {
-            log.error("Unable to register subscription " + subscription.getSubscriptionKey()
-                    + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to register subscriptionl " + subscription.getSubscriptionKey()
-                    + " ." + t.getMessage(), t);
-        }
-        subscription = holder.value.get(0);
-        return subscription;
-    }
-
-    /**
-     * Register a tModel, using the node of current clerk ('this').
-     *
-     * @param tModel
-     * @return the TModelDetail of the newly registered TModel
-     */
-    public TModelDetail register(TModel tModel) {
-        return register(tModel, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Register a tModel.
-     */
-    public TModelDetail register(TModel tModel, Node node) {
-        TModelDetail tModelDetail = null;
-        log.info("Registering tModel with key " + tModel.getTModelKey());
-        try {
-            SaveTModel saveTModel = new SaveTModel();
-            saveTModel.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            saveTModel.getTModel().add(tModel);
-            tModelDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveTModel(saveTModel);
-            if (log.isDebugEnabled()) {
-                log.debug("Registering tModel " + tModel.getTModelKey() + " completed.");
-            }
-        } catch (Exception e) {
-            log.error("Unable to register tModel " + tModel.getTModelKey()
-                    + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to register tModel " + tModel.getTModelKey()
-                    + " ." + t.getMessage(), t);
-        }
-        return tModelDetail;
-    }
-
-    /**
-     * Register a BindingTemplate, using the node of current clerk ('this').
-     *
-     */
-    public BindingTemplate register(BindingTemplate binding) {
-        return register(binding, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Register a BindingTemplate.
-     *
-     */
-    public BindingTemplate register(BindingTemplate binding, Node node) {
-
-        BindingTemplate bindingTemplate = null;
-        log.info("Registering bindingTemplate with key " + binding.getBindingKey());
-        try {
-            SaveBinding saveBinding = new SaveBinding();
-            saveBinding.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            saveBinding.getBindingTemplate().add(binding);
-            BindingDetail bindingDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBinding(saveBinding);
-            bindingTemplate = bindingDetail.getBindingTemplate().get(0);
-            if (log.isDebugEnabled()) {
-                log.debug("Registering template binding " + bindingTemplate.getBindingKey() + " completed.");
-            }
-        } catch (Exception e) {
-            log.error("Unable to register template binding " + binding.getBindingKey()
-                    + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to register template binding " + binding.getBindingKey()
-                    + " ." + t.getMessage(), t);
-        }
-        return bindingTemplate;
-    }
-
-    /**
-     * Register a service, using the node of current clerk ('this').
-     *
-     */
-    public BusinessService register(BusinessService service) {
-        return register(service, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Register a service.
-     *
-     */
-    public BusinessService register(BusinessService service, Node node) {
-
-        BusinessService businessService = null;
-        log.info("Registering service " + service.getName().get(0).getValue()
-                + " with key " + service.getServiceKey());
-        try {
-            SaveService saveService = new SaveService();
-            saveService.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            saveService.getBusinessService().add(service);
-            ServiceDetail serviceDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveService(saveService);
-            businessService = serviceDetail.getBusinessService().get(0);
-            if (log.isDebugEnabled()) {
-                log.debug("Registering service " + service.getName().get(0).getValue() + " completed.");
-            }
-        } catch (Exception e) {
-            log.error("Unable to register service " + service.getName().get(0).getValue()
-                    + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to register service " + service.getName().get(0).getValue()
-                    + " ." + t.getMessage(), t);
-        }
-        return businessService;
-    }
-
-    public BusinessEntity register(BusinessEntity business) {
-        return register(business, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Register a service. returns null if not successful
-     */
-    public BusinessEntity register(BusinessEntity business, Node node) {
-
-        if (business.getName().get(0)==null){
-            log.error("Unable to register business because no Name elements have been added.");
-            return null;
-        }
-        BusinessEntity businessEntity = null;
-        log.info("Registering business " + business.getName().get(0).getValue()
-                + " with key " + business.getBusinessKey());
-        try {
-            SaveBusiness saveBusiness = new SaveBusiness();
-            saveBusiness.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            saveBusiness.getBusinessEntity().add(business);
-            BusinessDetail businessDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBusiness(saveBusiness);
-            businessEntity = businessDetail.getBusinessEntity().get(0);
-            if (log.isDebugEnabled()) {
-                log.debug("Registering businessEntity " + businessEntity.getName().get(0).getValue() + " completed.");
-            }
-        } catch (Exception e) {
-            log.error("Unable to register business " + business.getName().get(0).getValue()
-                    + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to register business " + business.getName().get(0).getValue()
-                    + " ." + t.getMessage(), t);
-        }
-        return businessEntity;
-    }
-
-    public void unRegisterBusiness(String businessKey) {
-        unRegisterBusiness(businessKey, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Unregisters the service with specified serviceKey.
-     *
-     * @param service
-     */
-    public void unRegisterBusiness(String businessKey, Node node) {
-        log.info("UnRegistering the business " + businessKey);
-        try {
-            DeleteBusiness deleteBusiness = new DeleteBusiness();
-            deleteBusiness.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            deleteBusiness.getBusinessKey().add(businessKey);
-            getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteBusiness(deleteBusiness);
-        } catch (Exception e) {
-            log.error("Unable to register service " + businessKey
-                    + " ." + e.getMessage(), e);
-        }
-    }
-
-    public void unRegisterService(String serviceKey) {
-        unRegisterService(serviceKey, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Unregisters the service with specified serviceKey.
-     *
-     * @param service
-     */
-    public void unRegisterService(String serviceKey, Node node) {
-        log.info("UnRegistering the service " + serviceKey);
-        try {
-            DeleteService deleteService = new DeleteService();
-            deleteService.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            deleteService.getServiceKey().add(serviceKey);
-            getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteService(deleteService);
-        } catch (Exception e) {
-            log.error("Unable to register service " + serviceKey
-                    + " ." + e.getMessage(), e);
-        }
-    }
-
-    public void unRegisterBinding(String bindingKey) {
-        unRegisterBinding(bindingKey, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Unregisters the BindingTemplate with specified bindingKey.
-     *
-     * @param bindingTemplate
-     * @param node
-     */
-    public void unRegisterBinding(String bindingKey, Node node) {
-        log.info("UnRegistering binding key " + bindingKey);
-        try {
-            DeleteBinding deleteBinding = new DeleteBinding();
-            deleteBinding.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            deleteBinding.getBindingKey().add(bindingKey);
-            getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteBinding(deleteBinding);
-        } catch (Exception e) {
-            log.error("Unable to unregister bindingkey " + bindingKey
-                    + " ." + e.getMessage(), e);
-        }
-    }
-
-    public void unRegisterTModel(String tModelKey) {
-        unRegisterTModel(tModelKey, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Unregisters the BindingTemplate with specified bindingKey.
-     *
-     * @param bindingTemplate
-     * @param node
-     */
-    public void unRegisterTModel(String tModelKey, Node node) {
-        log.info("UnRegistering tModel key " + tModelKey);
-        try {
-            String authToken = getAuthToken(node.getSecurityUrl());
-            DeleteTModel deleteTModel = new DeleteTModel();
-            deleteTModel.setAuthInfo(authToken);
-            deleteTModel.getTModelKey().add(tModelKey);
-            getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).deleteTModel(deleteTModel);
-        } catch (Exception e) {
-            log.error("Unable to unregister tModelkey " + tModelKey
-                    + " ." + e.getMessage(), e);
-        }
-    }
-
-    public void unRegisterSubscription(String subscriptionKey) {
-        unRegisterSubscription(subscriptionKey, this.getUDDINode().getApiNode());
-    }
-
-    public void unRegisterSubscription(String subscriptionKey, Node node) {
-        log.info("UnRegistering subscription with key " + subscriptionKey);
-        try {
-            String authToken = getAuthToken(node.getSecurityUrl());
-            DeleteSubscription deleteSubscription = new DeleteSubscription();
-            deleteSubscription.setAuthInfo(authToken);
-            deleteSubscription.getSubscriptionKey().add(subscriptionKey);
-            getUDDINode().getTransport().getUDDISubscriptionService(node.getSubscriptionUrl()).deleteSubscription(deleteSubscription);
-        } catch (Exception e) {
-            log.error("Unable to unregister subscription key " + subscriptionKey
-                    + " ." + e.getMessage(), e);
-        }
-    }
-
-    public TModelList findTModel(FindTModel findTModel) throws RemoteException, ConfigurationException, TransportException {
-        return findTModel(findTModel, this.getUDDINode().getApiNode());
-    }
-
-    public TModelList findTModel(FindTModel findTModel, Node node) throws RemoteException,
-            TransportException, ConfigurationException {
-
-        findTModel.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-        try {
-            TModelList tModelList = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).findTModel(findTModel);
-            return tModelList;
-        } catch (DispositionReportFaultMessage dr) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
-            checkForErrorInDispositionReport(report, null, null);
-        } catch (SOAPFaultException sfe) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
-            checkForErrorInDispositionReport(report, null, null);
-        } catch (UndeclaredThrowableException ute) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
-            checkForErrorInDispositionReport(report, null, null);
-        }
-        return null;
-    }
-
-    public TModelDetail getTModelDetail(String tModelKey) throws RemoteException, ConfigurationException, TransportException {
-        GetTModelDetail getTModelDetail = new GetTModelDetail();
-        getTModelDetail.getTModelKey().add(tModelKey);
-        return getTModelDetail(getTModelDetail);
-    }
-
-    public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail) throws RemoteException, ConfigurationException, TransportException {
-        return getTModelDetail(getTModelDetail, this.getUDDINode().getApiNode());
-    }
-
-    public TModelDetail getTModelDetail(GetTModelDetail getTModelDetail, Node node) throws RemoteException,
-            TransportException, ConfigurationException {
-
-        getTModelDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-        try {
-            TModelDetail tModelDetail = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getTModelDetail(getTModelDetail);
-            return tModelDetail;
-        } catch (DispositionReportFaultMessage dr) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
-            checkForErrorInDispositionReport(report, null, null);
-        } catch (SOAPFaultException sfe) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
-            checkForErrorInDispositionReport(report, null, null);
-        } catch (UndeclaredThrowableException ute) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
-            checkForErrorInDispositionReport(report, null, null);
-        }
-        return null;
-    }
-
-    public BusinessService findService(String serviceKey) throws RemoteException,
-            TransportException, ConfigurationException {
-        return findService(serviceKey, this.getUDDINode().getApiNode());
-    }
-
-    public BusinessService findService(String serviceKey, Node node) throws RemoteException,
-            TransportException, ConfigurationException {
-        GetServiceDetail getServiceDetail = new GetServiceDetail();
-        getServiceDetail.getServiceKey().add(serviceKey);
-        getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-        try {
-            ServiceDetail sd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getServiceDetail);
-            List<BusinessService> businessServiceList = sd.getBusinessService();
-            if (businessServiceList.size() == 0) {
-                throw new ConfigurationException("Could not find Service with key=" + serviceKey);
-            }
-            return businessServiceList.get(0);
-        } catch (DispositionReportFaultMessage dr) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
-        } catch (SOAPFaultException sfe) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
-        } catch (UndeclaredThrowableException ute) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
-        }
-        return null;
-    }
-
-    public BindingTemplate findServiceBinding(String bindingKey) throws DispositionReportFaultMessage, RemoteException,
-            TransportException, ConfigurationException {
-        return findServiceBinding(bindingKey, this.getUDDINode().getApiNode());
-    }
-
-    public BindingTemplate findServiceBinding(String bindingKey, Node node) throws DispositionReportFaultMessage, RemoteException,
-            TransportException, ConfigurationException {
-        GetBindingDetail getBindingDetail = new GetBindingDetail();
-        getBindingDetail.getBindingKey().add(bindingKey);
-        getBindingDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-        try {
-            BindingDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBindingDetail(getBindingDetail);
-            List<BindingTemplate> bindingTemplateList = bd.getBindingTemplate();
-            if (bindingTemplateList.size() == 0) {
-                throw new ConfigurationException("Could not find ServiceBinding with key=" + bindingKey);
-            }
-            return bindingTemplateList.get(0);
-        } catch (DispositionReportFaultMessage dr) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
-        } catch (SOAPFaultException sfe) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
-        } catch (UndeclaredThrowableException ute) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
-        }
-        return null;
-    }
-
-    public BusinessEntity findBusiness(String businessKey) throws RemoteException,
-            TransportException, ConfigurationException {
-        return findBusiness(businessKey, this.getUDDINode().getApiNode());
-    }
-
-    /**
-     * Looks up the BusinessEntiry in the registry, will return null if is not
-     * found.
-     *
-     * @param businessKey - the key we are looking for
-     * @param node - the node which is going to be queried
-     * @return BusinessEntity is found, or null if not found.
-     * @throws RemoteException
-     * @throws TransportException
-     * @throws ConfigurationException
-     */
-    public BusinessEntity findBusiness(String businessKey, Node node) throws RemoteException,
-            TransportException, ConfigurationException {
-        GetBusinessDetail getBusinessDetail = new GetBusinessDetail();
-        getBusinessDetail.getBusinessKey().add(businessKey);
-        getBusinessDetail.setAuthInfo(node.getSecurityUrl());
-        try {
-            BusinessDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBusinessDetail(getBusinessDetail);
-            return bd.getBusinessEntity().get(0);
-        } catch (DispositionReportFaultMessage dr) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
-        } catch (SOAPFaultException sfe) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
-        } catch (UndeclaredThrowableException ute) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
-        }
-        return null;
-    }
-
-    /**
-     * Looks up the BusinessEntiry in the registry, will return null if is not
-     * found.
-     *
-     * @param businessKey - the key we are looking for
-     * @param node - the node which is going to be queried
-     * @return BusinessEntity is found, or null if not found.
-     * @throws RemoteException
-     * @throws TransportException
-     * @throws ConfigurationException
-     */
-    public RelatedBusinessesList findRelatedBusinesses(String businessKey, Node node) throws RemoteException,
-            TransportException, ConfigurationException {
-        FindRelatedBusinesses findRelatedBusinesses = new FindRelatedBusinesses();
-        findRelatedBusinesses.setBusinessKey(businessKey);
-        findRelatedBusinesses.setAuthInfo(node.getSecurityUrl());
-        try {
-            RelatedBusinessesList rbl = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).findRelatedBusinesses(findRelatedBusinesses);
-            return rbl;
-        } catch (DispositionReportFaultMessage dr) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
-        } catch (SOAPFaultException sfe) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
-        } catch (UndeclaredThrowableException ute) {
-            DispositionReport report = DispositionReportFaultMessage.getDispositionReport(ute);
-            checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
-        }
-        return null;
-    }
-
-    private void checkForErrorInDispositionReport(DispositionReport report, String Error, String entityKey) {
-
-        if (entityKey != null && report != null && report.countainsErrorCode(DispositionReport.E_INVALID_KEY_PASSED)) {
-            log.info("entityKey " + entityKey + " was not found in the registry");
-        } else {
-            if (report == null) {
-                log.info("Missing DispositionReport");
-            } else {
-                for (Result result : report.getResult()) {
-                    log.error(result.getErrInfo().getErrCode() + " " + result.getErrInfo().getValue());
-                }
-            }
-        }
-    }
-
-    /**
-     * Gets an auth token from the uddi server using the uddi auth token
-     * <br>
-     * Notice: never log auth tokens! Treat it like a password
-     * 
-     * notes: changed to public to have access from the subscription callback API 8/20/2013 AO
-     * @param endpointURL
-     * @return
-     * @throws TransportException
-     * @throws DispositionReportFaultMessage
-     * @throws RemoteException 
-     */
-    public String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException {
-        //if the token is older then 10 minutes discard it, and create a new one.
-        if ((authToken != null && !"".equals(authToken)) && (tokenBirthDate != null && System.currentTimeMillis() > tokenBirthDate.getTime() + 600000)) {
-            DiscardAuthToken discardAuthToken = new DiscardAuthToken();
-            discardAuthToken.setAuthInfo(authToken);
-            getUDDINode().getTransport().getUDDISecurityService(endpointURL).discardAuthToken(discardAuthToken);
-            authToken = null;
-        }
-        if (authToken == null || "".equals(authToken)) {
-            tokenBirthDate = new Date();
-            GetAuthToken getAuthToken = new GetAuthToken();
-            getAuthToken.setUserID(getPublisher());
-            if (isencrypted )
-            {
-                if (cryptoProvider==null)
-                    log.fatal("Credentials are encrypted but no cryptoProvider was defined in the config file!");
-                else
-                {
-                    try {
-                        getAuthToken.setCred(CryptorFactory.getCryptor(this.cryptoProvider).decrypt(getPassword()));
-                    } catch (Exception ex) {
-                        log.fatal("Unable to decrypt credentials! sending it as is", ex);
-                        getAuthToken.setCred(getPassword());
-                    }
-                }
-            }
-            else
-            {
-                log.warn("Hey, I couldn't help but notice that your credentials aren't encrypted. Please consider doing so");
-                getAuthToken.setCred(getPassword());
-            }
-            authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
-        }
-        return authToken;
-    }
-
-    /**
-     * This calls a jUDDI implementation specific API call and is used to help
-     * configure internode communication between jUDDI servers. This is NOT
-     * part of the UDDI specification.<br>
-     * Note: this API call should only be used with secure ports (SSL/TLS)
-     * @param node
-     * @return 
-     */
-    public NodeDetail saveNode(Node node) {
-        NodeDetail nodeDetail = null;
-        try {
-            log.info("Sending Node " + node.getName() + " info to jUDDI " + getUDDINode().getName());
-            SaveNode saveNode = new SaveNode();
-            saveNode.setAuthInfo(getAuthToken(node.getSecurityUrl()));
-            saveNode.getNode().add(node);
-            nodeDetail = getUDDINode().getTransport().getJUDDIApiService(node.getJuddiApiUrl()).saveNode(saveNode);
-        } catch (Exception e) {
-            log.error("Unable to save node " + node.getName()
-                    + " ." + e.getMessage(), e);
-        } catch (Throwable t) {
-            log.error("Unable to save node " + node.getName()
-                    + " ." + t.getMessage(), t);
-        }
-        return nodeDetail;
-    }
-
-    /**
-     * This calls a jUDDI implementation specific API call and is used to help
-     * configure internode communication between jUDDI servers. This is NOT
-     * part of the UDDI specification.<br>
-     * Note: this API call should only be used with secure ports (SSL/TLS)
-     * @param senderClerk
-     * @return 
-     */
-    public ClerkDetail saveClerk(UDDIClerk senderClerk) {

[... 1000 lines stripped ...]


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