juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1484038 [1/3] - in /juddi/trunk: ./ juddi-client/ juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-client/src/main/java/org/apache/juddi/v3/client/transport/ juddi-client/src/main/java/org/apache/juddi/v3/client/transpor...
Date Sat, 18 May 2013 01:11:29 GMT
Author: alexoree
Date: Sat May 18 01:11:28 2013
New Revision: 1484038

URL: http://svn.apache.org/r1484038
Log:
merging the 3.2 branch into the trunk
JUDDI-595 adding binding template validation for subscription callbacks. this will break the build, but it appears as if the problem is dependency related in the tck-base mod

Added:
    juddi/trunk/Doxyfile
      - copied unchanged from r1483596, juddi/branches/juddi-3.2.x/Doxyfile
    juddi/trunk/juddi-examples/subscription-notification-handler/
      - copied from r1483596, juddi/branches/juddi-3.2.x/juddi-examples/subscription-notification-handler/
    juddi/trunk/juddi-examples/uddi-createbulk/
      - copied from r1483596, juddi/branches/juddi-3.2.x/juddi-examples/uddi-createbulk/
    juddi/trunk/juddi-gui/   (props changed)
      - copied from r1483596, juddi/branches/juddi-3.2.x/juddi-gui/
    juddi/trunk/juddi-gui-dsig/   (props changed)
      - copied from r1483596, juddi/branches/juddi-3.2.x/juddi-gui-dsig/
    juddi/trunk/juddi-tomcat/keystore.jks
      - copied unchanged from r1483596, juddi/branches/juddi-3.2.x/juddi-tomcat/keystore.jks
    juddi/trunk/juddiv3-war/src/main/webapp/mbeans.jsp
      - copied unchanged from r1483596, juddi/branches/juddi-3.2.x/juddiv3-war/src/main/webapp/mbeans.jsp
Modified:
    juddi/trunk/   (props changed)
    juddi/trunk/LICENSE   (contents, props changed)
    juddi/trunk/NOTICE
    juddi/trunk/juddi-client/   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Constants.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.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/UDDIClerkServlet.java   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/InVMTransport.java   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSTransport.java   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/RMITransport.java   (props changed)
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/   (props changed)
    juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java
    juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.properties
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/   (props changed)
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java   (props changed)
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/PublicationHelper.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDICustodyTransferImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIPublicationImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIServiceCounter.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetCachingImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIValueSetValidationImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java
    juddi/trunk/juddi-core/src/main/resources/juddi_install_data/   (props changed)
    juddi/trunk/juddi-core/src/main/resources/juddi_install_data/UDDI_tModels.xml
    juddi/trunk/juddi-core/src/main/resources/messages.properties   (contents, props changed)
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java
    juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties
    juddi/trunk/juddi-gui-dsig/nbproject/   (props changed)
    juddi/trunk/juddi-gui/nbproject/   (props changed)
    juddi/trunk/juddi-gui/nbproject/build-impl.xml
    juddi/trunk/juddi-gui/nbproject/genfiles.properties
    juddi/trunk/juddi-gui/nbproject/project.properties
    juddi/trunk/juddi-gui/nbproject/project.xml
    juddi/trunk/juddi-tomcat/build.xml
    juddi/trunk/juddi-tomcat/server.xml
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckBusiness.java   (props changed)
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckBusinessService.java   (props changed)
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckFindEntity.java   (props changed)
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java   (props changed)
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java   (contents, props changed)
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscriptionListener.java   (props changed)
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java   (props changed)
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/   (props changed)
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription2.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription3.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription4.xml
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/bpel/BPEL_020_IntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/JUDDI_010_PublisherIntegrationTest.java   (props changed)
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadTest.java   (props changed)
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java   (props changed)
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
    juddi/trunk/uddi-ws/src/main/java/org/apache/juddi/api_v3/Node.java   (props changed)
    juddi/trunk/uddi-ws/src/main/java/org/apache/juddi/jaxb/JAXBMarshaller.java   (contents, props changed)
    juddi/trunk/uddi-ws/src/main/java/org/apache/juddi/v3_service/JUDDIApiPortType.java
    juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v3/Name.java

Propchange: juddi/trunk/
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x:r1460934-1483596

