Adding default maxEntities config field
Javadoc on a few classes, default constructors for a few UDDI entities.
Work on the subscription api to enforce ref integ on binding templates. Some tests may still fail

git-svn-id: https://svn.apache.org/repos/asf/juddi/branches/juddi-3.2.x@1483162 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/juddi-core-openjpa/src/test/resources/juddiv3.properties b/juddi-core-openjpa/src/test/resources/juddiv3.properties
index c2e5fba..e8675da 100644
--- a/juddi-core-openjpa/src/test/resources/juddiv3.properties
+++ b/juddi-core-openjpa/src/test/resources/juddiv3.properties
@@ -121,4 +121,9 @@
 
 #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
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionImpl.java
index 8ebe780..606093f 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionImpl.java
@@ -22,7 +22,6 @@
 import java.util.GregorianCalendar;

 import java.util.List;

 import java.util.UUID;

-

 import javax.jws.WebService;

 import javax.persistence.EntityManager;

 import javax.persistence.EntityTransaction;

@@ -30,7 +29,25 @@
 import javax.xml.datatype.DatatypeConfigurationException;

 import javax.xml.datatype.DatatypeFactory;

 import javax.xml.ws.Holder;

-

+import org.apache.commons.configuration.ConfigurationException;

+import org.apache.commons.logging.Log;

+import org.apache.commons.logging.LogFactory;

+import org.apache.juddi.api.util.QueryStatus;

+import org.apache.juddi.api.util.SubscriptionQuery;

+import org.apache.juddi.config.AppConfig;

+import org.apache.juddi.config.PersistenceManager;

+import org.apache.juddi.config.Property;

+import org.apache.juddi.jaxb.JAXBMarshaller;

+import org.apache.juddi.mapping.MappingApiToModel;

+import org.apache.juddi.mapping.MappingModelToApi;

+import org.apache.juddi.model.SubscriptionChunkToken;

+import org.apache.juddi.model.SubscriptionMatch;

+import org.apache.juddi.model.UddiEntityPublisher;

+import org.apache.juddi.query.FindSubscriptionByPublisherQuery;

+import org.apache.juddi.v3.error.ErrorMessage;

+import org.apache.juddi.v3.error.FatalErrorException;

+import org.apache.juddi.v3.error.InvalidValueException;

+import org.apache.juddi.validation.ValidateSubscription;

 import org.uddi.api_v3.AssertionStatusItem;

 import org.uddi.api_v3.AssertionStatusReport;

 import org.uddi.api_v3.BindingDetail;

@@ -59,26 +76,6 @@
 import org.uddi.sub_v3.SubscriptionResultsList;

 import org.uddi.v3_service.DispositionReportFaultMessage;

 import org.uddi.v3_service.UDDISubscriptionPortType;

-import org.apache.commons.configuration.ConfigurationException;

-import org.apache.commons.logging.Log;

-import org.apache.commons.logging.LogFactory;

-import org.apache.juddi.api.util.QueryStatus;

-import org.apache.juddi.api.util.SecurityQuery;

-import org.apache.juddi.api.util.SubscriptionQuery;

-import org.apache.juddi.config.AppConfig;

-import org.apache.juddi.config.PersistenceManager;

-import org.apache.juddi.config.Property;

-import org.apache.juddi.jaxb.JAXBMarshaller;

-import org.apache.juddi.mapping.MappingApiToModel;

-import org.apache.juddi.mapping.MappingModelToApi;

-import org.apache.juddi.model.SubscriptionChunkToken;

-import org.apache.juddi.model.SubscriptionMatch;

-import org.apache.juddi.model.UddiEntityPublisher;

-import org.apache.juddi.query.FindSubscriptionByPublisherQuery;

-import org.apache.juddi.v3.error.ErrorMessage;

-import org.apache.juddi.v3.error.FatalErrorException;

-import org.apache.juddi.v3.error.InvalidValueException;

-import org.apache.juddi.validation.ValidateSubscription;

 

 /**

  * 

@@ -858,7 +855,7 @@
 				} else {

 					modelSubscription.setCreateDate(new Date());

 				}

-	

+                              

 				doSubscriptionExpirationDate(apiSubscription);

 				

 				MappingApiToModel.mapSubscription(apiSubscription, modelSubscription);

diff --git a/juddi-core/src/main/java/org/apache/juddi/config/Property.java b/juddi-core/src/main/java/org/apache/juddi/config/Property.java
index 3d8084f..68620a3 100644
--- a/juddi-core/src/main/java/org/apache/juddi/config/Property.java
+++ b/juddi-core/src/main/java/org/apache/juddi/config/Property.java
@@ -1,7 +1,7 @@
 package org.apache.juddi.config;
 
 public interface Property {
-
+    public final static String JDDU_SUBSCRIPTION_MAXENTITIES="juddi.subscription.maxentities";
     public final static String JUDDI_ROOT_PUBLISHER = "juddi.root.publisher";
     public final static String JUDDI_LOAD_INSTALL_DATA = "juddi.load.install.data";
     public final static String JUDDI_PERSISTENCEUNIT_NAME = "juddi.persistenceunit.name";
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java
index dd0551d..136bac1 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateSubscription.java
@@ -14,15 +14,21 @@
  * limitations under the License.
  *
  */
-
- package org.apache.juddi.validation;
+package org.apache.juddi.validation;
 
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.HashSet;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.persistence.EntityManager;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.juddi.config.AppConfig;
+import org.apache.juddi.config.Property;
 
 import org.apache.juddi.keygen.KeyGenerator;
 import org.apache.juddi.keygen.KeyGeneratorFactory;
@@ -45,214 +51,271 @@
  */
 public class ValidateSubscription extends ValidateUDDIApi {
 
-	public ValidateSubscription(UddiEntityPublisher publisher) {
-		super(publisher);
-	}
+    public ValidateSubscription(UddiEntityPublisher publisher) {
+        super(publisher);
+    }
+    private DatatypeFactory df = null;
 
-	public void validateSubscriptions(EntityManager em, List<org.uddi.sub_v3.Subscription> entityList) throws DispositionReportFaultMessage {
+    public void validateSubscriptions(EntityManager em, List<org.uddi.sub_v3.Subscription> entityList) throws DispositionReportFaultMessage {
 
-		// No null or empty list
-		if (entityList == null || entityList.size() == 0)
-			throw new ValueNotAllowedException(new ErrorMessage("errors.savesubscription.NoInput"));
-		
-		for (org.uddi.sub_v3.Subscription entity : entityList) {
-			validateSubscription(em, entity);
-		}
-	}
-	
-	private void validateSubscription(EntityManager em, org.uddi.sub_v3.Subscription subscription) throws DispositionReportFaultMessage {
+        // No null or empty list
+        if (entityList == null || entityList.size() == 0) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.savesubscription.NoInput"));
+        }
 
-		// A supplied subscription can't be null
-		if (subscription == null)
-			throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NullInput"));
-		
-		boolean entityExists = false;
-		String entityKey = subscription.getSubscriptionKey();
-		if (entityKey == null || entityKey.length() == 0) {
-			KeyGenerator keyGen = KeyGeneratorFactory.getKeyGenerator();
-			entityKey = keyGen.generate();
-			subscription.setSubscriptionKey(entityKey);
-		}
-		else {
-			// Per section 4.4: keys must be case-folded
-			entityKey = entityKey.toLowerCase();
-			subscription.setSubscriptionKey(entityKey);
+        for (org.uddi.sub_v3.Subscription entity : entityList) {
+            validateSubscription(em, entity);
+        }
+    }
 
-			Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
-			if (obj != null) {
-				entityExists = true;
+    private void validateSubscription(EntityManager em, org.uddi.sub_v3.Subscription subscription) throws DispositionReportFaultMessage {
 
-				// Make sure publisher owns this entity.
-				if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription)obj).getAuthorizedName()))
-					throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
-			}
-			else {
-				// Inside this block, we have a key proposed by the publisher on a new entity
+        // A supplied subscription can't be null
+        if (subscription == null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NullInput"));
+        }
+        if (df == null) {
+            try {
+                df = DatatypeFactory.newInstance();
+            } catch (DatatypeConfigurationException ex) {
+                throw new FatalErrorException(new ErrorMessage("errors.DatatypeFactor"));
+            }
+        }
+        boolean entityExists = false;
+        String entityKey = subscription.getSubscriptionKey();
+        //no key specified, make a new one
+        if (entityKey == null || entityKey.length() == 0) {
+            KeyGenerator keyGen = KeyGeneratorFactory.getKeyGenerator();
+            entityKey = keyGen.generate();
+            subscription.setSubscriptionKey(entityKey);
+        } else {
+            //key specified, validate it
+            // Per section 4.4: keys must be case-folded
+            entityKey = entityKey.toLowerCase();
+            subscription.setSubscriptionKey(entityKey);
 
-				// Validate key and then check to see that the proposed key is valid for this publisher
-				ValidateUDDIKey.validateUDDIv3Key(entityKey);
-				if (!publisher.isValidPublisherKey(em, entityKey))
-					throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
-
-			}
-			
-		}
-
-		if (!entityExists) {
-			// Check to make sure key isn't used by another entity.
-			if (!isUniqueKey(em, entityKey))
-				throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.KeyExists", entityKey));
-		}
-                //AO, if it's already expired, why even allow it?
-		if (subscription.getExpiresAfter()!=null)
-                {
-                    long expiresat= subscription.getExpiresAfter().toGregorianCalendar().getTimeInMillis();
-                    if (System.currentTimeMillis() > expiresat)
-                        throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.expired"));
+            Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
+            if (obj != null) {
+                entityExists = true;
+                //revising a new item
+                // Make sure publisher owns this entity.
+                if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription) obj).getAuthorizedName())) {
+                    throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
                 }
-                if (subscription.getMaxEntities()!=null)
-                {
-                    if (subscription.getMaxEntities().intValue() <= 0)
-                    {
-                        throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.maxrecordstoosmall"));
-                    }
+            } else {
+                //new item
+                // Inside this block, we have a key proposed by the publisher on a new entity
+
+                // Validate key and then check to see that the proposed key is valid for this publisher
+                ValidateUDDIKey.validateUDDIv3Key(entityKey);
+                if (!publisher.isValidPublisherKey(em, entityKey)) {
+                    throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.BadPartition", entityKey));
                 }
-		if (subscription.getNotificationInterval()==null)
-                {
-                    //TODO default value?
-                     throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.notificationintervalnotdefined"));
-                }
-		validateSubscriptionFilter(subscription.getSubscriptionFilter(), entityExists);
-	}
-        /**
-         * this handles just the filter items only
-         * @param subscriptionFilter
-         * @param entityExists or more accurately, is this a new item or not?
-         * @throws DispositionReportFaultMessage 
+
+            }
+
+        }
+
+        if (!entityExists) {
+            // Check to make sure key isn't used by another entity.
+            if (!isUniqueKey(em, entityKey)) {
+                throw new KeyUnavailableException(new ErrorMessage("errors.keyunavailable.KeyExists", entityKey));
+            }
+        }
+        //AO, if it's already expired, why even allow it?
+        if (subscription.getExpiresAfter() != null) {
+            long expiresat = subscription.getExpiresAfter().toGregorianCalendar().getTimeInMillis();
+            if (System.currentTimeMillis() > expiresat) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.expired"));
+            }
+        }
+        if (subscription.getMaxEntities() != null) {
+            if (subscription.getMaxEntities().intValue() <= 0) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.maxrecordstoosmall"));
+            }
+        }
+        //maxEntities:  This optional integer specifies the maximum number of entities in a notification returned to a subscription listener. 
+        //If not specified, the number of entities sent is not limited, unless by node policy.
+        try {
+            if (subscription.getMaxEntities() == null
+                    || subscription.getMaxEntities().intValue() > AppConfig.getConfiguration().getInt(Property.JDDU_SUBSCRIPTION_MAXENTITIES, 1000)) {
+                subscription.setMaxEntities(AppConfig.getConfiguration().getInt(Property.JDDU_SUBSCRIPTION_MAXENTITIES, 1000));
+            }
+        } catch (ConfigurationException x) {
+            subscription.setMaxEntities(1000);
+        }
+        /*
+         *  notificationInterval:  This optional argument is only required when asynchronous notifications are used. 
+         * It is of type xsd:duration and specifies how often change notifications are to be provided to a subscriber. 
+         * If the notificationInterval specified is not acceptable due to node policy, then the node adjusts the value to
+         * match the next longer time period that is supported.  The adjusted value is provided with the returns from this
+         * API.  Also see Section 5.5.1.1 Specifying Durations.
          */