Modified: juddi/trunk/LICENSE
URL: http://svn.apache.org/viewvc/juddi/trunk/LICENSE?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/LICENSE (original)
+++ juddi/trunk/LICENSE Sat May 18 01:11:28 2013
@@ -246,3 +246,9 @@ Rhino (http://www.mozilla.org/rhino/) rh
 WSDL4J (http://sf.net/projects/wsdl4j) wsdl4j:wsdl4j:jar:1.6.2
     License: CPL  (http://www.opensource.org/licenses/cpl1.0.txt)
 
+
+	
+In addition, the jUDDI GUI project includes a number of components and libraries with separate 
+copyright notices and license terms. Your use of those components are 
+subject to the terms and conditions of the following licenses. 
+See juddi-gui\license for details.
\ No newline at end of file

Propchange: juddi/trunk/LICENSE
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/LICENSE:r1460934-1483596

Modified: juddi/trunk/NOTICE
URL: http://svn.apache.org/viewvc/juddi/trunk/NOTICE?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/NOTICE (original)
+++ juddi/trunk/NOTICE Sat May 18 01:11:28 2013
@@ -30,4 +30,7 @@ This product includes schemas and specif
 		followed, or as required to translate it into languages other than
 		English.
 
-
+This product includes files and components protected under the Open Font License.
+These fonts can only be distributed as part of a piece of software, but not individually. See the license for details.
+http://scripts.sil.org/OFL.  More information on included components for the jUDDI GUI are located
+within the source tree at juddi-gui/license

Propchange: juddi/trunk/juddi-client/
            ('svn:mergeinfo' removed)

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config:r1460934-1483596

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Constants.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Constants.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Constants.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Constants.java Sat May 18 01:11:28 2013
@@ -17,10 +17,13 @@
 
 package org.apache.juddi.v3.client.config;
 
+import org.apache.juddi.v3.client.UDDIConstants;
+
 /**
  * Contains all the juddi client constants
  * 
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @see UDDIConstants
  */
 public class Constants {
 	

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java Sat May 18 01:11:28 2013
@@ -15,14 +15,10 @@
  *
  */
 package org.apache.juddi.v3.client.config;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-
+/**
+ * Contains a properties that are used in the juddi client config (uddi.xml)
+ * 
+ */
 public class Property 
 {
 	public final static String UDDI_RELOAD_DELAY  ="reloadDelay";

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=1484038&r1=1484037&r2=1484038&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 Sat May 18 01:11:28 2013
@@ -18,7 +18,6 @@ package org.apache.juddi.v3.client.confi
 
 import java.io.Serializable;
 import java.lang.reflect.UndeclaredThrowableException;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.rmi.RemoteException;
 import java.util.ArrayList;
@@ -29,7 +28,6 @@ import java.util.Map;
 import java.util.Properties;
 
 import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
 import javax.xml.ws.Holder;
 import javax.xml.ws.soap.SOAPFaultException;
 
@@ -42,6 +40,7 @@ import org.apache.juddi.api_v3.Node;
 import org.apache.juddi.api_v3.NodeDetail;
 import org.apache.juddi.api_v3.SaveClerk;
 import org.apache.juddi.api_v3.SaveNode;
+import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.client.mapping.ReadWSDL;
 import org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl;
 import org.apache.juddi.v3.client.mapping.WSDL2UDDI;
@@ -51,6 +50,7 @@ import org.uddi.api_v3.BindingTemplate;
 import org.uddi.api_v3.BusinessDetail;
 import org.uddi.api_v3.BusinessEntity;
 import org.uddi.api_v3.BusinessService;
+import org.uddi.api_v3.CategoryBag;
 import org.uddi.api_v3.DeleteBinding;
 import org.uddi.api_v3.DeleteBusiness;
 import org.uddi.api_v3.DeleteService;
@@ -64,6 +64,10 @@ import org.uddi.api_v3.GetBindingDetail;
 import org.uddi.api_v3.GetBusinessDetail;
 import org.uddi.api_v3.GetServiceDetail;
 import org.uddi.api_v3.GetTModelDetail;
+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.RelatedBusinessesList;
 import org.uddi.api_v3.Result;
 import org.uddi.api_v3.SaveBinding;
@@ -80,686 +84,801 @@ import org.uddi.v3_service.DispositionRe
 
 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[] 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 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() {
-		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.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);
-				}
-			}
-		}
-	}
-	
-	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);
-				}
-			}
-		}
-	}
-	
-	public Subscription register(Subscription subscription) {
-		return register(subscription, this.getUDDINode().getApiNode());
-	}
-	/**
-	 * Register a 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 {
-			String authToken = getAuthToken(node.getSecurityUrl());
-			
-			List<Subscription> subscriptions = new ArrayList<Subscription>();
-			subscriptions.add(subscription);
-			holder.value = subscriptions;
-			getUDDINode().getTransport().getUDDISubscriptionService(node.getSubscriptionUrl()).saveSubscription(authToken, 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 {
-			String authToken = getAuthToken(node.getSecurityUrl());
-			SaveTModel saveTModel = new SaveTModel();
-			saveTModel.setAuthInfo(authToken);
-			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 {
-			String authToken = getAuthToken(node.getSecurityUrl());
-			SaveBinding saveBinding = new SaveBinding();
-			saveBinding.setAuthInfo(authToken);
-			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 " + binding.getBindingKey() + " completed.");
-		} catch (Exception e) {
-			log.error("Unable to register template binding " + bindingTemplate.getBindingKey()
-					+ " ." + e.getMessage(),e);
-		} catch (Throwable t) {
-			log.error("Unable to register template binding " + bindingTemplate.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 {
-			String authToken = getAuthToken(node.getSecurityUrl());
-			SaveService saveService = new SaveService();
-			saveService.setAuthInfo(authToken);
-			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) {
-		
-		BusinessEntity businessEntity=null;
-		log.info("Registering business " + business.getName().get(0).getValue()
-				+ " with key " + business.getBusinessKey());
-		try {
-			String authToken = getAuthToken(node.getSecurityUrl());
-			SaveBusiness saveBusiness = new SaveBusiness();
-			saveBusiness.setAuthInfo(authToken);
-			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 {
-			String authToken = getAuthToken(node.getSecurityUrl()); 
-			DeleteBusiness deleteBusiness = new DeleteBusiness();
-			deleteBusiness.setAuthInfo(authToken);
-			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 {
-			String authToken = getAuthToken(node.getSecurityUrl()); 
-			DeleteService deleteService = new DeleteService();
-			deleteService.setAuthInfo(authToken);
-			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 {
-			String authToken = getAuthToken(node.getSecurityUrl());
-			DeleteBinding deleteBinding = new DeleteBinding();
-			deleteBinding.setAuthInfo(authToken);
-			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());
-				}
-			}
-		}
-	}
-	
-	private 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());
-			getAuthToken.setCred(getPassword());
-			authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
-		}
-		return authToken;
-	}
-	
-	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;
-	}
-	
-	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 save clerk " + getName()
-					+ " ." + e.getMessage(),e);
-		} catch (Throwable t) {
-			log.error("Unable to save clerk " + getName()
-					+ " ." + t.getMessage(),t);
-		}
-		return clerkDetail;
-	}
-	
-	public Clerk getApiClerk() {
-		Clerk apiClerk = new Clerk();
-		apiClerk.setName(name);
-		apiClerk.setNode(uddiNode.getApiNode());
-		apiClerk.setPassword(password);
-		apiClerk.setPublisher(publisher);
-		return apiClerk;
-	}
-	
-	public UDDINode getUDDINode() {
-		return uddiNode;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public void setUDDINode(UDDINode uddiNode) {
-		this.uddiNode = uddiNode;
-	}
-
-	public String getPublisher() {
-		return publisher;
-	}
-
-	public void setPublisher(String publisher) {
-		this.publisher = publisher;
-	}
-
-	public String getPassword() {
-		return password;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	public WSDL[] getWsdls() {
-		return wsdls;
-	}
-
-	public void setWsdls(WSDL[] wsdls) {
-		this.wsdls = wsdls;
-	}
-
-	public class WSDL {
-		
-		private String businessKey;
-		private String keyDomain;
-		private String fileName;
-		public String getBusinessKey() {
-			return businessKey;
-		}
-		public void setBusinessKey(String businessKey) {
-			this.businessKey = businessKey;
-		}
-		public String getFileName() {
-			return fileName;
-		}
-		public void setFileName(String fileName) {
-			this.fileName = fileName;
-		}
-		public String getKeyDomain() {
-			return keyDomain;
-		}
-		public void setKeyDomain(String keyDomain) {
-			this.keyDomain = keyDomain;
-		}
-	}
-
+    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[] 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 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() {
+        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.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);
+                }
+            }
+        }
+    }
+
+    public void registerWsdls(Definition wsdlDefinition, String keyDomain, String businessKey) {
+
+        try {
+            Properties properties = new Properties();
+            properties.putAll(this.getUDDINode().getProperties());
+            //Definition wsdlDefinition = rw.readWSDL(wsdlUrl);
+            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);
+        }
+    }
+
+    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);
+                }
+            }
+        }
+    }
+
+    public Subscription register(Subscription subscription) {
+        return register(subscription, this.getUDDINode().getApiNode());
+    }
+
+    /**
+     * Register a 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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+
+            List<Subscription> subscriptions = new ArrayList<Subscription>();
+            subscriptions.add(subscription);
+            holder.value = subscriptions;
+            getUDDINode().getTransport().getUDDISubscriptionService(node.getSubscriptionUrl()).saveSubscription(authToken, 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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            SaveTModel saveTModel = new SaveTModel();
+            saveTModel.setAuthInfo(authToken);
+            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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            SaveBinding saveBinding = new SaveBinding();
+            saveBinding.setAuthInfo(authToken);
+            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 " + binding.getBindingKey() + " completed.");
+            }
+        } catch (Exception e) {
+            log.error("Unable to register template binding " + bindingTemplate.getBindingKey()
+                    + " ." + e.getMessage(), e);
+        } catch (Throwable t) {
+            log.error("Unable to register template binding " + bindingTemplate.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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            SaveService saveService = new SaveService();
+            saveService.setAuthInfo(authToken);
+            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) {
+
+        BusinessEntity businessEntity = null;
+        log.info("Registering business " + business.getName().get(0).getValue()
+                + " with key " + business.getBusinessKey());
+        try {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            SaveBusiness saveBusiness = new SaveBusiness();
+            saveBusiness.setAuthInfo(authToken);
+            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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            DeleteBusiness deleteBusiness = new DeleteBusiness();
+            deleteBusiness.setAuthInfo(authToken);
+            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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            DeleteService deleteService = new DeleteService();
+            deleteService.setAuthInfo(authToken);
+            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 {
+            String authToken = getAuthToken(node.getSecurityUrl());
+            DeleteBinding deleteBinding = new DeleteBinding();
+            deleteBinding.setAuthInfo(authToken);
+            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());
+                }
+            }
+        }
+    }
+
+    private 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());
+            getAuthToken.setCred(getPassword());
+            authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
+        }
+        return authToken;
+    }
+
+    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;
+    }
+
+    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 save clerk " + getName()
+                    + " ." + e.getMessage(), e);
+        } catch (Throwable t) {
+            log.error("Unable to save clerk " + getName()
+                    + " ." + t.getMessage(), t);
+        }
+        return clerkDetail;
+    }
+
+    public Clerk getApiClerk() {
+        Clerk apiClerk = new Clerk();
+        apiClerk.setName(name);
+        apiClerk.setNode(uddiNode.getApiNode());
+        apiClerk.setPassword(password);
+        apiClerk.setPublisher(publisher);
+        return apiClerk;
+    }
+
+    public UDDINode getUDDINode() {
+        return uddiNode;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setUDDINode(UDDINode uddiNode) {
+        this.uddiNode = uddiNode;
+    }
+
+    public String getPublisher() {
+        return publisher;
+    }
+
+    public void setPublisher(String publisher) {
+        this.publisher = publisher;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public WSDL[] getWsdls() {
+        return wsdls;
+    }
+
+    public void setWsdls(WSDL[] wsdls) {
+        this.wsdls = wsdls;
+    }
+
+    public class WSDL {
+
+        private String businessKey;
+        private String keyDomain;
+        private String fileName;
+
+        public String getBusinessKey() {
+            return businessKey;
+        }
+
+        public void setBusinessKey(String businessKey) {
+            this.businessKey = businessKey;
+        }
+
+        public String getFileName() {
+            return fileName;
+        }
+
+        public void setFileName(String fileName) {
+            this.fileName = fileName;
+        }
+
+        public String getKeyDomain() {
+            return keyDomain;
+        }
+
+        public void setKeyDomain(String keyDomain) {
+            this.keyDomain = keyDomain;
+        }
+    }
+
+    /**
+     *A helper class to create a tModel key generator.<br>
+     * Why would I want a key generator? In UDDIv3, you're support to specify what you want the keys (unique identifiers) to be, however there's
+     * a number of naming rules associated with the keys. Generally, use the FQDN of your business or organization.
+     * Optionally, when saving an UDDI entity, you can just leave the key name blank and the server
+     * should generate one for you. It's normally a UUID that's not easy to remember. In this case, there's no need to call this method.<br><br>
+     * In addition, no changes are made to the UDDI server. You'll have to do that one using code similar to this:
+     * <pre>
+     * UDDIClerk clerk = ...
+     * TModel keygen = UDDIClerk.createKeyGenator("mydomain.com", "my domain", "en");
+     * clerk.register(keygen);
+     * 
+     * @param partitionName think of this as the domain, i.e. juddi.apache.org, but it can really be anything you want. This will become part of the
+     * key associated with the tModel generator (uddi:juddi.apache.org:keygenerator)
+     * @param DescriptiveName required. max length is 255 char
+     * @param DescriptiveNameLanguage optional, max length is 26 char
+     * @return a populated tModel entity representing a tModel key generator. No changes are made to any connect UDDI service
+     * @since 3.2
+     */
+    public static TModel createKeyGenator(String partitionName, String DescriptiveName, String DescriptiveNameLanguage) {
+        if (partitionName == null || partitionName.length() == 0) {
+            throw new IllegalArgumentException();
+        }
+        
+        if (DescriptiveName == null || DescriptiveName.length() == 0) {
+            throw new IllegalArgumentException();
+        }
+        if (!partitionName.startsWith("uddi:")) {
+            throw new IllegalArgumentException("partitionName must have a 'uddi:' prefix");
+
+        }
+        if (!partitionName.endsWith(":keygenerator")) {
+            throw new IllegalArgumentException("partitionName must have a ':keyGenerator' postfix");
+        }
+        TModel tm = new TModel();
+        tm.setName(new Name());
+        tm.getName().setValue(DescriptiveName);
+        tm.getName().setLang(DescriptiveNameLanguage);
+        tm.setCategoryBag(new CategoryBag());
+        KeyedReference kr = new KeyedReference();
+        kr.setTModelKey(UDDIConstants.KEY_GENERATOR_TMODEL);
+        kr.setKeyName(UDDIConstants.KEY_GENERATOR);
+        kr.setKeyValue(UDDIConstants.KEY_GENERATOR_VALUE);
+        tm.getCategoryBag().getKeyedReference().add(kr);
+        OverviewDoc overviewDoc = new OverviewDoc();
+        OverviewURL overviewUrl = new OverviewURL();
+        overviewUrl.setUseType("text");
+        overviewUrl.setValue("http://uddi.org/pubs/uddi_v3.htm#keyGen");
+        overviewDoc.setOverviewURL(overviewUrl);
+        tm.getOverviewDoc().add(overviewDoc);
+        tm.setTModelKey(partitionName.toLowerCase());
+        return tm;
+    }
 }

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerkServlet.java
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerkServlet.java:r1460934-1483596

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java:r1481655-1483596

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/InVMTransport.java
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/InVMTransport.java:r1460934-1483596

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSTransport.java
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/JAXWSTransport.java:r1460934-1483596

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/RMITransport.java
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/RMITransport.java:r1460934-1483596

Propchange: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper:r1460934-1483596

Modified: juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java (original)
+++ juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java Sat May 18 01:11:28 2013
@@ -30,7 +30,7 @@ import org.junit.Test;
 public class ReadWSDLTest {
 
     @Test
-    public void readFromFile() throws WSDLException, URISyntaxException {
+    public void readFromFile() throws WSDLException, URISyntaxException, Exception {
 
         ReadWSDL readWSDL = new ReadWSDL();
         Definition definition = readWSDL.readWSDL("wsdl/HelloWorld.wsdl");
@@ -38,7 +38,7 @@ public class ReadWSDLTest {
     }
 
     @Test
-    public void readFromURL() throws WSDLException, URISyntaxException, MalformedURLException {
+    public void readFromURL() throws WSDLException, URISyntaxException, MalformedURLException, Exception {
 
         ReadWSDL readWSDL = new ReadWSDL();
         Definition definition = readWSDL.readWSDL(new URL("http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl"));
@@ -46,7 +46,7 @@ public class ReadWSDLTest {
     }
 
     @Test
-    public void readFromJar() throws WSDLException, URISyntaxException {
+    public void readFromJar() throws WSDLException, URISyntaxException, Exception {
 
         ReadWSDL readWSDL = new ReadWSDL();
         Definition definition = readWSDL.readWSDL("uddi_v3_service.wsdl");

Modified: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.properties?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.properties (original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.properties Sat May 18 01:11:28 2013
@@ -121,4 +121,9 @@ juddi.validation.enforceReferentialInteg
 
 #juddi.mail.smtp.password
 ##Password used to authenticate to the SMTP server
-##used only if juddi.mail.smtp.auth is true
\ No newline at end of file
+##used only if juddi.mail.smtp.auth is true
+
+
+
+#Since 3.1.5 the maxium ammount of returned subscription entities allowed
+juddi.subscription.maxentities = 1000
\ No newline at end of file

Propchange: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/
------------------------------------------------------------------------------
  Merged /juddi/branches/juddi-3.2.x/juddi-core/src/main/java/org/apache/juddi/api/impl:r1460934-1483596

Propchange: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
            ('svn:mergeinfo' removed)

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/PublicationHelper.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/PublicationHelper.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/PublicationHelper.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/PublicationHelper.java Sat May 18 01:11:28 2013
@@ -43,6 +43,8 @@ public class PublicationHelper {
 		businessKeysFound = FindBusinessByPublisherQuery.select(em, null, publisher, businessKeysFound);
 		
 		List<org.apache.juddi.model.PublisherAssertion> pubAssertionList = FindPublisherAssertionByBusinessQuery.select(em, businessKeysFound, completionStatus);
+                if (pubAssertionList==null)
+                    return result;
 		for(org.apache.juddi.model.PublisherAssertion modelPubAssertion : pubAssertionList) {
 			org.uddi.api_v3.AssertionStatusItem apiAssertionStatusItem = new org.uddi.api_v3.AssertionStatusItem();
 

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDICustodyTransferImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDICustodyTransferImpl.java?rev=1484038&r1=1484037&r2=1484038&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDICustodyTransferImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDICustodyTransferImpl.java Sat May 18 01:11:28 2013
@@ -76,7 +76,7 @@ public class UDDICustodyTransferImpl ext
 	@SuppressWarnings("unchecked")
 	public void discardTransferToken(DiscardTransferToken body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -122,7 +122,7 @@ public class UDDICustodyTransferImpl ext
 			}
 	
 			tx.commit();
-	                long procTime = System.nanoTime() - startTime;
+	                long procTime = System.currentTimeMillis() - startTime;
 	                serviceCounter.update(CustodyTransferQuery.DISCARD_TRANSFERTOKEN, 
 	                        QueryStatus.SUCCESS, procTime);
 
@@ -137,7 +137,7 @@ public class UDDICustodyTransferImpl ext
 	public void getTransferToken(String authInfo, KeyBag keyBag,
 			Holder<String> nodeID, Holder<XMLGregorianCalendar> expirationTime,
 			Holder<byte[]> opaqueToken) throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -186,7 +186,7 @@ public class UDDICustodyTransferImpl ext
 			
 			tx.commit();
 			
-	                long procTime = System.nanoTime() - startTime;
+	                long procTime = System.currentTimeMillis() - startTime;
 	                serviceCounter.update(CustodyTransferQuery.GET_TRANSFERTOKEN, 
 	                        QueryStatus.SUCCESS, procTime);
 
@@ -200,7 +200,7 @@ public class UDDICustodyTransferImpl ext
 
 	public void transferEntities(TransferEntities body)
 			throws DispositionReportFaultMessage {
-	        long startTime = System.nanoTime();
+	        long startTime = System.currentTimeMillis();
 
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
@@ -239,7 +239,7 @@ public class UDDICustodyTransferImpl ext
 			em.remove(modelTransferToken);
 			
 			tx.commit();
-			long procTime = System.nanoTime() - startTime;
+			long procTime = System.currentTimeMillis() - startTime;
 	                serviceCounter.update(CustodyTransferQuery.TRANSFER_ENTITIES, 
 	                        QueryStatus.SUCCESS, procTime);
 



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


Mime
View raw message