-	private void validateSubscriptionFilter(SubscriptionFilter subscriptionFilter, boolean entityExists) throws DispositionReportFaultMessage {
-		if (!entityExists && subscriptionFilter == null)
-			throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NoFilterOnNewSubscription"));
-			
-		if (subscriptionFilter != null) {
-			int filterCount = 0;
-			ValidateInquiry validateInquiry = new ValidateInquiry(publisher);
-			if (subscriptionFilter.getFindBinding() != null) {
-				filterCount++;
-				validateInquiry.validateFindBinding(subscriptionFilter.getFindBinding());
-			}
-			if (subscriptionFilter.getFindBusiness() != null) {
-				filterCount++;
-				validateInquiry.validateFindBusiness(subscriptionFilter.getFindBusiness());
-			}
-			if (subscriptionFilter.getFindService() != null) {
-				filterCount++;
-				validateInquiry.validateFindService(subscriptionFilter.getFindService());
-			}
-			if (subscriptionFilter.getFindTModel() != null) {
-				filterCount++;
-				validateInquiry.validateFindTModel(subscriptionFilter.getFindTModel(), false);
-			}
-			if (subscriptionFilter.getFindRelatedBusinesses() != null) {
-				filterCount++;
-				validateInquiry.validateFindRelatedBusinesses(subscriptionFilter.getFindRelatedBusinesses(), false);
-			}
-			if (subscriptionFilter.getGetBindingDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetBindingDetail(subscriptionFilter.getGetBindingDetail());
-			}
-			if (subscriptionFilter.getGetBusinessDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetBusinessDetail(subscriptionFilter.getGetBusinessDetail());
-			}
-			if (subscriptionFilter.getGetServiceDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetServiceDetail(subscriptionFilter.getGetServiceDetail());
-			}
-			if (subscriptionFilter.getGetTModelDetail() != null) {
-				filterCount++;
-				validateInquiry.validateGetTModelDetail(subscriptionFilter.getGetTModelDetail());
-			}
-			if (subscriptionFilter.getGetAssertionStatusReport() != null) {
-				filterCount++;
-			}
+        if (subscription.getNotificationInterval() == null && subscription.getBindingKey() != null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.notificationintervalnotdefined"));
+        }
+        
+        //validate that the binding key exists
+        validateSubscriptionBindingkeyExists(em,subscription.getBindingKey());
+        
+        validateSubscriptionFilter(subscription.getSubscriptionFilter(), entityExists);
+    }
 
-			if (filterCount == 0)
-				throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.BlankFilter"));
-			
-			if (filterCount > 1)
-				throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.TooManyFilters", String.valueOf(filterCount)));
+    /**
+     * this handles just the filter items only
+     *
+     * @param subscriptionFilter
+     * @param entityExists or more accurately, is this a new item or not?
+     * @throws DispositionReportFaultMessage
+     */
+    private void validateSubscriptionFilter(SubscriptionFilter subscriptionFilter, boolean entityExists) throws DispositionReportFaultMessage {
+        if (!entityExists && subscriptionFilter == null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.NoFilterOnNewSubscription"));
+        }
 
-		}
-		
-	}
-	
-	public void validateDeleteSubscription(EntityManager em, DeleteSubscription body) throws DispositionReportFaultMessage {
-		// No null input
-		if (body == null)
-			throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+        if (subscriptionFilter != null) {
+            int filterCount = 0;
+            ValidateInquiry validateInquiry = new ValidateInquiry(publisher);
+            if (subscriptionFilter.getFindBinding() != null) {
+                filterCount++;
+                validateInquiry.validateFindBinding(subscriptionFilter.getFindBinding());
+            }
+            if (subscriptionFilter.getFindBusiness() != null) {
+                filterCount++;
+                validateInquiry.validateFindBusiness(subscriptionFilter.getFindBusiness());
+            }
+            if (subscriptionFilter.getFindService() != null) {
+                filterCount++;
+                validateInquiry.validateFindService(subscriptionFilter.getFindService());
+            }
+            if (subscriptionFilter.getFindTModel() != null) {
+                filterCount++;
+                validateInquiry.validateFindTModel(subscriptionFilter.getFindTModel(), false);
+            }
+            if (subscriptionFilter.getFindRelatedBusinesses() != null) {
+                filterCount++;
+                validateInquiry.validateFindRelatedBusinesses(subscriptionFilter.getFindRelatedBusinesses(), false);
+            }
+            if (subscriptionFilter.getGetBindingDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetBindingDetail(subscriptionFilter.getGetBindingDetail());
+            }
+            if (subscriptionFilter.getGetBusinessDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetBusinessDetail(subscriptionFilter.getGetBusinessDetail());
+            }
+            if (subscriptionFilter.getGetServiceDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetServiceDetail(subscriptionFilter.getGetServiceDetail());
+            }
+            if (subscriptionFilter.getGetTModelDetail() != null) {
+                filterCount++;
+                validateInquiry.validateGetTModelDetail(subscriptionFilter.getGetTModelDetail());
+            }
+            if (subscriptionFilter.getGetAssertionStatusReport() != null) {
+                filterCount++;
+            }
 
-		// No null or empty list
-		List<String> entityKeyList = body.getSubscriptionKey();
-		if (entityKeyList == null || entityKeyList.size() == 0)
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
-		
-		HashSet<String> dupCheck = new HashSet<String>();
-		int i = 0;
-		for (String entityKey : entityKeyList) {
+            if (filterCount == 0) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.BlankFilter"));
+            }
 
-			// Per section 4.4: keys must be case-folded
-			entityKey = entityKey.toLowerCase();
-			entityKeyList.set(i, entityKey);
-			
-			boolean inserted = dupCheck.add(entityKey);
-			if (!inserted)
-				throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey));
-			
-			Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
-			if (obj == null)
-				throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", entityKey));
-			
-			// Make sure publisher owns this entity.
-			if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription)obj).getAuthorizedName()))
-				throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
-			
-			i++;
-		}
-	}
+            if (filterCount > 1) {
+                throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.TooManyFilters", String.valueOf(filterCount)));
+            }
 
-	public void validateGetSubscriptionResults(EntityManager em, GetSubscriptionResults body) throws DispositionReportFaultMessage {
-		// No null input
-		if (body == null)
-			throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
-		
-		String subscriptionKey = body.getSubscriptionKey();
-		if (subscriptionKey == null || subscriptionKey.length() == 0)
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NullKey", subscriptionKey));
-		
-		// Per section 4.4: keys must be case-folded
-		subscriptionKey = subscriptionKey.toLowerCase();
-		body.setSubscriptionKey(subscriptionKey);
-		
-		Object obj = em.find(org.apache.juddi.model.Subscription.class, subscriptionKey);
-		if (obj == null)
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", subscriptionKey));
-		
-		Date expiresAfter = ((org.apache.juddi.model.Subscription)obj).getExpiresAfter();
-		Date now = new Date();
-		if (expiresAfter.getTime() < now.getTime())
-			throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
-		
-		CoveragePeriod coveragePeriod = body.getCoveragePeriod();
-		if (coveragePeriod == null)
-			throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
-		
-		if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null)
-			throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
-		
-		GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
-		GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
-		if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis())
-			throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));		
-	}
+        }
+
+    }
+
+    public void validateDeleteSubscription(EntityManager em, DeleteSubscription body) throws DispositionReportFaultMessage {
+        // No null input
+        if (body == null) {
+            throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+        }
+
+        // No null or empty list
+        List<String> entityKeyList = body.getSubscriptionKey();
+        if (entityKeyList == null || entityKeyList.size() == 0) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NoKeys"));
+        }
+
+        HashSet<String> dupCheck = new HashSet<String>();
+        int i = 0;
+        for (String entityKey : entityKeyList) {
+
+            // Per section 4.4: keys must be case-folded
+            entityKey = entityKey.toLowerCase();
+            entityKeyList.set(i, entityKey);
+
+            boolean inserted = dupCheck.add(entityKey);
+            if (!inserted) {
+                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.DuplicateKey", entityKey));
+            }
+
+            Object obj = em.find(org.apache.juddi.model.Subscription.class, entityKey);
+            if (obj == null) {
+                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", entityKey));
+            }
+
+            // Make sure publisher owns this entity.
+            if (!publisher.getAuthorizedName().equals(((org.apache.juddi.model.Subscription) obj).getAuthorizedName())) {
+                throw new UserMismatchException(new ErrorMessage("errors.usermismatch.InvalidOwner", entityKey));
+            }
+
+            i++;
+        }
+    }
+
+    public void validateGetSubscriptionResults(EntityManager em, GetSubscriptionResults body) throws DispositionReportFaultMessage {
+        // No null input
+        if (body == null) {
+            throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+        }
+
+        String subscriptionKey = body.getSubscriptionKey();
+        if (subscriptionKey == null || subscriptionKey.length() == 0) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.NullKey", subscriptionKey));
+        }
+
+        // Per section 4.4: keys must be case-folded
+        subscriptionKey = subscriptionKey.toLowerCase();
+        body.setSubscriptionKey(subscriptionKey);
+
+        Object obj = em.find(org.apache.juddi.model.Subscription.class, subscriptionKey);
+        if (obj == null) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscriptionNotFound", subscriptionKey));
+        }
+
+        Date expiresAfter = ((org.apache.juddi.model.Subscription) obj).getExpiresAfter();
+        Date now = new Date();
+        if (expiresAfter.getTime() < now.getTime()) {
+            throw new InvalidKeyPassedException(new ErrorMessage("errors.getsubscriptionresult.SubscriptionExpired", subscriptionKey));
+        }
+
+        CoveragePeriod coveragePeriod = body.getCoveragePeriod();
+        if (coveragePeriod == null) {
+            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.NullCoveragePeriod"));
+        }
+
+        if (coveragePeriod.getStartPoint() == null || coveragePeriod.getEndPoint() == null) {
+            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.InvalidDateInCoveragePeriod"));
+        }
+
+        GregorianCalendar startPoint = coveragePeriod.getStartPoint().toGregorianCalendar();
+        GregorianCalendar endPoint = coveragePeriod.getEndPoint().toGregorianCalendar();
+        if (startPoint.getTimeInMillis() > endPoint.getTimeInMillis()) {
+            throw new InvalidTimeException(new ErrorMessage("errors.getsubscriptionresult.StartPointAfterEndPoint", startPoint.toString()));
+        }
+    }
+
+    private void validateSubscriptionBindingkeyExists(EntityManager em, String bindingKey) throws ValueNotAllowedException {
+        if (bindingKey==null || bindingKey.length()==0) {
+            return;
+        }
+        Object obj = em.find(org.apache.juddi.model.BindingTemplate.class, bindingKey);
+        if (obj==null) {
+            throw new ValueNotAllowedException(new ErrorMessage("errors.subscription.BindingDoesntExist"));
+        }
+    }
 }
diff --git a/juddi-core/src/main/resources/messages.properties b/juddi-core/src/main/resources/messages.properties
index 0f6e013..f4a0a7c 100644
--- a/juddi-core/src/main/resources/messages.properties
+++ b/juddi-core/src/main/resources/messages.properties
@@ -60,6 +60,7 @@
 

 

 #-- General error messages

+errors.DatatypeFactor=Can't create a DatatypeFactory instance.

 errors.Unspecified=An unspecified error occurred

 errors.Unsupported=This version does not support this feature or API

 errors.Unsupported.findQualifier=Invalid findQualifier value was passed

@@ -187,12 +188,13 @@
 errors.transferentities.KeyMismatch=A supplied key does not match a key associated with the transfer request

 errors.savesubscription.NoInput=At least one Subscription must be provided

 errors.subscription.NullInput=The subscription structure cannot be blank

+errors.subscription.BindingDoesntExist=The requested subscription has a binding key defined, however that binding template does not exist

 errors.subscription.NoFilterOnNewSubscription=No subscription filter was provided on this new subscription request

 errors.subscription.BlankFilter=A filter structure was provided but no filter criteria was specified

 errors.subscription.TooManyFilters=Only one filter is allowed per subscription request

 errors.subscription.expired=The expiration timestamp has already passed.

 errors.subscription.maxrecordstoosmall=When specifying the maxium record, it must be greater than zero

-errors.subscription.notificationintervalnotdefined=A notification interval must be specified

+errors.subscription.notificationintervalnotdefined=A notification interval must be specified and must be greater than 0ms

 errors.getsubscriptionresult.SubscriptionExpired=The passed subscription has expired

 errors.getsubscriptionresult.NullCoveragePeriod=The coverage period cannot be blank

 errors.getsubscriptionresult.InvalidDateInCoveragePeriod=The coverage period must contain valid dates for start and end points

diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_141_JIRATest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_141_JIRATest.java
index 97e1d01..1c026ac 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_141_JIRATest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_141_JIRATest.java
@@ -14,17 +14,30 @@
  */

 package org.apache.juddi.api.impl;

 

+import java.rmi.RemoteException;

 import java.util.ArrayList;

+import java.util.Calendar;

+import java.util.GregorianCalendar;

 import java.util.List;

+import java.util.UUID;

+import java.util.logging.Level;

+import java.util.logging.Logger;

+import javax.xml.datatype.DatatypeConfigurationException;

+import javax.xml.datatype.DatatypeFactory;

+import javax.xml.datatype.XMLGregorianCalendar;

 

 import javax.xml.soap.SOAPFault;

+import javax.xml.ws.Holder;

 

 import org.apache.commons.configuration.ConfigurationException;

 import org.apache.commons.logging.Log;

 import org.apache.commons.logging.LogFactory;

 import org.apache.juddi.Registry;

+import org.apache.juddi.api_v3.AccessPointType;

 import org.apache.juddi.v3.client.UDDIConstants;

+import org.apache.juddi.v3.client.config.UDDIClerk;

 import org.apache.juddi.v3.client.config.UDDIClient;

+import org.apache.juddi.v3.error.ValueNotAllowedException;

 import org.apache.juddi.v3.tck.TckPublisher;

 import org.apache.juddi.v3.tck.TckSecurity;

 import org.apache.juddi.v3.tck.TckTModel;

@@ -32,6 +45,8 @@
 import org.junit.Assert;

 import org.junit.BeforeClass;

 import org.junit.Test;

+import org.uddi.api_v3.AccessPoint;

+import org.uddi.api_v3.BindingTemplate;

 import org.uddi.api_v3.BindingTemplates;

 import org.uddi.api_v3.BusinessDetail;

 import org.uddi.api_v3.BusinessEntity;

@@ -56,10 +71,17 @@
 import org.uddi.api_v3.ServiceList;

 import org.uddi.api_v3.TModel;

 import org.uddi.api_v3.TModelDetail;

+import org.uddi.api_v3.TModelInstanceDetails;

+import org.uddi.api_v3.TModelInstanceInfo;

 import org.uddi.api_v3.TModelList;

+import org.uddi.sub_v3.DeleteSubscription;

+import org.uddi.sub_v3.Subscription;

+import org.uddi.sub_v3.SubscriptionFilter;

+import org.uddi.v3_service.DispositionReportFaultMessage;

 import org.uddi.v3_service.UDDIInquiryPortType;

 import org.uddi.v3_service.UDDIPublicationPortType;

 import org.uddi.v3_service.UDDISecurityPortType;

+import org.uddi.v3_service.UDDISubscriptionPortType;

 

 /**

  * This test class provides test cases of items discovered or reported through

@@ -72,12 +94,11 @@
 public class API_141_JIRATest {

 

     private static Log logger = LogFactory.getLog(API_141_JIRATest.class);

-

     static UDDISecurityPortType security = new UDDISecurityImpl();

     static UDDIInquiryPortType inquiry = new UDDIInquiryImpl();

     static UDDIPublicationPortType publication = new UDDIPublicationImpl();

-    static TckTModel tckTModel               = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());

-

+    static UDDISubscriptionPortType sub = new UDDISubscriptionImpl();

+    static TckTModel tckTModel = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());

     protected static String authInfoJoe = null;

     protected static String authInfoSam = null;

     private static UDDIClient manager;

@@ -97,15 +118,17 @@
     static final String str51 = "111111111111111111111111111111111111111111111111111";

     static final String str50 = "11111111111111111111111111111111111111111111111111";

     static final String MISSING_RESOURCE = "Can't find resource for bundle";

+    static DatatypeFactory df = null;

 

     @AfterClass

-    public static  void stopManager() throws ConfigurationException {

-    	Registry.stop();

+    public static void stopManager() throws ConfigurationException {

+        Registry.stop();

     }

 

     @BeforeClass

-    public static void startManager() throws ConfigurationException {

-    	Registry.start();

+    public static void startManager() throws ConfigurationException, DatatypeConfigurationException {

+        df = DatatypeFactory.newInstance();

+        Registry.start();

 

         logger.debug("Getting auth tokens..");

         try {

@@ -113,10 +136,10 @@
             authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());

             Assert.assertNotNull(authInfoJoe);

             Assert.assertNotNull(authInfoSam);

-            String authInfoUDDI  = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(),  TckPublisher.getUDDIPassword());

-			tckTModel.saveUDDIPublisherTmodel(authInfoUDDI);

-			tckTModel.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);

-			tckTModel.saveJoePublisherTmodel(authInfoJoe);

+            String authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());

+            tckTModel.saveUDDIPublisherTmodel(authInfoUDDI);

+            tckTModel.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);

+            tckTModel.saveJoePublisherTmodel(authInfoJoe);

         } catch (Exception e) {

             logger.error(e.getMessage(), e);

             Assert.fail("Could not obtain authInfo token.");

@@ -510,6 +533,359 @@
     //TODO binding template tmodel instance info

     //TODO tmodel tests

     //TODO create tests for enforcing ref integrity of tmodel keys, after enforcing this, the tests in this class will need to be heavily revised

+    /**

+     * test when the subscription expiration is null

+     */

+    @Test

+    public void JUDDI_606_1() {

+        System.out.println("JUDDI_606_1 Null expiration time");

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setMaxEntities(1);

+        sub1.setExpiresAfter(null);

+        sub1.setNotificationInterval(df.newDuration(5000));

+        sub1.setBrief(false);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        String key = null;

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            key = data.value.get(0).getSubscriptionKey();

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            HandleException(ex);

+            Assert.fail("null expires after should be allowed");

+

+        } finally {

+            DeleteSubscriptionInternal(authInfoJoe, key);

+        }

+

+

+    }

+

+    /**

+     * test when the subscription expiration is null

+     */

+    @Test(expected = ValueNotAllowedException.class)

+    public void JUDDI_606_2() throws Exception {

+

+        System.out.println("JUDDI_606_2 invalid expiration time");

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setMaxEntities(1);

+        GregorianCalendar gcal = new GregorianCalendar();

+        gcal.add(Calendar.DATE, -1);

+        sub1.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

+        sub1.setNotificationInterval(df.newDuration(5000));

+        sub1.setBrief(false);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.fail("request should have been rejected, saving a subscription that's already expired");

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            //HandleException(ex);

+            throw ex;

+        }

+    }

+

+    /**

+     * confirm a subscription key is returned

+     */

+    @Test

+    public void JUDDI_606_3() throws Exception {

+

+        System.out.println("JUDDI_606_3 confirm a subscription key is returned");

+

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setMaxEntities(1);

+        GregorianCalendar gcal = new GregorianCalendar();

+        gcal.add(Calendar.DATE, 1);

+        sub1.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

+        sub1.setNotificationInterval(df.newDuration(5000));

+        sub1.setBrief(false);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        String key = null;

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.assertNotNull(data);

+            Assert.assertNotNull(data.value);

+            key = data.value.get(0).getSubscriptionKey();

+            Assert.assertFalse(data.value.isEmpty());

+            Assert.assertEquals(data.value.size(), 1);

+            Assert.assertNotNull(data.value.get(0).getSubscriptionKey());

+            Assert.assertTrue("subscription key is empty or invalid", (data.value.get(0).getSubscriptionKey().length() > 5));

+

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            HandleException(ex);

+            Assert.fail("this should have worked");

+        } finally {

+            DeleteSubscriptionInternal(authInfoJoe, key);

+        }

+    }

+

+    /**

+     * JUDDI_606_4 null subscription filter

+     */

+    @Test

+    public void JUDDI_606_4() throws Exception {

+

+        System.out.println("JUDDI_606_4 null subscription filter");

+

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setMaxEntities(1);

+        GregorianCalendar gcal = new GregorianCalendar();

+        gcal.add(Calendar.DATE, 1);

+        sub1.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

+        sub1.setNotificationInterval(df.newDuration(5000));

+        sub1.setBrief(false);

+        sub1.setSubscriptionFilter(null);

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        //sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.fail("this should have been rejected");

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            //HandleException(ex);

+        }

+    }

+

+    /**

+     * JUDDI_606_5 empty subscription filter

+     */

+    @Test

+    public void JUDDI_606_5() throws Exception {

+

+        System.out.println("JUDDI_606_5 empty subscription filter");

+

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setMaxEntities(1);

+        GregorianCalendar gcal = new GregorianCalendar();

+        gcal.add(Calendar.DATE, 1);

+        sub1.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

+        sub1.setNotificationInterval(df.newDuration(5000));

+        sub1.setBrief(false);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        //sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.fail("this should have been rejected");

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            //HandleException(ex);

+        }

+    }

+

+    /**

+     * JUDDI_606_6 negative max entities

+     */

+    @Test(expected = ValueNotAllowedException.class)

+    public void JUDDI_606_6() throws Exception {

+

+        System.out.println("JUDDI_606_6 negative max entities");

+

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setMaxEntities(-1);

+        GregorianCalendar gcal = new GregorianCalendar();

+        gcal.add(Calendar.DATE, 1);

+        sub1.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

+        sub1.setNotificationInterval(df.newDuration(5000));

+        sub1.setBrief(false);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        //sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.fail("this should have been rejected");

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            // HandleException(ex);

+            throw ex;

+        }

+    }

+

+    /**

+     * JUDDI_606_7 minimal settings

+     */

+    @Test()

+    public void JUDDI_606_7() throws Exception {

+

+        System.out.println("JUDDI_606_7 minimal settings");

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setExpiresAfter(null);

+        sub1.setNotificationInterval(null);

+        sub1.setBrief(null);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        String key = null;

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            key = data.value.get(0).getSubscriptionKey();

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            HandleException(ex);

+            Assert.fail("this should have worked");

+        } finally {

+            DeleteSubscriptionInternal(authInfoJoe, key);

+        }

+    }

+

+    /**

+     * JUDDI_606_8 reset expiration Invoking save_subscription automatically

+     * resets the expiration period for the subscription in question to a value

+     * based upon the node’s policy.

+     */

+    @Test()

+    public void JUDDI_606_8() throws Exception {

+

+        System.out.println("JUDDI_606_8 reset expiration");

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setExpiresAfter(null);

+        sub1.setNotificationInterval(null);

+        sub1.setBrief(null);

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        String key = null;

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            XMLGregorianCalendar initialExpiration = data.value.get(0).getExpiresAfter();

+            key = data.value.get(0).getSubscriptionKey();

+            Thread.sleep(5000);

+            data.value.get(0).setExpiresAfter(null);

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.assertFalse("timestamp should have been reset", initialExpiration.equals(data.value.get(0).getExpiresAfter()));

+            Assert.assertEquals(key, data.value.get(0).getSubscriptionKey());

+

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            HandleException(ex);

+            Assert.fail("this should have worked");

+        } finally {

+            DeleteSubscriptionInternal(authInfoJoe, key);

+        }

+    }

+

+    /**

+     * JUDDI_606_9 asynch subscriptions, key doesn't exist

+     */

+    @Test(expected = ValueNotAllowedException.class)

+    public void JUDDI_606_9() throws Exception {

+

+        System.out.println("JUDDI_606_9 asynch subscriptions, key doesn't exist");

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setExpiresAfter(null);

+        sub1.setNotificationInterval(df.newDuration(60000));

+        sub1.setBrief(null);

+        sub1.setBindingKey("uddi:juddi.apache.org:" + UUID.randomUUID().toString());

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        String key = null;

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.fail("this should have failed");

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            throw ex;

+        } finally {

+        }

+    }

+

+    

+    /**

+     * JUDDI_606_10 asynch subscriptions, key exists, null interval

+     */

+    @Test(expected = ValueNotAllowedException.class)

+    public void JUDDI_606_10() throws Exception {

+

+        System.out.println("JUDDI_606_10 asynch subscriptions, key exists, null interval");

+        org.uddi.sub_v3.Subscription sub1 = new org.uddi.sub_v3.Subscription();

+        sub1.setExpiresAfter(null);

+        sub1.setNotificationInterval(null);

+        sub1.setBrief(null);

+        sub1.setBindingKey(CreateBindingForSubscription(authInfoJoe));

+        sub1.setSubscriptionFilter(new SubscriptionFilter());

+        FindBusiness fb = new FindBusiness();

+        fb.setFindQualifiers(new FindQualifiers());

+        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);

+        fb.getName().add(new Name("%", null));

+        sub1.getSubscriptionFilter().setFindBusiness(fb);

+        Holder<List<Subscription>> data = new Holder<List<Subscription>>();

+        data.value = new ArrayList<Subscription>();

+        data.value.add(sub1);

+        String key = null;

+        try {

+            sub.saveSubscription(authInfoJoe, data);

+            Assert.fail("this should have failed");

+        } //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

+        catch (Exception ex) {

+            throw ex;

+        } finally {

+        }

+    }

+

     //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">

     /**

      * Converts category bags of tmodels to a readable string

@@ -680,4 +1056,41 @@
             ex.printStackTrace();

         }

     }

+

+    private void DeleteSubscriptionInternal(String token, String key) {

+

+        //cleanup

+        try {

+            DeleteSubscription x = new DeleteSubscription();

+            x.setAuthInfo(token);

+            x.getSubscriptionKey().add(key);

+            sub.deleteSubscription(x);

+        } catch (Exception ex) {

+            ex.printStackTrace();

+        }

+    }

+

+    private String CreateBindingForSubscription(String authInfoJoe) throws Exception {

+        SaveBusiness sb = new SaveBusiness();

+        BusinessEntity be = new BusinessEntity();

+        be.getName().add(new Name("joe's callback", "en"));

+        be.setBusinessServices(new BusinessServices());

+        BusinessService bs = new BusinessService();

+        bs.getName().add(new Name("Joe's callback service", "en"));

+        bs.setBindingTemplates(new BindingTemplates());

+        BindingTemplate bt = new BindingTemplate();

+        bt.setAccessPoint(new AccessPoint("http://localhost/somewhere", AccessPointType.END_POINT.toString()));

+       

+        TModelInstanceInfo instanceInfo = new TModelInstanceInfo();

+        instanceInfo.setTModelKey("uddi:uddi.org:transport:http");

+        bt.setTModelInstanceDetails(new TModelInstanceDetails());

+        bt.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);

+

+

+        be.getBusinessServices().getBusinessService().add(bs);

+        sb.getBusinessEntity().add(be);

+        sb.setAuthInfo(authInfoJoe);

+        BusinessDetail saveBusiness = publication.saveBusiness(sb);

+        return saveBusiness.getBusinessEntity().get(0).getBusinessServices().getBusinessService().get(0).getBindingTemplates().getBindingTemplate().get(0).getBindingKey();

+    }

 }

diff --git a/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java b/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java
index e1416d5..8d4d2a1 100644
--- a/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/subscription/SubscriptionNotifierTest.java
@@ -49,71 +49,95 @@
 /**
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
  */
-public class SubscriptionNotifierTest 
-{
-	private static Log logger = LogFactory.getLog(SubscriptionNotifierTest.class);
-	private static API_010_PublisherTest api010 = new API_010_PublisherTest();
-	private static TckTModel tckTModel = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckBusiness tckBusiness = new TckBusiness(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckBusinessService tckBusinessService = new TckBusinessService(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckBindingTemplate tckBindingTemplate = new TckBindingTemplate(new UDDIPublicationImpl(), new UDDIInquiryImpl());
-	private static TckSubscription tckSubscription = new TckSubscription(new UDDISubscriptionImpl(), new UDDISecurityImpl());
+public class SubscriptionNotifierTest {
 
-	private static String authInfoJoe = null;
-	
-	@BeforeClass
-	public static void setup() {
-		logger.debug("Getting auth token..");
-		try {
-			api010.saveJoePublisher();
-			authInfoJoe = TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getJoePublisherId(),  TckPublisher.getJoePassword());
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			//tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			tckSubscription.saveJoePublisherSubscription(authInfoJoe);
-			//tckSubscription.getJoePublisherSubscriptionResults(authInfoJoe);
-		} catch (RemoteException e) {
-			logger.error(e.getMessage(), e);
-			Assert.fail("Could not obtain authInfo token.");
-		}
-	}
-	@Test
-	public void testGetSubscriptionResults() 
-		throws ConfigurationException, MalformedURLException, DispositionReportFaultMessage, DatatypeConfigurationException
-	{
-		SubscriptionNotifier notifier = new SubscriptionNotifier();
-		notifier.cancel();
-		Collection<Subscription> subscriptions = notifier.getAllAsyncSubscriptions();
-		Assert.assertEquals(1, subscriptions.size());
-		Subscription subscription = subscriptions.iterator().next();
-		GetSubscriptionResults getSubscriptionResults = notifier.buildGetSubscriptionResults(subscription, new Date(new Date().getTime() + 60000l));
-		getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
-		UddiEntityPublisher publisher = new UddiEntityPublisher();
-		publisher.setAuthorizedName(subscription.getAuthorizedName());
-		SubscriptionResultsList resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
-		logger.info("Expecting the resultList to be null: " + resultList.getServiceList());
-		Assert.assertNull(resultList.getServiceList());
-		tckBusinessService.updateJoePublisherService(authInfoJoe, "updated description");
-		resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
-		//We're expecting a changed service
-		logger.info("Expecting the resultList to have 1 service: " + resultList.getServiceList());
-		Assert.assertNotNull(resultList.getServiceList());
-		//We should detect these changes.
-		boolean hasChanges = notifier.resultListContainsChanges(resultList);
-		Assert.assertTrue(hasChanges);
-		System.out.print(resultList);
-		notifier.notify(getSubscriptionResults,resultList,new Date());
-	}
-	
-	
-	@AfterClass
-	public static void teardown() {
-		tckSubscription.deleteJoePublisherSubscription(authInfoJoe);
-		//tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-		tckBusinessService.deleteJoePublisherService(authInfoJoe);
-		tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-		tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-	}
-	
+    private static Log logger = LogFactory.getLog(SubscriptionNotifierTest.class);
+    private static API_010_PublisherTest api010 = new API_010_PublisherTest();
+    private static TckTModel tckTModel = new TckTModel(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckBusiness tckBusiness = new TckBusiness(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckBusinessService tckBusinessService = new TckBusinessService(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckBindingTemplate tckBindingTemplate = new TckBindingTemplate(new UDDIPublicationImpl(), new UDDIInquiryImpl());
+    private static TckSubscription tckSubscription = new TckSubscription(new UDDISubscriptionImpl(), new UDDISecurityImpl());
+    private static String authInfoJoe = null;
+
+    @BeforeClass
+    public static void setup() {
+        logger.debug("Getting auth token..");
+        try {
+            //calls uddi-tck-base//rc/main/resources/uddi_data/joepublisher
+            //setups up a JUDDI user account
+            api010.saveJoePublisher();
+            
+            //login as joe
+            authInfoJoe = TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+            //makes tmodel uddi:uddi.joepublisher.com:keygenerator
+            tckTModel.saveJoePublisherTmodel(authInfoJoe);
+            
+            //saves a signed business, no services
+            //key = uddi:uddi.joepublisher.com:businessone
+            tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+            
+            //service key = uddi:uddi.joepublisher.com:serviceone
+            //bt = uddi:uddi.joepublisher.com:bindingone
+            tckBusinessService.saveJoePublisherService(authInfoJoe);
+            
+            
+            //tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+            
+            
+            //makes subscription key=uddi:uddi.joepublisher.com:subscriptionone
+            //find exact match on "Service One"
+            //callback binding key=empty string
+            tckSubscription.saveJoePublisherSubscription(authInfoJoe);
+            
+            
+            tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+           
+            
+            
+            
+            
+            
+            //tckSubscription.getJoePublisherSubscriptionResults(authInfoJoe);
+        } catch (RemoteException e) {
+            logger.error(e.getMessage(), e);
+            Assert.fail("Could not obtain authInfo token.");
+        }
+    }
+
+    @Test
+    public void testGetSubscriptionResults()
+            throws ConfigurationException, MalformedURLException, DispositionReportFaultMessage, DatatypeConfigurationException {
+        SubscriptionNotifier notifier = new SubscriptionNotifier();
+        notifier.cancel();
+        Collection<Subscription> subscriptions = notifier.getAllAsyncSubscriptions();
+        Assert.assertEquals(1, subscriptions.size());
+        Subscription subscription = subscriptions.iterator().next();
+        GetSubscriptionResults getSubscriptionResults = notifier.buildGetSubscriptionResults(subscription, new Date(new Date().getTime() + 60000l));
+        getSubscriptionResults.setSubscriptionKey(subscription.getSubscriptionKey());
+        UddiEntityPublisher publisher = new UddiEntityPublisher();
+        publisher.setAuthorizedName(subscription.getAuthorizedName());
+        SubscriptionResultsList resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
+        logger.info("Expecting the resultList to be null: " + resultList.getServiceList());
+        Assert.assertNull(resultList.getServiceList());
+        tckBusinessService.updateJoePublisherService(authInfoJoe, "updated description");
+        resultList = notifier.getSubscriptionImpl().getSubscriptionResults(getSubscriptionResults, publisher);
+        //We're expecting a changed service
+        logger.info("Expecting the resultList to have 1 service: " + resultList.getServiceList());
+        Assert.assertNotNull(resultList.getServiceList());
+        //We should detect these changes.
+        boolean hasChanges = notifier.resultListContainsChanges(resultList);
+        Assert.assertTrue(hasChanges);
+        System.out.print(resultList);
+        notifier.notify(getSubscriptionResults, resultList, new Date());
+    }
+
+    @AfterClass
+    public static void teardown() {
+        tckSubscription.deleteJoePublisherSubscription(authInfoJoe);
+        //tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+        tckBusinessService.deleteJoePublisherService(authInfoJoe);
+        tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+        tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+    }
 }
diff --git a/juddi-core/src/test/resources/juddiv3.properties b/juddi-core/src/test/resources/juddiv3.properties
index 640e067..1ae5489 100644
--- a/juddi-core/src/test/resources/juddiv3.properties
+++ b/juddi-core/src/test/resources/juddiv3.properties
@@ -120,4 +120,9 @@
 
 #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 true4
+
+
+
+#Since 3.1.5 the maxium ammount of returned subscription entities allowed
+juddi.subscription.maxentities = 1000
\ No newline at end of file
diff --git a/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties b/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties
index 00e9bc2..c5a5d41 100644
--- a/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties
+++ b/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties
@@ -130,4 +130,7 @@
 
 #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
diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCreatebulk.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCreatebulk.java
index 040c066..3a6cb6e 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCreatebulk.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCreatebulk.java
@@ -9,7 +9,7 @@
 import javax.xml.datatype.XMLGregorianCalendar;

 import org.apache.juddi.api_v3.AccessPointType;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.apache.juddi.v3_service.JUDDIApiPortType;

@@ -22,19 +22,18 @@
  * @author Alex

  */

 public class UddiCreatebulk {

-    

+

     private static UDDISecurityPortType security = null;

     private static JUDDIApiPortType juddiApi = null;

     private static UDDIPublicationPortType publish = null;

-    

+

     public UddiCreatebulk() {

         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -46,7 +45,7 @@
             e.printStackTrace();

         }

     }

-    

+

     public void publish() {

         try {

             // Setting up the values to get an authentication token for the 'root' user ('root' user has admin privileges

@@ -58,10 +57,10 @@
             // Making API call that retrieves the authentication token for the 'root' user.

             AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);

             System.out.println("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());

-            

-            int servicesPerBusiness=5;

-            int businesses=15;

-            

+

+            int servicesPerBusiness = 5;

+            int businesses = 15;

+

             DatatypeFactory df = DatatypeFactory.newInstance();

             GregorianCalendar gcal = new GregorianCalendar();

             gcal.setTimeInMillis(System.currentTimeMillis());

@@ -101,38 +100,38 @@
                     kr.setTModelKey(UDDIConstants.TRANSPORT_HTTP);

                     kr.setKeyName("keyname1");

                     kr.setKeyValue("myvalue1");

-                    

+

                     myBindingTemplate.getCategoryBag().getKeyedReference().add(kr);

-                    

+

                     KeyedReferenceGroup krg = new KeyedReferenceGroup();

                     krg.setTModelKey(UDDIConstants.TRANSPORT_HTTP);

                     kr = new KeyedReference();

                     kr.setTModelKey(UDDIConstants.PROTOCOL_SSLv3);

                     kr.setKeyName("keyname1grp");

                     kr.setKeyValue("myvalue1grp");

-                    

+

                     krg.getKeyedReference().add(kr);

                     myBindingTemplate.getCategoryBag().getKeyedReferenceGroup().add(krg);

-                    

-                    

+

+

                     myService.setCategoryBag(new CategoryBag());

-                    

+

                     kr = new KeyedReference();

                     kr.setTModelKey(UDDIConstants.TRANSPORT_HTTP);

                     kr.setKeyName("Servicekeyname2grp");

                     kr.setKeyValue("Servicemyvalue2grp");

                     myService.getCategoryBag().getKeyedReference().add(kr);

-                    

+

                     krg = new KeyedReferenceGroup();

                     krg.setTModelKey(UDDIConstants.TRANSPORT_HTTP);

                     kr = new KeyedReference();

                     kr.setTModelKey(UDDIConstants.TRANSPORT_HTTP);

                     kr.setKeyName("keyname1grp");

                     kr.setKeyValue("myvalue1grp");

-                    

+

                     krg.getKeyedReference().add(kr);

                     myService.getCategoryBag().getKeyedReferenceGroup().add(krg);

-                    

+

                     AccessPoint accessPoint = new AccessPoint();

                     accessPoint.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());

                     accessPoint.setValue("http://example.org/services/myservice" + i + k + "?wsdl");

@@ -155,8 +154,8 @@
                     od.getOverviewURL().setValue("www.apache.org");

                     tii.getInstanceDetails().getOverviewDoc().add(od);

                     myBindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().add(tii);

-                    

-                    

+

+

                     BindingTemplates myBindingTemplates = new BindingTemplates();

                     myBindingTemplates.getBindingTemplate().add(myBindingTemplate);

                     myService.setBindingTemplates(myBindingTemplates);

@@ -179,7 +178,7 @@
             e.printStackTrace();

         }

     }

-    

+

     public static void main(String args[]) {

         UddiCreatebulk sp = new UddiCreatebulk();

         sp.publish();

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCustodyTransfer.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCustodyTransfer.java
index bc6408f..11a4234 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCustodyTransfer.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiCustodyTransfer.java
@@ -12,7 +12,8 @@
 import javax.xml.ws.Endpoint;

 import javax.xml.ws.Holder;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

+

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.apache.juddi.v3_service.JUDDIApiPortType;

@@ -45,10 +46,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureBusiness.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureBusiness.java
index b27cf03..7ed88f8 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureBusiness.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureBusiness.java
@@ -11,7 +11,7 @@
 import org.apache.juddi.api_v3.AccessPointType;

 import org.apache.juddi.api_v3.Publisher;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.crypto.DigSigUtil;

 import org.apache.juddi.v3.client.transport.Transport;

@@ -34,10 +34,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -92,13 +91,13 @@
             ob.getName().add(name);

             sb.getBusinessEntity().add(ob);

             BusinessDetail saveBusiness = publish.saveBusiness(sb);

-            

+

             System.out.println("business created with key " + saveBusiness.getBusinessEntity().get(0).getBusinessKey());

 

-            

+

             BusinessEntity be = saveBusiness.getBusinessEntity().get(0);//findBusiness.getBusinessInfos().getBusinessInfo().get(0));

             DigSigUtil.JAXB_ToStdOut(be);

-            

+

             be.getSignature().clear();

             //DigSigUtil.JAXB_ToStdOut(be);

             System.out.println("signing");

@@ -112,7 +111,7 @@
             publish.saveBusiness(sb);

             System.out.println("saved, fetching");

 

-           // findBusiness = GetBusinessList(token);

+            // findBusiness = GetBusinessList(token);

             GetBusinessDetail gb = new GetBusinessDetail();

             gb.setAuthInfo(token);

             gb.getBusinessKey().add(be.getBusinessKey());

@@ -284,7 +283,6 @@
         }

     }

 

-    

     private enum AuthStyle {

 

         HTTP_BASIC,

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureSearch.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureSearch.java
index 254a9ea..fe37226 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureSearch.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureSearch.java
@@ -11,7 +11,7 @@
 import org.apache.juddi.api_v3.AccessPointType;

 import org.apache.juddi.api_v3.Publisher;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.crypto.DigSigUtil;

 import org.apache.juddi.v3.client.transport.Transport;

@@ -34,10 +34,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -85,8 +84,7 @@
             n.setValue("%");

             fs.getName().add(n);

             ServiceList findService = inquiry.findService(fs);

-            for (int i =0; i < findService.getServiceInfos().getServiceInfo().size(); i++)

-            {

+            for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) {

                 System.out.println(ListToString(findService.getServiceInfos().getServiceInfo().get(i).getName()));

             }

         } catch (Exception e) {

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureService.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureService.java
index a24287f..c7e2bf2 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureService.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureService.java
@@ -7,16 +7,13 @@
 import java.util.List;

 import java.util.Properties;

 import java.util.concurrent.atomic.AtomicReference;

-

 import org.apache.juddi.api_v3.AccessPointType;

-import org.apache.juddi.api_v3.Publisher;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.crypto.DigSigUtil;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.uddi.api_v3.*;

-import org.uddi.v3_service.DispositionReportFaultMessage;

 import org.uddi.v3_service.UDDIInquiryPortType;

 import org.uddi.v3_service.UDDIPublicationPortType;

 import org.uddi.v3_service.UDDISecurityPortType;

@@ -34,10 +31,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -146,8 +142,8 @@
              */

             System.out.println("this is the real test =====================");

 

-           // BusinessList findBusiness = GetBusinessList(token);

-            

+            // BusinessList findBusiness = GetBusinessList(token);

+

             BusinessService be = null;

             be = GetBusinessDetails();//findBusiness.getBusinessInfos().getBusinessInfo().get(0));

             be.getSignature().clear();

@@ -163,7 +159,7 @@
             publish.saveService(sb);

             System.out.println("saved, fetching");

 

-           // findBusiness = GetBusinessList(token);

+            // findBusiness = GetBusinessList(token);

             be = GetBusinessDetails();//findBusiness.getBusinessInfos().getBusinessInfo().get(0));

             DigSigUtil.JAXB_ToStdOut(be);

             System.out.println("verifing");

@@ -333,7 +329,7 @@
     }

 

     private BusinessService GetBusinessDetails() throws Exception {

-     //   BusinessInfo get

+        //   BusinessInfo get

         GetServiceDetail r = new GetServiceDetail();

         //GetBusinessDetail r = new GetBusinessDetail();

         r.getServiceKey().add("uddi:juddi.apache.org:da314f49-b84f-4ede-a434-0b0178632f10");

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureTmodel.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureTmodel.java
index be98aa4..afdfe41 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureTmodel.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiDigitalSignatureTmodel.java
@@ -11,7 +11,7 @@
 import org.apache.juddi.api_v3.AccessPointType;

 import org.apache.juddi.api_v3.Publisher;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.crypto.DigSigUtil;

 import org.apache.juddi.v3.client.transport.Transport;

@@ -34,10 +34,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -146,8 +145,8 @@
              */

             System.out.println("this is the real test =====================");

 

-           // BusinessList findBusiness = GetBusinessList(token);

-            

+            // BusinessList findBusiness = GetBusinessList(token);

+

             TModel be = GetBusinessDetails();//findBusiness.getBusinessInfos().getBusinessInfo().get(0));

             be.getSignature().clear();

             //DigSigUtil.JAXB_ToStdOut(be);

@@ -162,7 +161,7 @@
             publish.saveTModel(sb);

             System.out.println("saved, fetching");

 

-           // findBusiness = GetBusinessList(token);

+            // findBusiness = GetBusinessList(token);

             be = GetBusinessDetails();//findBusiness.getBusinessInfos().getBusinessInfo().get(0));

             DigSigUtil.JAXB_ToStdOut(be);

             System.out.println("verifing");

@@ -332,7 +331,7 @@
     }

 

     private TModel GetBusinessDetails() throws Exception {

-     //   BusinessInfo get

+        //   BusinessInfo get

         GetTModelDetail r = new GetTModelDetail();

         r.getTModelKey().add("uddi:juddi.apache.org:23748881-bb2f-4896-8283-4a15be1d0bc1");

         return inquiry.getTModelDetail(r).getTModel().get(0);

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindBinding.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindBinding.java
index 11910ea..4177d57 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindBinding.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindBinding.java
@@ -9,7 +9,7 @@
 import javax.xml.datatype.XMLGregorianCalendar;

 import org.apache.juddi.api_v3.AccessPointType;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.apache.juddi.v3_service.JUDDIApiPortType;

@@ -33,10 +33,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java
new file mode 100644
index 0000000..fd9a950
--- /dev/null
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiFindService.java
@@ -0,0 +1,79 @@
+/*

+ * To change this template, choose Tools | Templates

+ * and open the template in the editor.

+ */

+package uddi.createbulk;

+

+import javax.xml.bind.JAXB;

+import org.apache.juddi.v3.client.config.UDDIClient;

+import org.apache.juddi.v3.client.config.UDDIClientContainer;

+import org.apache.juddi.v3.client.transport.Transport;

+import org.apache.juddi.v3_service.JUDDIApiPortType;

+import org.uddi.api_v3.*;

+import org.uddi.v3_service.UDDIInquiryPortType;

+import org.uddi.v3_service.UDDIPublicationPortType;

+import org.uddi.v3_service.UDDISecurityPortType;

+

+/**

+ *

+ * @author Alex

+ */

+public class UddiFindService {

+

+    private static UDDISecurityPortType security = null;

+    private static JUDDIApiPortType juddiApi = null;

+    private static UDDIPublicationPortType publish = null;

+    private static UDDIInquiryPortType inquiry = null;

+

+    public UddiFindService() {

+        try {

+            // create a manager and read the config in the archive; 

+            // you can use your config file name

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

+            // register the clerkManager with the client side container

+            UDDIClientContainer.addClient(clerkManager);

+            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            // supply the nodeName (defined in your uddi.xml.

+            // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

+            Transport transport = clerkManager.getTransport("default");

+            // Now you create a reference to the UDDI API

+            security = transport.getUDDISecurityService();

+            juddiApi = transport.getJUDDIApiService();

+            publish = transport.getUDDIPublishService();

+            inquiry = transport.getUDDIInquiryService();

+        } catch (Exception e) {

+            e.printStackTrace();

+        }

+    }

+

+    public void find() {

+        try {

+            // Setting up the values to get an authentication token for the 'root' user ('root' user has admin privileges

+            // and can save other publishers).

+            GetAuthToken getAuthTokenRoot = new GetAuthToken();

+            getAuthTokenRoot.setUserID("root");

+            getAuthTokenRoot.setCred("root");

+

+            // Making API call that retrieves the authentication token for the 'root' user.

+            AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);

+            System.out.println("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());

+

+            GetServiceDetail fs = new GetServiceDetail();

+            fs.setAuthInfo(rootAuthToken.getAuthInfo());

+            fs.getServiceKey().add("mykey");

+            ServiceDetail serviceDetail = inquiry.getServiceDetail(fs);

+            if (serviceDetail == null || serviceDetail.getBusinessService().isEmpty()) {

+                System.out.println("mykey is not registered");

+            } else {

+                JAXB.marshal(serviceDetail, System.out);

+            }

+        } catch (Exception e) {

+            e.printStackTrace();

+        }

+    }

+

+    public static void main(String args[]) {

+        UddiFindService sp = new UddiFindService();

+        sp.find();

+    }

+}

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiRelatedBusinesses.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiRelatedBusinesses.java
index 3e30b30..771afef 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiRelatedBusinesses.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiRelatedBusinesses.java
@@ -11,7 +11,7 @@
 import javax.xml.datatype.XMLGregorianCalendar;

 import javax.xml.ws.Holder;

 import org.apache.juddi.api_v3.AccessPointType;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.apache.juddi.v3_service.JUDDIApiPortType;

@@ -33,10 +33,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -105,13 +104,13 @@
                 pa.setKeyedReference(new KeyedReference());

                 pa.getKeyedReference().setKeyName("Subsidiary");

                 pa.getKeyedReference().setKeyValue("parent-child");

-                

+

                 pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");

                 x.value = new ArrayList<PublisherAssertion>();

                 x.value.add(pa);

                 publish.setPublisherAssertions(rootAuthToken.getAuthInfo(), x);

-                

-                

+

+

                 x = new Holder<List<PublisherAssertion>>();

                 pa = new PublisherAssertion();

                 pa.setFromKey(myBusKey1);

@@ -119,7 +118,7 @@
                 pa.setKeyedReference(new KeyedReference());

                 pa.getKeyedReference().setKeyName("Subsidiary");

                 pa.getKeyedReference().setKeyValue("parent-child");

-                

+

                 pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");

                 x.value = new ArrayList<PublisherAssertion>();

                 x.value.add(pa);

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribe.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribe.java
index 5826d17..3e1add5 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribe.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribe.java
@@ -12,7 +12,7 @@
 import javax.xml.ws.Endpoint;

 import javax.xml.ws.Holder;

 import org.apache.juddi.v3.client.UDDIConstants;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.apache.juddi.v3_service.JUDDIApiPortType;

@@ -42,10 +42,9 @@
         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -233,7 +232,7 @@
         instanceInfo.setTModelKey("uddi:uddi.org:transport:http");

         bt.setTModelInstanceDetails(new TModelInstanceDetails());

         bt.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);

-        

+

         bs.getBindingTemplates().getBindingTemplate().add(bt);

 

 

@@ -279,7 +278,7 @@
             timer = timer - 5000;

         }

         ep.stop();

-        if (callbackRecieved ) {

+        if (callbackRecieved) {

             System.out.println("Callback recieved successfully");

             System.exit(0);

         } else {

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeGet.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeGet.java
new file mode 100644
index 0000000..7c63b0f
--- /dev/null
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeGet.java
@@ -0,0 +1,92 @@
+/*

+ * To change this template, choose Tools | Templates

+ * and open the template in the editor.

+ */

+package uddi.createbulk;

+

+import java.util.ArrayList;

+import java.util.GregorianCalendar;

+import java.util.List;

+import javax.xml.bind.JAXB;

+import javax.xml.datatype.DatatypeFactory;

+import javax.xml.datatype.XMLGregorianCalendar;

+import javax.xml.ws.Endpoint;

+import javax.xml.ws.Holder;

+import org.apache.juddi.v3.client.UDDIConstants;

+import org.apache.juddi.v3.client.config.UDDIClient;

+import org.apache.juddi.v3.client.config.UDDIClientContainer;

+import org.apache.juddi.v3.client.transport.Transport;

+import org.apache.juddi.v3_service.JUDDIApiPortType;

+import org.uddi.api_v3.*;

+import org.uddi.sub_v3.DeleteSubscription;

+import org.uddi.sub_v3.Subscription;

+import org.uddi.sub_v3.SubscriptionFilter;

+import org.uddi.v3_service.UDDIInquiryPortType;

+import org.uddi.v3_service.UDDIPublicationPortType;

+import org.uddi.v3_service.UDDISecurityPortType;

+import org.uddi.v3_service.UDDISubscriptionPortType;

+

+/**

+ *

+ * @author Alex

+ */

+public class UddiSubscribeGet {

+

+    private static UDDISecurityPortType security = null;

+    private static JUDDIApiPortType juddiApi = null;

+    private static UDDIPublicationPortType publish = null;

+    private static UDDIInquiryPortType uddiInquiryService = null;

+    private static UDDISubscriptionPortType uddiSubscriptionService = null;

+    boolean callbackRecieved = false;

+

+    public UddiSubscribeGet() {

+        try {

+            // create a manager and read the config in the archive; 

+            // you can use your config file name

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

+            // register the clerkManager with the client side container

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            // supply the nodeName (defined in your uddi.xml.

+            // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

+            Transport transport = clerkManager.getTransport("default");

+            // Now you create a reference to the UDDI API

+            security = transport.getUDDISecurityService();

+            juddiApi = transport.getJUDDIApiService();

+            publish = transport.getUDDIPublishService();

+            uddiInquiryService = transport.getUDDIInquiryService();

+            uddiSubscriptionService = transport.getUDDISubscriptionService();

+        } catch (Exception e) {

+            e.printStackTrace();

+        }

+    }

+

+    void go() {

+        try {

+            // Setting up the values to get an authentication token for the 'root' user ('root' user has admin privileges

+            // and can save other publishers).

+

+

+

+            GetAuthToken getAuthTokenRoot = new GetAuthToken();

+            getAuthTokenRoot.setUserID("root");

+            getAuthTokenRoot.setCred("root");

+

+            // Making API call that retrieves the authentication token for the 'root' user.

+            AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);

+            System.out.println("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());

+            List<Subscription> subscriptions = uddiSubscriptionService.getSubscriptions((rootAuthToken.getAuthInfo()));

+            for (int i = 0; i < subscriptions.size(); i++) {

+                System.out.println("===============================");

+                JAXB.marshal(subscriptions.get(i), System.out);

+            }

+        } catch (Exception e) {

+            e.printStackTrace();

+        }

+    }

+

+    public static void main(String args[]) throws Exception {

+        UddiSubscribeGet sp = new UddiSubscribeGet();

+

+        sp.go();

+    }

+}

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeValidate.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeValidate.java
index a8232e5..30b9edb 100644
--- a/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeValidate.java
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/UddiSubscribeValidate.java
@@ -11,7 +11,7 @@
 import javax.xml.datatype.DatatypeFactory;

 import javax.xml.datatype.XMLGregorianCalendar;

 import javax.xml.ws.Holder;

-import org.apache.juddi.v3.client.config.UDDIClerkManager;

+import org.apache.juddi.v3.client.config.UDDIClient;

 import org.apache.juddi.v3.client.config.UDDIClientContainer;

 import org.apache.juddi.v3.client.transport.Transport;

 import org.apache.juddi.v3_service.JUDDIApiPortType;

@@ -38,15 +38,15 @@
     private static UDDIPublicationPortType publish = null;

     private static UDDIInquiryPortType uddiInquiryService = null;

     private static UDDISubscriptionPortType uddiSubscriptionService = null;

-private static  UDDISubscriptionListenerPortType uddiSubscriptionListenerService =null;

+    private static UDDISubscriptionListenerPortType uddiSubscriptionListenerService = null;

+

     public UddiSubscribeValidate() {

         try {

             // create a manager and read the config in the archive; 

             // you can use your config file name

-            UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");

+            UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");

             // register the clerkManager with the client side container

-            UDDIClientContainer.addClerkManager(clerkManager);

-            // a ClerkManager can be a client to multiple UDDI nodes, so 

+            UDDIClientContainer.addClient(clerkManager);            // a ClerkManager can be a client to multiple UDDI nodes, so 

             // supply the nodeName (defined in your uddi.xml.

             // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml

             Transport transport = clerkManager.getTransport("default");

@@ -56,7 +56,7 @@
             publish = transport.getUDDIPublishService();

             uddiInquiryService = transport.getUDDIInquiryService();

             uddiSubscriptionService = transport.getUDDISubscriptionService();

-             uddiSubscriptionListenerService = transport.getUDDISubscriptionListenerService();

+            uddiSubscriptionListenerService = transport.getUDDISubscriptionListenerService();

         } catch (Exception e) {

             e.printStackTrace();

         }

@@ -87,8 +87,8 @@
                 req.setSubscriptionKey("uddi:juddi.apache.org:72619170-d391-41cb-99a0-238cb0b76eb9");

                 req.setCoveragePeriod(new CoveragePeriod());

                 req.getCoveragePeriod().setEndPoint(xcal);

-                

-                

+

+

                 gcal = new GregorianCalendar();

                 gcal.add(Calendar.MONTH, -1);

                 req.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));

diff --git a/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java b/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java
new file mode 100644
index 0000000..eecd2a2
--- /dev/null
+++ b/juddi-examples/uddi-createbulk/src/uddi/createbulk/WsdlImport.java
@@ -0,0 +1,197 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package uddi.createbulk;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import javax.wsdl.Definition;
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+import org.apache.juddi.jaxb.PrintUDDI;
+import org.apache.juddi.v3.client.config.UDDIClerk;
+import org.apache.juddi.v3.client.config.UDDIClerkManager;
+import org.apache.juddi.v3.client.config.UDDIClientContainer;
+import org.apache.juddi.v3.client.mapping.ReadWSDL;
+import org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl;
+import org.apache.juddi.v3.client.mapping.WSDL2UDDI;
+import org.apache.juddi.v3.client.transport.Transport;
+import org.apache.juddi.v3_service.JUDDIApiPortType;
+import org.uddi.api_v3.AuthToken;
+import org.uddi.api_v3.BusinessEntity;
+import org.uddi.api_v3.BusinessService;
+import org.uddi.api_v3.BusinessServices;
+import org.uddi.api_v3.GetAuthToken;
+import org.uddi.api_v3.Name;
+import org.uddi.api_v3.SaveBusiness;
+import org.uddi.api_v3.SaveTModel;
+import org.uddi.api_v3.TModel;
+import org.uddi.v3_service.UDDIPublicationPortType;
+import org.uddi.v3_service.UDDISecurityPortType;
+
+/**
+ *
+ * @author Alex O'Ree
+ */
+public class WsdlImport {
+
+    static PrintUDDI<TModel> pTModel = new PrintUDDI<TModel>();
+    static Properties properties = new Properties();
+    static String wsdlURL = null;
+    private static UDDISecurityPortType security = null;
+    private static JUDDIApiPortType juddiApi = null;
+    private static UDDIPublicationPortType publish = null;
+
+    public static void main(String[] args) throws Exception {
+
+        // create a manager and read the config in the archive; 
+        // you can use your config file name
+        UDDIClerkManager clerkManager = new UDDIClerkManager("META-INF/simple-publish-uddi.xml");
+        // register the clerkManager with the client side container
+        UDDIClientContainer.addClerkManager(clerkManager);
+        // a ClerkManager can be a client to multiple UDDI nodes, so 
+        // supply the nodeName (defined in your uddi.xml.
+        // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
+        Transport transport = clerkManager.getTransport("default");
+        // Now you create a reference to the UDDI API
+        security = transport.getUDDISecurityService();
+        publish = transport.getUDDIPublishService();
+
+        //step one, get a token
+        GetAuthToken getAuthTokenRoot = new GetAuthToken();
+        getAuthTokenRoot.setUserID("uddi");
+        getAuthTokenRoot.setCred("uddi");
+
+        // Making API call that retrieves the authentication token for the 'root' user.
+        AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
+
+
+
+        //step two, identify the key used for all your stuff
+        //you must have a key generator created already
+        //here, we are assuming that you don't have one
+        URL url = new URL("http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL");
+        //http://www.bccs.uni.no/~pve002/wsdls/ebi-mafft.wsdl");
+        //http://www.webservicex.net/GenericNAICS.asmx?WSDL");
+//http://www.webservicex.net/stockquote.asmx?WSDL");
+        //http://www.webservicex.com/globalweather.asmx?WSDL");
+        //http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl");
+        String domain = url.getHost();
+        PrintUDDI<TModel> tmodelPrinter = new PrintUDDI<TModel>();
+        TModel keygen = UDDIClerk.createKeyGenator("uddi:" + domain + ":keygenerator", domain, "en");
+        //save the keygen
+        SaveTModel stm = new SaveTModel();
+        stm.setAuthInfo(rootAuthToken.getAuthInfo());
+        stm.getTModel().add(keygen);
+        System.out.println(tmodelPrinter.print(keygen));
+        //publish.saveTModel(stm);
+
+
+        //step three, we have two options
+        //1) import the wsdl's services into a brand new business
+        //2) import the wsdl's services into an existing business
+
+
+
+        //in either case, we're going to have to parse the WSDL
+
+        ReadWSDL rw = new ReadWSDL();
+        Definition wsdlDefinition = rw.readWSDL(url);
+
+        properties.put("keyDomain", domain);
+        properties.put("businessName", domain);
+        properties.put("serverName", url.getHost());
+        properties.put("serverPort", url.getPort());
+        wsdlURL = wsdlDefinition.getDocumentBaseURI();
+        WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
+        BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
+        @SuppressWarnings("unchecked")
+        Map<QName, PortType> portTypes = (Map<QName, PortType>) wsdlDefinition.getAllPortTypes();
+        Set<TModel> portTypeTModels = wsdl2UDDI.createWSDLPortTypeTModels(wsdlURL, portTypes);
+        Map allBindings = wsdlDefinition.getAllBindings();
+        Set<TModel> createWSDLBindingTModels = wsdl2UDDI.createWSDLBindingTModels(wsdlURL, allBindings);
+        //When parsing a WSDL, there's really two things going on
+        //1) convert a bunch of stuff (the portTypes) to tModels
+        //2) convert the service definition to a BusinessService
+
+        //Since the service depends on the tModel, we have to save the tModels first
+        SaveTModel tms = new SaveTModel();
+        tms.setAuthInfo(rootAuthToken.getAuthInfo());
+
+        TModel[] tmodels = portTypeTModels.toArray(new TModel[0]);
+        for (int i = 0; i < tmodels.length; i++) {
+            System.out.println(tmodelPrinter.print(tmodels[i]));
+            tms.getTModel().add(tmodels[i]);
+        }
+
+        tmodels = createWSDLBindingTModels.toArray(new TModel[0]);
+        for (int i = 0; i < tmodels.length; i++) {
+            System.out.println(tmodelPrinter.print(tmodels[i]));
+            tms.getTModel().add(tmodels[i]);
+        }
+
+        //publish.saveTModel(stm);
+
+
+
+        //finaly, we're ready to save all of the services defined in the WSDL
+        //again, we're creating a new business, if you have one already, look it up using the Inquiry getBusinessDetails
+
+        PrintUDDI<BusinessService> servicePrinter = new PrintUDDI<BusinessService>();
+        for (int i = 0; i < businessServices.getBusinessService().size(); i++) {
+            System.out.println(servicePrinter.print(businessServices.getBusinessService().get(i)));
+        }
+
+
+
+        SaveBusiness sb = new SaveBusiness();
+        sb.setAuthInfo(rootAuthToken.getAuthInfo());
+        BusinessEntity be = new BusinessEntity();
+        be.setBusinessKey(businessServices.getBusinessService().get(0).getBusinessKey());
+        be.getName().add(new Name());
+        be.getName().get(0).setValue(domain);
+        be.getName().get(0).setLang("en");
+        be.setBusinessServices(businessServices);
+        sb.getBusinessEntity().add(be);
+        PrintUDDI<SaveBusiness> sbp = new PrintUDDI<SaveBusiness>();
+        System.out.println("Request " + sbp.print(sb));
+       // publish.saveBusiness(sb);
+
+        //and we're done
+
+        //Be sure to report any problems to the jUDDI JIRA bug tracker at 
+        //https://issues.apache.org/jira/browse/JUDDI
+    }
+
+    private static void StripKeys(BusinessServices businessServices) {
+
+        for (int i = 0; i < businessServices.getBusinessService().size(); i++) {
+            businessServices.getBusinessService().get(i).setBusinessKey(null);
+            for (int k = 0; k < businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().size(); k++) {
+                businessServices.getBusinessService().get(i).getBindingTemplates().getBindingTemplate().get(k).setBindingKey(null);
+            }
+        }
+    }
+
+    private void someting() throws Exception{
+        URL url = new URL("http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl");
+        String domain = url.getHost();
+        ReadWSDL rw = new ReadWSDL();
+        Definition wsdlDefinition = rw.readWSDL(url);
+        properties.put("keyDomain", domain);
+        properties.put("businessName", domain);
+        properties.put("serverName", url.getHost());
+        properties.put("serverPort", url.getPort());
+        wsdlURL = wsdlDefinition.getDocumentBaseURI();
+        WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
+        BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
+        Map<QName, PortType> portTypes = (Map<QName, PortType>) wsdlDefinition.getAllPortTypes();
+        Set<TModel> portTypeTModels = wsdl2UDDI.createWSDLPortTypeTModels(wsdlURL, portTypes);
+        Map allBindings = wsdlDefinition.getAllBindings();
+        Set<TModel> createWSDLBindingTModels = wsdl2UDDI.createWSDLBindingTModels(wsdlURL, allBindings);
+    }
+}
diff --git a/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java b/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
index 5a4bcbe..5c9f630 100644
--- a/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
+++ b/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
@@ -183,7 +183,7 @@
         style = (AuthStyle) AuthStyle.valueOf((String) p.get("authtype"));

         try {

 

-            String clazz = UDDIClientContainer.getUDDIClerkManager(null).

+            String clazz = UDDIClientContainer.getUDDIClient(null).

                     getClientConfig().getUDDINode("default").getProxyTransport();

             Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);

             if (transportClass != null) {

diff --git a/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.properties b/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.properties
index 97460b4..400ef5e 100644
--- a/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.properties
+++ b/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.properties
@@ -129,4 +129,9 @@
 
 #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
diff --git a/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java b/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java
index 9a0b736..cc7aaed 100644
--- a/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java
+++ b/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java
@@ -284,6 +284,10 @@
 		try {
 			Subscription subIn = (Subscription)EntityCreator.buildFromDoc(subscriptionXML, "org.uddi.sub_v3");
 			List<Subscription> subscriptionList = new ArrayList<Subscription>();
+                        subIn.setSubscriptionKey(subscriptionKey);
+                        if (subIn.getBindingKey()!=null && subIn.getBindingKey().length()==0){
+                                subIn.setBindingKey(null);
+                        }
 			subscriptionList.add(subIn);
 			Holder<List<Subscription>> subscriptionHolder = new Holder<List<Subscription>>();
 			subscriptionHolder.value = subscriptionList;
diff --git a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml
index 7686223..1f740c1 100644
--- a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml
+++ b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml
@@ -33,7 +33,7 @@
       </categoryBag>
     </find_service>
   </subscriptionFilter>
-  <bindingKey xmlns="urn:uddi-org:api_v3">bindingKeyOfTheClientsNotifySubscriptionListenerService</bindingKey>
+  <bindingKey xmlns="urn:uddi-org:api_v3"></bindingKey>
   <notificationInterval>P5D</notificationInterval>
   <maxEntities>1000</maxEntities>
 </subscription>
\ No newline at end of file
diff --git a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription2.xml b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription2.xml
index 655e6c9..f362921 100644
--- a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription2.xml
+++ b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription2.xml
@@ -24,7 +24,7 @@
       <businessKey>uddi:www.this.key.doesnot.exist</businessKey>
     </get_businessDetail>
   </subscriptionFilter>
-  <bindingKey xmlns="urn:uddi-org:api_v3">bindingKeyOfTheClientsNotifySubscriptionListenerService</bindingKey>
+  <bindingKey xmlns="urn:uddi-org:api_v3"></bindingKey>
   <notificationInterval>P5D</notificationInterval>
   <maxEntities>1000</maxEntities>
 </subscription>
\ No newline at end of file
diff --git a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription3.xml b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription3.xml
index 8ab4287..f7c19a7 100644
--- a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription3.xml
+++ b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription3.xml
@@ -25,7 +25,7 @@
       </categoryBag>
      </find_tModel>
   </subscriptionFilter>
-  <bindingKey xmlns="urn:uddi-org:api_v3">bindingKeyOfTheClientsNotifySubscriptionListenerService</bindingKey>
+  <bindingKey xmlns="urn:uddi-org:api_v3"></bindingKey>
   <notificationInterval>P5D</notificationInterval>
   <maxEntities>3</maxEntities>
 </subscription>
\ No newline at end of file
diff --git a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription4.xml b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription4.xml
index 1536bbd..678b45a 100644
--- a/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription4.xml
+++ b/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription4.xml
@@ -51,7 +51,7 @@
       <tModelKey>uddi:garbage.key.7</tModelKey>
      </get_tModelDetail>
   </subscriptionFilter>
-  <bindingKey xmlns="urn:uddi-org:api_v3">bindingKeyOfTheClientsNotifySubscriptionListenerService</bindingKey>
+  <bindingKey xmlns="urn:uddi-org:api_v3"></bindingKey>
   <notificationInterval>P5D</notificationInterval>
   <maxEntities>5</maxEntities>
 </subscription>
\ No newline at end of file
diff --git a/uddi-ws/src/main/java/org/uddi/api_v3/AccessPoint.java b/uddi-ws/src/main/java/org/uddi/api_v3/AccessPoint.java
index 482ffd8..0bc4172 100644
--- a/uddi-ws/src/main/java/org/uddi/api_v3/AccessPoint.java
+++ b/uddi-ws/src/main/java/org/uddi/api_v3/AccessPoint.java
@@ -29,9 +29,285 @@
 

 

 /**

- * <p>Java class for accessPoint complex type.

+ * <div style="border:none;border-top:solid #333399 1.0pt;padding:1.0pt 0in 0in 0in"><p class="AppH1" style="margin-left:0in;text-indent:0in"><a name="_Toc8974358">B<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;

+</span>Appendix B:&nbsp; Using and Extending the useType Attribute</a></p>

+

+</div>

+

+<p class="MsoBodyText">UDDI provides type information through the useType

+attribute on the following UDDI elements: accessPoint, overviewURL,

+discoveryURL, contact, address, email and phone. The useType attribute is

+intended to provide information on how to use or invoke the resource contained

+within the element.&nbsp; This Appendix establishes and explains common values and

+conventions for the useType attribute in the context of certain elements, as

+well as a model for establishing new common values and conventions.</p>

+

+<p class="AppH2" style="margin-left:0in;text-indent:0in"><a name="_Toc85908385"></a><a name="_Toc53709543"></a><a name="_Toc45096631"></a><a name="_Toc45096173"></a><a name="_Toc42047544"></a><a name="_Toc8974359">B.1<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span>accessPoint</a></p>

+

+<p class="MsoBodyText">Four common values for providing type information about

+the accessPoint are: "endPoint", "wsdlDeployment", "bindingTemplate",

+and "hostingRedirector.</p>

+

+<p class="AppH3" style="margin-left:0in;text-indent:0in"><a name="_Toc85908386"></a><a name="_Toc53709544"></a><a name="_Toc45096632"></a><a name="_Toc45096174"></a><a name="_Toc42047545">B.1.1<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;

+</span>Using the "endPoint" value</a></p>

+

+<p class="MsoBodyText">Typically, the network address of a Web service described

+by a bindingTemplate is found in the accessPoint element.&nbsp; This common behavior

+is denoted by using the string "endpoint" as the value of the

+accessPoint.&nbsp; Decorating an accessPoint with a useType="endPoint"

+signifies that a user or application can invoke a Web service at that address.&nbsp;

+A sample of such behavior is as follows:</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:example.org:catalog"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Browse catalog Web service<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="endPoint"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://www.example.org/CatalogWebService<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&nbsp;&nbsp; &lt;tModelInstanceDetails&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tModelInstanceInfo

+tModelKey="uddi:example.org:catalog_interface"/&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tModelInstanceInfo

+tModelKey="uddi:uddi.org:transport:http"/&gt;<br>

+&nbsp;&nbsp; &lt;/tModelInstanceDetails&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="codeSample">&nbsp;</p>

+

+<p class="MsoBodyText">In the example above, a client would be able to parse the

+bindingTemplate and discover the end point of the Web service itself.&nbsp; However,

+the information about how to invoke that Web service would be modeled using

+tModels.&nbsp; All interface information about that service would be represented by

+the tModelInstanceInfo structures contained as children of the bindingTemplate.</p>

+

+<p class="MsoBodyText">The client knows the transport of the accessPoint either

+by checking to see if a protocol tModel has been associated with the

+bindingTemplate or inspecting the URI prefix.&nbsp; In the example above, the http

+transport was used, denoted by the tModelInstanceInfo.</p>

+

+<span style="font-size:10.0pt;font-family:Arial;letter-spacing:-.25pt"><br style="page-break-before:always" clear="all">

+</span>

+

+<p class="MsoBodyText">&nbsp;</p>

+

+<p class="MsoBodyText">UDDI RECOMMENDS that endpoints for phone, fax and modem

+communication follow the guidelines outlined in RFC 2806 <i>URLs for Telephone

+Calls</i><a href="#_ftn51" name="_ftnref51" title=""><span class="MsoFootnoteReference"><span class="MsoFootnoteReference"><span style="font-size:10.0pt;letter-spacing:-.25pt">[51]</span></span></span></a>.&nbsp;

+Following such a convention for a phone number accessPoint would result in the

+following bindingTemplate sample:</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:example.org:catalog"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Browse catalog Web service<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="endPoint"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tel:+1-512-555-1212<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&nbsp;&nbsp; &lt;tModelInstanceDetails&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tModelInstanceInfo

+tModelKey="uddi:uddi.org:transport:telephone"/&gt;<br>

+&nbsp;&nbsp; &lt;/tModelInstanceDetails&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="MsoBodyText">&nbsp;</p>

+

+<p class="AppH3" style="margin-left:0in;text-indent:0in"><a name="_Toc85908387"></a><a name="_Toc53709545"></a><a name="_Toc45096633"></a><a name="_Toc45096175"></a><a name="_Toc42047546">B.1.2<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;

+</span>Using the "wsdlDeployment" value</a></p>

+

+<p class="MsoBodyText">Instead of directly providing the network address in the accessPoint,

+it is occasionally useful or necessary to provide this information through

+indirect means.&nbsp; One common scenario for such a behavior is when the

+accessPoint is embedded within a WSDL file.&nbsp; In such a scenario, the UDDI

+accessPoint contains the address of the WSDL file, and the client then must

+retrieve the WSDL file and extract the end point address from the WSDL file

+itself.</p>

+

+<p class="MsoBodyText">In this case, decorating the UDDI accessPoint with a

+useType="wsdlDeployment" is appropriate.&nbsp; A sample of such behavior is

+as follows:</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:example.org:catalog"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Browse catalog Web service<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="wsdlDeployment"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://www.example.org/CatalogWebService/catalog.wsdl<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;</p>

+

+<p class="codeSample">&nbsp;&nbsp; &lt;categoryBag&gt;<br>

+&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;keyedReference keyName="uddi-org:types:wsdl"<br>

+&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; keyValue="wsdlDeployment" <br>

+&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;

+tModelKey="uddi:uddi.org:categorization:types"/&gt; <br>

+&nbsp;&nbsp; &lt;/categoryBag&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="codeSample">&nbsp;</p>

+

+<p class="MsoBodyText">In the example above, a client would be able to parse the

+result of the bindingTemplate and determine the end point of the Web service

+within the WSDL file discovered in the accessPoint element. Note that the

+bindingTemplate has also been categorized with the "wsdlDeployment"

+value from the uddi.org:categorization:types scheme so that it can be

+discovered through a find_binding API call.</p>

+

+<p class="AppH3" style="margin-left:0in;text-indent:0in"><a name="_Toc85908388"></a><a name="_Toc53709546"></a><a name="_Toc45096634"></a><a name="_Toc45096176"></a><a name="_Toc42047547">B.1.3<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;

+</span>Using the "bindingTemplate" value</a></p>

+

+<p class="MsoBodyText">Another form of indirection uses UDDI itself to discover

+the location of the final end point.&nbsp; Categorizing a bindingTemplate with

+either "bindingTemplate" or "hostingRedirector" specifies

+that the accessPoint contains a bindingKey intended to be used in a

+get_bindingDetail API call to a UDDI registry Inquiry API Set.&nbsp; How the

+resultant bindingTemplate is interpreted depends on which one of the two

+methods described below is used.&nbsp; In the case of "bindingTemplate", a

+bindingKey refers to another binding within the same UDDI registry.</p>

+

+<p class="MsoBodyText">For example, suppose tempuri.com, the well known but

+fictitious maker of crispy batter coating for fried foods, contracts with the

+equally fictitious Web service hosting company ws-o-rama.com to host tempuri’s

+Web service that exposes its product catalog. Tempuri.com wishes to publish a

+bindingTemplate for this service in the UDDI Business Registry, but wishes to

+leave the details of the technical implementation and its description up to

+ws-o-rama.com who may wish to change them over time. To do this, tempuri.com

+and ws-o-rama.com use bindingTemplate indirection. In the UDDI Business

+Registry the bindingTemplate in tempuri’s businessEntity that describes this

+service appears as follows:</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:tempuri.com:catalog"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Browse catalog Web service<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="bindingTemplate"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uddi:ws-o-rama.com:tempuri:bt1<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="codeSample">&nbsp;</p>

+

+<p class="MsoBodyText">Here, the bindingTemplate describing tempuri’s catalog

+browsing Web service uses an accessPoint to refer to the bindingTemplate (also

+in the UDDI Business Registry) whose bindingKey is uddi:ws-o-rama.com:tempura:bt1.

+When a client does a get_bindingDetail asking for the bindingTemplate with that

+key, the following bindingTemplate is returned:</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:ws-o-rama.com:tempuri:bt1"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tempuri.com’s catalog browsing service hosted by ws-o-rama<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="endPoint"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://sf1.ws-o-rama.com/tempuri/catalog/<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&nbsp;&nbsp; &lt;tModelInstanceDetails&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tModelInstanceInfo tModelKey="uddi:..."/&gt;<br>

+&nbsp;&nbsp; &lt;/tModelInstanceDetails&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="MsoBodyText">&nbsp;</p>

+

+<p class="MsoBodyText">This bindingTemplate describes the actual Web service that

+is to be used.</p>

+

+<p class="AppH3" style="margin-left:0in;text-indent:0in"><a name="_Toc85908389"></a><a name="_Toc53709547"></a><a name="_Toc45096635"></a><a name="_Toc45096177"></a><a name="_Toc42047548">B.1.4<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;

+</span>Using the "hostingRedirector" value</a></p>

+

+<p class="MsoBodyText">It may be necessary to "hide" the network

+address of a Web service from unauthorized access.&nbsp; In this case, a useType="hostingRedirector"

+can be used to indicate that the client must follow a longer path of

+indirection to retrieve the accessPoint.&nbsp; In the bindingTemplate, the client

+will discover a bindingKey, which will lead to a bindingTemplate that contains

+the end point for a Web service which supports the UDDI get_bindingDetail Web

+Service.&nbsp; The client will then be able to re-issue the get_bindingDetail

+message with the original key, presumably with authentication, to this other

+Web service.&nbsp; Such an indirection mechanism allows a Web service to be

+discoverable but not accessible from a given node.&nbsp; </p>

+

+<p class="MsoBodyText">For example, tempuri.com uses ws-o-rama.com to host more

+than just its publicly visible catalog browsing service. In particular it has a

+number of services it does not wish to expose fully in the UDDI Business

+Registry. Instead, it wishes to keep their full definition in its private UDDI

+registry, which ws-o-rama.com also happens to host, and supply the end points

+to these Web services only to authorized inquirers. </p>

+

+<p class="MsoBodyText">In particular, tempuri has a Web service that its

+suppliers use to bill it for goods they deliver. In the UDDI Business Registry,

+tempuri publishes the following bindingTemplate, which contains a bindingKey.</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:tempuri.com:billing"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tempuri supplier billing Web service<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="hostingRedirector"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uddi:ws-o-rama.com:tempuri:bt47<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="MsoBodyText">&nbsp;</p>

+

+<p class="MsoBodyText">Here, the bindingTemplate describing tempuri’s supplier

+billing Web service uses an accessPoint to refer to the bindingTemplate (also

+in the UDDI Business Registry) whose bindingKey is uddi:ws-o-rama.com: tempuri:bt47.

+Note that the useType equals "hostingRedirector" which indicates that

+the bindingKey refers to a hostingRedirector service. When a client does a

+get_bindingDetail (on the UDDI Business Registry) asking for the

+bindingTemplate with that key, the following indirect bindingTemplate is

+returned: </p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:ws-o-rama.com:tempura:bt47"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hosting Redirector Service for Tempuri.com<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hosted by ws-o-rama.com<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="endPoint"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http://sf1.ws-o-rama.com/tempuri/uddi/inquiry<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&nbsp;&nbsp; &lt;tModelInstanceDetails&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tModelInstanceInfo <br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tModelKey="uddi:uddi.org:specification:hostingredirector"/&gt;<br>

+&nbsp;&nbsp; &lt;/tModelInstanceDetails&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="codeSample">&nbsp;</p>

+

+<p class="MsoBodyText">This bindingTemplate describes the hosting redirector Web

+service hosted for tempuri.com by ws-o-rama.com. By definition, it responds to

+the get_bindingDetail API call using SOAP over HTTP. The description in the

+bindingTemplate says it responds only to authorized requests. For authorized

+clients, invoking get_bindingDetail, passing the key of the original

+bindingTemplate (uddi:tempuri.com:billing) retrieves the following

+bindingTemplate:</p>

+

+<p class="codeSample">&lt;bindingTemplate

+bindingKey="uddi:tempuri.com:billing"&gt;<br>

+&nbsp;&nbsp; &lt;description xml:lang="en"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tempuri.com’s supplier billing browsing service<br>

+&nbsp;&nbsp; hosted by ws-o-rama.com<br>

+&nbsp;&nbsp; &lt;/description&gt;<br>

+&nbsp;&nbsp; &lt;accessPoint useType="endPoint"&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http:sf1.ws-o-rama.com/tempuri/billing/<br>

+&nbsp;&nbsp; &lt;/accessPoint&gt;<br>

+&nbsp;&nbsp; &lt;tModelInstanceDetails&gt;<br>

+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tModelInstanceInfo tModelKey="uddi:..."/&gt;<br>

+&nbsp;&nbsp; &lt;/tModelInstanceDetails&gt;<br>

+&lt;/bindingTemplate&gt;</p>

+

+<p class="MsoBodyText">&nbsp;</p>

+

+<p class="MsoBodyText">This bindingTemplate describes the actual Web service that

+is to be used.</p>

+ * <p>Java class for accessPoint complex type.</p>

  * 

- * <p>The following schema fragment specifies the expected content contained within this class.

+ * 

+ * <p>The following schema fragment specifies the expected content contained within this class.</p>

  * 

  * <pre>

  * &lt;complexType name="accessPoint">

@@ -58,7 +334,19 @@
     protected String value;

     @XmlAttribute

     protected String useType;

-

+    public AccessPoint()

+    {}

+    /**

+     * A convenience constructor<br>

+     *@see org.apache.juddi.api_v3.AccessPointType for help on useType

+     * @param value

+     * @param useType 

+     */

+    public AccessPoint(String value, String useType)

+    {

+        this.value = value;

+        this.useType = useType;

+    }

     /**

      * Gets the value of the value property.

      * 

@@ -111,5 +399,4 @@
         this.useType = value;

     }

 

-}

-
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/uddi-ws/src/main/java/org/uddi/api_v3/Name.java b/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
index 42eeef8..138a0c7 100644
--- a/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
+++ b/uddi-ws/src/main/java/org/uddi/api_v3/Name.java
@@ -58,6 +58,21 @@
     protected String lang;

 

     /**

+     * A simple convenience constructor

+     * @param value max length is 255 chars

+     * @param lang max length is 26 chars

+     */

+    public Name(String value, String lang) {

+        this.value = value;

+        this.lang = lang;

+    }

+

+    public Name() {

+        value=null;

+        lang=null;

+    }

+

+    /**

      * Gets the value of the value property.

      * 

      * @return

diff --git a/uddi-ws/src/main/java/org/uddi/sub_v3/Subscription.java b/uddi-ws/src/main/java/org/uddi/sub_v3/Subscription.java
index 5d41461..ac418c5 100644
--- a/uddi-ws/src/main/java/org/uddi/sub_v3/Subscription.java
+++ b/uddi-ws/src/main/java/org/uddi/sub_v3/Subscription.java
@@ -31,6 +31,110 @@
 

 

 /**

+ * <h1>UDDI Subscription</h1>

+ * The save_subscription API registers a request to monitor specific registry content and to have the node periodically notify the subscriber when changes are available.  Notifications are not returned synchronously with results for this API.  Only data that matches the requested subscription criteria and which changes after the point in time that the subscription request is accepted is returned to the subscriber via a notification.

+

+This API returns a duration for which this particular subscription is valid.  Depending upon the policy of the Node, subscriptions need to be renewed before the expiration date in order to insure that they remain active.  Subscriptions can also be redefined or renewed using this API.  The subscriptionKey pertaining to the subscription to be renewed must be supplied in the save_subscription invocation in order to accomplish this. This allows both renewal and changes to the subscription.  Invoking save_subscription automatically resets the expiration period for the subscription in question to a value based upon the node’s policy.

+ * <p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>authInfo</i></b>:&nbsp; This optional argument is an element

+that contains an authentication token.&nbsp; Registries that wish to restrict who

+can save a subscription typically require authInfo for this call, though this

+is a matter of node policy.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>bindingKey:</i></b>&nbsp; This optional argument of type anyURI

+specifies the <i>bindingTemplate</i> which the node is to use to deliver

+notifications to subscription listeners.&nbsp; It is only required when asynchronous

+notifications are used.&nbsp; This <i>bindingTemplate</i> MUST define either a Web

+service that implements notify_subscriptionListener (see below), or an email

+address to receive the notifications. If a notify_subscriptionListener Web

+service is identified, the node invokes it to deliver notifications.&nbsp; If an

+email address is identified, the node delivers notifications via email to the

+address supplied. When notifications are delivered via email, the body of the

+email contains the body of the SOAP message, which would have been sent to the

+notify_subscriptionListener service if that option had been chosen.<span class="MsoCommentReference"><span style="display:none">.</span></span> The

+publisher making the subscription request MUST own the bindingTemplate.&nbsp; If

+this argument is not supplied, no notifications are sent, although subscribers

+may still use the get_subscriptionResults API to obtain subscription results.&nbsp;

+See Section <a href="#_Ref536844845 ">5.5.11</a> <i>get_subscriptionResults </i>for

+details.&nbsp; If email delivery to the specified address fails, nodes MAY attempt re-delivery, but are not obligated to do so.&nbsp; Depending upon node policy, excessive

+delivery failures MAY result in cancellation of the corresponding subscription.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>brief</i></b>:&nbsp; This optional argument controls the level

+of detail returned to a subscription listener.&nbsp; The default is "false"

+when omitted. When set to "true," it indicates that the subscription

+results are to be returned to the subscriber in the form of a keyBag, listing

+all of the entities that matched the subscriptionFilter.&nbsp; Refer to Section <a href="#_Ref3401043 ">5.5.6</a> <i>Use of keyBag in Subscription,</i> for

+additional information.&nbsp; This option has no effect on the assertionStatusReport

+structure, which is returned as part of a notification when the

+subscriptionFilter specifies the get_assertionStatusReport filter criteria.&nbsp;

+See the explanation of subscriptionFilter below.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>expiresAfter</i></b>:&nbsp; This optional argument allows

+subscribers to specify the period of time for which they would like the

+subscription to exist.&nbsp; It is of the XML Schema type xsd:dateTime.&nbsp; Specifying

+a value for this argument is no guarantee that the node will accept it without

+change.&nbsp; Information on the format of expiresAfter can be found in Section <a href="#_Ref535515666 ">5.5.1.1</a> <i>Specifying Durations</i>.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>maxEntities</i></b>:&nbsp; This optional integer specifies the

+maximum number of entities in a notification returned to a subscription

+listener. If not specified, the number of entities sent is not limited, unless

+by node policy.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>subscriptionFilter</i></b>:&nbsp; This argument specifies the

+filtering criteria which limits the scope of a subscription to a subset of

+registry records. It is required except when renewing an existing subscription.

+The get_xx and find_xx APIs are all valid choices for use as a

+subscriptionFilter.&nbsp; Only one of these can be chosen for each subscription.&nbsp;

+Notifications, based on the subscriptionFilter, are sent to the subscriber if

+and only if there are changes at the node, which match this criterion during a

+notification period.&nbsp; A subscriptionFilter MUST contain exactly one of the

+allowed inquiry elements. The authInfo argument of the specified get_xx or

+find_xx API call is not required here and is ignored if specified.&nbsp; All of the

+other arguments supported with each of these inquiry APIs are valid for use

+here.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in">Specifying find_relatedBusinesses

+is useful for tracking when reciprocal relationships are formed or dissolved.&nbsp;

+Specifying get_assertionStatusReport can be used in tracking when reciprocal

+relationships (which pertain to a business owned by the subscriber) are formed,

+dissolved, or requested by the owners of some other business.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in">For a get_assertionStatusReport

+based subscription, there is a specific status value, <b>status:both_incomplete</b>,

+defined in the XML schema. When appearing in an assertionStatusItem of a

+subscriptionResultsList, status:both_incomplete indicates that the publisher

+assertion embedded in the assertionStatusItem has been deleted from both ends. </p>

+

+<p class="MsoBodyText" style="margin-left:1.0in">Note that the above handling of

+deleted publisher assertions is different from the case when a business entity,

+business service, binding template, or tModel is removed. In the latter case,

+the key to the entity in question is simply put inside a keyBag. A publisher

+assertion, on the other hand, has no key and therefore the keyBag idea is not

+applicable.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>subscriptionKey</i></b>:&nbsp; This optional argument of type <i>anyURI</i>

+identifies the subscription.&nbsp; To renew or change an existing subscription, a

+valid subscriptionKey MUST be provided. When establishing a new subscription,

+the subscriptionKey MAY also be either omitted or specified as an empty string in

+which case the node MUST assign a unique key. If subscriptionKey is specified

+for a new subscription, the key MUST conform to the registry’s policy on

+publisher-assigned keys.</p>

+

+<p class="MsoBodyText" style="margin-left:1.0in;text-indent:-.25in"><span style="font-family:Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+</span></span><b><i>notificationInterval</i></b>:&nbsp; This optional argument is

+only required when asynchronous notifications are used.&nbsp; It is of type

+xsd:duration and specifies how often change notifications are to be provided to

+a subscriber.&nbsp; If the notificationInterval specified is not acceptable due to

+node policy, then the node adjusts the value to match the next longer time

+period that is supported.&nbsp; The adjusted value is provided with the returns from

+this API.&nbsp; Also see Section <a href="#_Ref535515666 ">5.5.1.1</a> <i>Specifying

+Durations</i>.</p>

  * <p>Java class for subscription complex type.

  * 

  * <p>The following schema fragment specifies the expected content contained within this class.

@@ -54,6 +158,7 @@
  * </pre>

  * 

  * 

+ * 

  */

 @XmlAccessorType(XmlAccessType.FIELD)

 @XmlType(name = "subscription", propOrder = {