juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1548986 - in /juddi/trunk: juddi-core/src/main/java/org/apache/juddi/config/ juddi-core/src/main/java/org/apache/juddi/validation/ uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/ uddi-tck-base/src/main/resources/uddi_data/find/ uddi-t...
Date Sun, 08 Dec 2013 03:24:47 GMT
Author: alexoree
Date: Sun Dec  8 03:24:46 2013
New Revision: 1548986

URL: http://svn.apache.org/r1548986
Log:
JUDDI-575 added test cases and corrects all test cases

Modified:
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/find/findService1.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService2.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity_withProjection.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessService.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceRMI.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceSMTP.xml
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java Sun Dec  8 03:24:46 2013
@@ -346,8 +346,8 @@ public class Install {
 		validatePublish.validateNames(businessEntity.getName());
 		validatePublish.validateDiscoveryUrls(businessEntity.getDiscoveryURLs());
 		validatePublish.validateContacts(businessEntity.getContacts(),config);
-		validatePublish.validateCategoryBag(businessEntity.getCategoryBag(),config);
-		validatePublish.validateIdentifierBag(businessEntity.getIdentifierBag(),config);
+		validatePublish.validateCategoryBag(businessEntity.getCategoryBag(),config, true);
+		validatePublish.validateIdentifierBag(businessEntity.getIdentifierBag(),config, true);
 
 		org.uddi.api_v3.BusinessServices businessServices = businessEntity.getBusinessServices();
 		if (businessServices != null) {
@@ -399,7 +399,7 @@ public class Install {
 		ValidatePublish validatePublish = new ValidatePublish(rootPublisher);
 		
 		validatePublish.validateNames(businessService.getName());
-		validatePublish.validateCategoryBag(businessService.getCategoryBag(), config);
+		validatePublish.validateCategoryBag(businessService.getCategoryBag(), config,true);
 
 		org.uddi.api_v3.BindingTemplates bindingTemplates = businessService.getBindingTemplates();
 		if (bindingTemplates != null) {
@@ -449,8 +449,8 @@ public class Install {
 		
 		ValidatePublish validatePublish = new ValidatePublish(rootPublisher);
 		
-		validatePublish.validateCategoryBag(bindingTemplate.getCategoryBag(), config);
-		validatePublish.validateTModelInstanceDetails(bindingTemplate.getTModelInstanceDetails(),config);
+		validatePublish.validateCategoryBag(bindingTemplate.getCategoryBag(), config,true);
+		validatePublish.validateTModelInstanceDetails(bindingTemplate.getTModelInstanceDetails(),config,true);
 
 	}
 	

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java Sun Dec  8 03:24:46 2013
@@ -659,8 +659,8 @@ public class ValidatePublish extends Val
         validateNames(businessEntity.getName());
         validateDiscoveryUrls(businessEntity.getDiscoveryURLs());
         validateContacts(businessEntity.getContacts(), config);
-        validateCategoryBag(businessEntity.getCategoryBag(), config);
-        validateIdentifierBag(businessEntity.getIdentifierBag(), config);
+        validateCategoryBag(businessEntity.getCategoryBag(), config,false);
+        validateIdentifierBag(businessEntity.getIdentifierBag(), config,false);
         validateDescriptions(businessEntity.getDescription());
         validateBusinessServices(em, businessEntity.getBusinessServices(), businessEntity, config);
 
@@ -830,7 +830,7 @@ public class ValidatePublish extends Val
             // TODO: validate "checked" categories or category groups (see section 5.2.3 of spec)? optional to support
 
             validateNames(businessService.getName());
-            validateCategoryBag(businessService.getCategoryBag(), config);
+            validateCategoryBag(businessService.getCategoryBag(), config,false);
             validateDescriptions(businessService.getDescription());
             validateBindingTemplates(em, businessService.getBindingTemplates(), businessService, config);
         }
@@ -980,8 +980,8 @@ public class ValidatePublish extends Val
         if (bindingTemplate.getAccessPoint() != null && bindingTemplate.getHostingRedirector() != null) {
             throw new ValueNotAllowedException(new ErrorMessage("errors.bindingtemplate.NoAccessPoint"));
         }
-        validateCategoryBag(bindingTemplate.getCategoryBag(), config);
-        validateTModelInstanceDetails(bindingTemplate.getTModelInstanceDetails(), config);
+        validateCategoryBag(bindingTemplate.getCategoryBag(), config,false);
+        validateTModelInstanceDetails(bindingTemplate.getTModelInstanceDetails(), config,false);
         validateAccessPoint(em, bindingTemplate.getAccessPoint(), config);
         validateDescriptions(bindingTemplate.getDescription());
         validateHostingRedirector(em, bindingTemplate.getHostingRedirector(), config);
@@ -1064,8 +1064,8 @@ public class ValidatePublish extends Val
             throw new ValueNotAllowedException(new ErrorMessage("errors.tmodel.NoName"));
         }
 
-        validateCategoryBag(tModel.getCategoryBag(), config);
-        validateIdentifierBag(tModel.getIdentifierBag(), config);
+        validateCategoryBag(tModel.getCategoryBag(), config,false);
+        validateIdentifierBag(tModel.getIdentifierBag(), config,false);
         validateDescriptions(tModel.getDescription());
         validateNameLength(tModel.getName().getValue());
         validateLang(tModel.getName().getLang());
@@ -1129,7 +1129,7 @@ public class ValidatePublish extends Val
         }
 
         try {
-            validateKeyedReference(pubAssertion.getKeyedReference(), AppConfig.getConfiguration());
+            validateKeyedReference(pubAssertion.getKeyedReference(), AppConfig.getConfiguration(), false);
         } catch (ConfigurationException ce) {
             log.error("Could not optain config. " + ce.getMessage(), ce);
         }
@@ -1242,7 +1242,7 @@ public class ValidatePublish extends Val
         }
     }
 
-    public void validateCategoryBag(org.uddi.api_v3.CategoryBag categories, Configuration config) throws DispositionReportFaultMessage {
+    public void validateCategoryBag(org.uddi.api_v3.CategoryBag categories, Configuration config, boolean isRoot) throws DispositionReportFaultMessage {
 
         // Category bag is optional
         if (categories == null) {
@@ -1257,15 +1257,15 @@ public class ValidatePublish extends Val
         }
 
         for (KeyedReferenceGroup group : groups) {
-            validateKeyedReferenceGroup(group, config);
+            validateKeyedReferenceGroup(group, config,isRoot);
         }
 
         for (KeyedReference elem : elems) {
-            validateKeyedReference(elem, config);
+            validateKeyedReference(elem, config,isRoot);
         }
     }
 
-    public void validateIdentifierBag(org.uddi.api_v3.IdentifierBag identifiers, Configuration config) throws DispositionReportFaultMessage {
+    public void validateIdentifierBag(org.uddi.api_v3.IdentifierBag identifiers, Configuration config, boolean isRoot) throws DispositionReportFaultMessage {
 
         // Identifier bag is optional
         if (identifiers == null) {
@@ -1279,11 +1279,11 @@ public class ValidatePublish extends Val
         }
 
         for (org.uddi.api_v3.KeyedReference keyedRef : keyedRefList) {
-            validateKeyedReference(keyedRef, config);
+            validateKeyedReference(keyedRef, config,isRoot);
         }
     }
 
-    public void validateKeyedReferenceGroup(KeyedReferenceGroup krg, Configuration config) throws DispositionReportFaultMessage {
+    public void validateKeyedReferenceGroup(KeyedReferenceGroup krg, Configuration config, boolean isRoot) throws DispositionReportFaultMessage {
         // Keyed reference groups must contain a tModelKey
     	if (log.isDebugEnabled()) {
             log.debug("validateKeyedReferenceGroup");
@@ -1297,6 +1297,16 @@ public class ValidatePublish extends Val
         krg.setTModelKey(tmodelKey);
         validateKeyLength(tmodelKey);
 
+                boolean checkRef = false;
+        try {
+            checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
+        } catch (Exception ex) {
+            log.warn("Error caught reading " + Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY + " from config file", ex);
+        }
+        if (checkRef && !isRoot){
+                this.verifyTModelKeyExists(tmodelKey);
+        }
+        
         boolean checked = verifyTModelKeyExistsAndChecked(tmodelKey, config);
 
         if (checked) {
@@ -1304,13 +1314,13 @@ public class ValidatePublish extends Val
 	        // Should being empty raise an error?
 	        if (keyedRefs != null && keyedRefs.size() > 0) {
 	            for (KeyedReference keyedRef : keyedRefs) {
-	                validateKeyedReference(keyedRef, config);
+	                validateKeyedReference(keyedRef, config, isRoot);
 	            }
 	        }
         }
     }
 
-    public void validateKeyedReference(KeyedReference kr, Configuration config) throws DispositionReportFaultMessage {
+    public void validateKeyedReference(KeyedReference kr, Configuration config, boolean isRoot) throws DispositionReportFaultMessage {
     	if (log.isDebugEnabled()) {
             log.debug("validateKeyedReference");
         }
@@ -1331,6 +1341,17 @@ public class ValidatePublish extends Val
         validateKeyValue(kr.getKeyValue());
         validateKeyName(kr.getKeyName());
 
+        
+        boolean checkRef = false;
+        try {
+            checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
+        } catch (Exception ex) {
+            log.warn("Error caught reading " + Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY + " from config file", ex);
+        }
+        if (checkRef && !isRoot){
+                this.verifyTModelKeyExists(tmodelKey);
+        }
+        
         String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
         // Per section 6.2.2.1 of the specification, no publishers (except the root) are allowed to use the node categorization tmodelKey
         if (Constants.NODE_CATEGORY_TMODEL.equalsIgnoreCase(kr.getTModelKey())) {
@@ -1340,7 +1361,7 @@ public class ValidatePublish extends Val
         }
     }
 
-    public void validateTModelInstanceDetails(org.uddi.api_v3.TModelInstanceDetails tmodelInstDetails, Configuration config) throws DispositionReportFaultMessage {
+    public void validateTModelInstanceDetails(org.uddi.api_v3.TModelInstanceDetails tmodelInstDetails, Configuration config, boolean isRoot) throws DispositionReportFaultMessage {
     	if (log.isDebugEnabled()) {
             log.debug("validateTModelInstanceDetails");
         }
@@ -1356,11 +1377,11 @@ public class ValidatePublish extends Val
         }
 
         for (org.uddi.api_v3.TModelInstanceInfo tmodelInstInfo : tmodelInstInfoList) {
-            validateTModelInstanceInfo(tmodelInstInfo, config);
+            validateTModelInstanceInfo(tmodelInstInfo, config,isRoot);
         }
     }
 
-    public void validateTModelInstanceInfo(org.uddi.api_v3.TModelInstanceInfo tmodelInstInfo, Configuration config) throws DispositionReportFaultMessage {
+    public void validateTModelInstanceInfo(org.uddi.api_v3.TModelInstanceInfo tmodelInstInfo, Configuration config, boolean isRoot) throws DispositionReportFaultMessage {
         // tModel Instance Info can't be null
         if (tmodelInstInfo == null) {
             throw new ValueNotAllowedException(new ErrorMessage("errors.tmodelinstinfo.NullInput"));
@@ -1374,6 +1395,16 @@ public class ValidatePublish extends Val
         // Per section 4.4: keys must be case-folded
         tmodelInstInfo.setTModelKey((tmodelInstInfo.getTModelKey().toLowerCase()));
 
+                boolean checkRef = false;
+        try {
+            checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
+        } catch (Exception ex) {
+            log.warn("Error caught reading " + Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY + " from config file", ex);
+        }
+        if (checkRef && !isRoot){
+                this.verifyTModelKeyExists(tmodelInstInfo.getTModelKey());
+        }
+        
         validateInstanceDetails(tmodelInstInfo.getInstanceDetails());
         if (log.isDebugEnabled()) {
             log.debug("validateTModelInstanceInfo");
@@ -1578,13 +1609,7 @@ public class ValidatePublish extends Val
     	if (log.isDebugEnabled()) {
             log.debug("validateAccessPoint");
         }
-        boolean checkRef = false;
-
-        try {
-            checkRef = config.getBoolean(Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY, false);
-        } catch (Exception ex) {
-            log.warn("Error caught reading " + Property.JUDDI_ENFORCE_REFERENTIAL_INTEGRITY + " from config file", ex);
-        }
+        
 
         if (value != null) {
             if (value.getValue().length() > ValidationConstants.MAX_accessPoint) {
@@ -1863,4 +1888,37 @@ public class ValidatePublish extends Val
     	}
     	return checked;
     }
+
+        private void verifyTModelKeyExists(String tmodelKey) throws ValueNotAllowedException {
+                EntityManager em = PersistenceManager.getEntityManager();
+                boolean found = false;
+                if (em == null) {
+                        log.warn(new ErrorMessage("errors.tmodel.ReferentialIntegrityNullEM"));
+                } else {
+                        Tmodel modelTModel = null;
+                        {
+                                EntityTransaction tx = em.getTransaction();
+                                try {
+
+                                        tx.begin();
+                                        modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);
+
+                                        if (modelTModel != null) {
+                                                found = true;
+                                        }
+                                        tx.commit();
+
+                                } finally {
+                                        if (tx.isActive()) {
+                                                tx.rollback();
+                                        }
+                                        em.close();
+                                }
+
+                        }
+                }
+                if (!found) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.tmodel.ReferencedKeyDoesNotExist", tmodelKey));
+                }
+        }
 }

Modified: juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java (original)
+++ juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java Sun Dec  8 03:24:46 2013
@@ -98,8 +98,9 @@ public class TckSubscription 
 			SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
 			if (result == null)
 				Assert.fail("Null result from getSubscriptionResults operation");
-
-			ServiceInfos sInfos = result.getServiceList().getServiceInfos();
+                        ServiceInfos sInfos=null;
+                        if (result.getServiceList()!=null)
+                                sInfos = result.getServiceList().getServiceInfos();
 			if (sInfos == null)
 				Assert.fail("No result from getSubscriptionResults operation");
 			List<ServiceInfo> siList = sInfos.getServiceInfo();

Modified: juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java (original)
+++ juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java Sun Dec  8 03:24:46 2013
@@ -99,8 +99,10 @@ public class TckTModel 
 		try {
 			SaveTModel st = new SaveTModel();
 			st.setAuthInfo(authInfo);
-
+                        logger.info("Loading tModel from " + tModelXml);
 			org.uddi.api_v3.TModel tmIn = (org.uddi.api_v3.TModel)EntityCreator.buildFromDoc(tModelXml, "org.uddi.api_v3");
+                        if (tmIn==null)
+                                Assert.fail("unable to load tmodel from file!");
 			st.getTModel().add(tmIn);
 			publication.saveTModel(st);
 	

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/find/findService1.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/find/findService1.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/find/findService1.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/find/findService1.xml Sun Dec  8 03:24:46 2013
@@ -21,10 +21,10 @@
   </findQualifiers>
   <name xml:lang="en">Service One</name>
   <categoryBag>
-    <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="peaches" />
-    <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="plums" />
-    <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-      <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="peaches" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="plums" />
+    <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+      <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
   </categoryBag>
 </find_service>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService.xml Sun Dec  8 03:24:46 2013
@@ -25,8 +25,8 @@
     <bindingTemplate bindingKey="uddi:uddi.joepublisher.com:bindingone">
       <description xml:lang="en">This is the access point for service one.</description>
       <accessPoint useType="endPoint">http://businessone.com/services/serviceone</accessPoint>
-      <tModelInstanceDetails>
-        <tModelInstanceInfo tModelKey="uddi:uddi.joepublisher.com:services:serviceone:wsdlspec">
+     <tModelInstanceDetails>
+        <tModelInstanceInfo tModelKey="uddi:uddi.org:transport:telephone">
           <description xml:lang="en">The wsdl for this service: service one</description>
           <instanceDetails>
             <overviewDoc>
@@ -38,15 +38,15 @@
         </tModelInstanceInfo>
       </tModelInstanceDetails>
 	  <categoryBag>
-	    <keyedReference tModelKey="uddi:tmodelkey:categories:bindings" keyName="category" keyValue="accesspoint" />
+	    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="accesspoint" />
 	  </categoryBag>
     </bindingTemplate>
   </bindingTemplates>
   <categoryBag>
-    <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="peaches" />
-    <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="plums" />
-    <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-      <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="peaches" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="plums" />
+    <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+      <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
   </categoryBag>
 </businessService>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService2.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService2.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService2.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/businessService2.xml Sun Dec  8 03:24:46 2013
@@ -26,7 +26,7 @@
       <description xml:lang="en">This is the access point for service two.</description>
       <accessPoint useType="endPoint">http://businessone.com/services/servicetwo</accessPoint>
       <tModelInstanceDetails>
-        <tModelInstanceInfo tModelKey="uddi:uddi.joepublisher.com:services:servicetwo:wsdlspec">
+        <tModelInstanceInfo tModelKey="uddi:uddi.org:transport:telephone">
           <description xml:lang="en">The wsdl for this service: service two</description>
           <instanceDetails>
             <overviewDoc>
@@ -43,10 +43,10 @@
     </bindingTemplate>
   </bindingTemplates>
   <categoryBag>
-    <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="peaches" />
-    <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="plums" />
-    <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-      <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="peaches" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="plums" />
+    <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+      <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
-  </categoryBag>
+  </categoryBag>-->
 </businessService>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity.xml Sun Dec  8 03:24:46 2013
@@ -36,7 +36,7 @@
       </address>
     </contact>
   </contacts>
-  <categoryBag>
+  z<categoryBag>
     <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="bananas" />
     <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="kiwi" />
     <keyedReference tModelKey="uddi:tmodelkey:categories:music" keyName="category" keyValue="progressive-rock" />

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity_withProjection.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity_withProjection.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity_withProjection.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessEntity_withProjection.xml Sun Dec  8 03:24:46 2013
@@ -60,7 +60,7 @@
           <description xml:lang="en">This is the access point for service one.</description>
           <accessPoint useType="endPoint">http://businessone.com/services/serviceone</accessPoint>
           <tModelInstanceDetails>
-            <tModelInstanceInfo tModelKey="uddi:uddi.joepublisher.com:services:serviceone:wsdlspec">
+            <tModelInstanceInfo tModelKey="uddi:uddi.org:transport:telephone">
               <description xml:lang="en">The wsdl for this service: service one</description>
               <instanceDetails>
                 <overviewDoc>
@@ -72,15 +72,15 @@
             </tModelInstanceInfo>
           </tModelInstanceDetails>
         <categoryBag>
-          <keyedReference tModelKey="uddi:tmodelkey:categories:bindings" keyName="category" keyValue="accesspoint" />
+          <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="accesspoint" />
         </categoryBag>
         </bindingTemplate>
       </bindingTemplates>
       <categoryBag>
-        <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="peaches" />
-        <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="plums" />
-        <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-          <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+        <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="peaches" />
+        <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="plums" />
+        <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+          <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
         </keyedReferenceGroup>
       </categoryBag>
     </businessService>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessService.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessService.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessService.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/samsyndicator/businessService.xml Sun Dec  8 03:24:46 2013
@@ -25,7 +25,7 @@
       <description xml:lang="en">This is the access point for listing service.</description>
       <accessPoint useType="endPoint">http:/samco.com/services/listingservice</accessPoint>
       <tModelInstanceDetails>
-        <tModelInstanceInfo tModelKey="uddi:www.samco.com:listservice-wsdlspec">
+        <tModelInstanceInfo tModelKey="uddi:uddi.org:transport:telephone">
           <description xml:lang="en">The wsdl for this service: Listing Service</description>
           <instanceDetails>
             <overviewDoc>
@@ -37,15 +37,15 @@
         </tModelInstanceInfo>
       </tModelInstanceDetails>
 	  <categoryBag>
-	    <keyedReference tModelKey="uddi:tmodelkey:categories:bindings" keyName="category" keyValue="accesspoint" />
+	    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="accesspoint" />
 	  </categoryBag>
     </bindingTemplate>
   </bindingTemplates>
   <categoryBag>
-    <keyedReference tModelKey="uddi:tmodelkey:categories:beer" keyName="category" keyValue="lager" />
-    <keyedReference tModelKey="uddi:tmodelkey:categories:beer" keyName="category" keyValue="pilsner" />
-    <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-      <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="lager" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="pilsner" />
+    <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+      <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
   </categoryBag>
 </businessService>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscription/subscription1.xml Sun Dec  8 03:24:46 2013
@@ -25,10 +25,10 @@
       </findQualifiers>
       <name xml:lang="en">Service One</name>
       <categoryBag>
-        <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="peaches" />
-        <keyedReference tModelKey="uddi:tmodelkey:categories:fruit" keyName="category" keyValue="plums" />
-        <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-          <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+        <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="peaches" />
+        <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="plums" />
+        <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+          <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
         </keyedReferenceGroup>
       </categoryBag>
     </find_service>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml Sun Dec  8 03:24:46 2013
@@ -28,16 +28,16 @@
 	  <tModelInstanceDetails>
 		<tModelInstanceInfo tModelKey="uddi:uddi.org:transport:http" />
 	  </tModelInstanceDetails>
-	  <categoryBag>
+	  <!--<categoryBag>
 	    <keyedReference tModelKey="uddi:tmodelkey:categories:bindings" keyName="category" keyValue="secure" />
-	  </categoryBag>
+	  </categoryBag>-->
 	</bindingTemplate>
   </bindingTemplates>
-  <categoryBag>
+  <!--<categoryBag>
     <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="peaches" />
     <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="plums" />
     <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
       <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
-  </categoryBag>
+  </categoryBag>-->
 </businessService>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceRMI.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceRMI.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceRMI.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceRMI.xml Sun Dec  8 03:24:46 2013
@@ -29,15 +29,15 @@
 		<tModelInstanceInfo tModelKey="uddi:uddi.org:transport:rmi" />
 	  </tModelInstanceDetails>
 	  <categoryBag>
-	    <keyedReference tModelKey="uddi:tmodelkey:categories:bindings" keyName="category" keyValue="secure" />
+	    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="secure" />
 	  </categoryBag>
 	</bindingTemplate>
   </bindingTemplates>
   <categoryBag>
-    <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="peaches" />
-    <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="plums" />
-    <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
-      <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="peaches" />
+    <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="category" keyValue="plums" />
+    <keyedReferenceGroup tModelKey="uddi:uddi.org:transport:telephone">
+      <keyedReference tModelKey="uddi:uddi.org:transport:telephone" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
   </categoryBag>
 </businessService>

Modified: juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceSMTP.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceSMTP.xml?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceSMTP.xml (original)
+++ juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceSMTP.xml Sun Dec  8 03:24:46 2013
@@ -28,16 +28,16 @@
       <tModelInstanceDetails>
 	    <tModelInstanceInfo tModelKey="uddi:uddi.org:transport:smtp"/>
 	  </tModelInstanceDetails>
-	  <categoryBag>
+	  <!--<categoryBag>
 	    <keyedReference tModelKey="uddi:tmodelkey:categories:bindings" keyName="category" keyValue="secure" />
-	  </categoryBag>
+	  </categoryBag>-->
 	</bindingTemplate>
   </bindingTemplates>
-  <categoryBag>
+  <!--<categoryBag>
     <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="peaches" />
     <keyedReference tModelKey="uddi:tmodelkey:categories" keyName="category" keyValue="plums" />
     <keyedReferenceGroup tModelKey="uddi:tmodelkey:group">
       <keyedReference tModelKey="uddi:tmodelkey:blank" keyName="blank" keyValue="blank" />
     </keyedReferenceGroup>
-  </categoryBag>
+  </categoryBag>-->
 </businessService>

Modified: juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java?rev=1548986&r1=1548985&r2=1548986&view=diff
==============================================================================
--- juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java (original)
+++ juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java Sun Dec  8 03:24:46 2013
@@ -18,6 +18,7 @@ import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.List;
+import java.util.UUID;
 import javax.xml.bind.JAXB;
 import javax.xml.datatype.DatatypeFactory;
 import javax.xml.soap.SOAPFault;
@@ -30,8 +31,11 @@ import org.apache.commons.logging.LogFac
 import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.client.config.UDDIClient;
 import org.apache.juddi.v3.client.transport.Transport;
+import static org.apache.juddi.v3.tck.UDDI_030_BusinessEntityIntegrationTest.tckBusiness;
+import static org.apache.juddi.v3.tck.UDDI_140_NegativePublicationIntegrationTest.tckTModel;
 import org.junit.AfterClass;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.uddi.api_v3.*;
@@ -58,6 +62,8 @@ public class UDDI_141_JIRAIntegrationTes
     static UDDISubscriptionPortType subscription = null;
     static UDDIInquiryPortType inquiry = null;
     static UDDIPublicationPortType publication = null;
+        static TckTModel tckTModel               = null;
+        static TckBusiness tckBusiness      = null;
     protected static String authInfoJoe = null;
     protected static String authInfoSam = null;
     private static UDDIClient manager;
@@ -92,15 +98,18 @@ public class UDDI_141_JIRAIntegrationTes
         try {
             Transport transport = manager.getTransport();
             security = transport.getUDDISecurityService();
+            publication = transport.getUDDIPublishService();
+            inquiry = transport.getUDDIInquiryService();
+
             subscription = transport.getUDDISubscriptionService();
+              tckTModel  = new TckTModel(publication, inquiry);
+                  	 tckBusiness = new TckBusiness(publication, inquiry);
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
             authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
             Assert.assertNotNull(authInfoJoe);
             Assert.assertNotNull(authInfoSam);
 
-            publication = transport.getUDDIPublishService();
-            inquiry = transport.getUDDIInquiryService();
-
+            
 
         } catch (Exception e) {
             logger.error(e.getMessage(), e);
@@ -1009,8 +1018,353 @@ public class UDDI_141_JIRAIntegrationTes
 
     }
 
+    
+    
+    
+    
+    
+    
+    
+    
+    
     //once more without any relationship
-    //TODO binding template tmodel instance info
+            //binding template tmodel instance info
+        @Test
+        public void JIRA_575_BT() throws Exception {
+                System.out.println("JIRA_575_BT");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveBusiness sb = new SaveBusiness();
+                sb.setAuthInfo(authInfoJoe);
+                BusinessEntity be = new BusinessEntity();
+                be.getName().add(new Name());
+                be.getName().get(0).setValue("Joe's JIRA_575_BT business");
+                be.setBusinessServices(new BusinessServices());
+                BusinessService bs = new BusinessService();
+                bs.getName().add(new Name());
+                bs.getName().get(0).setValue("Joe's JIRA_575_BT service");
+                bs.setBindingTemplates(new BindingTemplates());
+                BindingTemplate bt = new BindingTemplate();
+                bt.setAccessPoint(new AccessPoint());
+                bt.getAccessPoint().setValue("http://JIRA_575_BT/UDDI_CALLBACK");
+                bt.getAccessPoint().setUseType("endPoint");
+
+                TModelInstanceInfo instanceInfo = new TModelInstanceInfo();
+                instanceInfo.setTModelKey(madeupTmodel);
+                bt.setTModelInstanceDetails(new TModelInstanceDetails());
+                bt.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);
+
+                bs.getBindingTemplates().getBindingTemplate().add(bt);
+                be.getBusinessServices().getBusinessService().add(bs);
+                sb.getBusinessEntity().add(be);
+                logger.info("setting up joe's callback business");
+                try {
+                        BusinessDetail saveBusiness = publication.saveBusiness(sb);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+
+
+        }
+
+        
+        @Test
+        public void JIRA_575_KR_Biz() throws Exception {
+                System.out.println("JIRA_575_KR_Biz");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveBusiness sb = new SaveBusiness();
+                sb.setAuthInfo(authInfoJoe);
+                BusinessEntity be = new BusinessEntity();
+                be.getName().add(new Name());
+                be.getName().get(0).setValue("Joe's JIRA_575_KR_Biz business");
+                be.setBusinessServices(new BusinessServices());
+                be.setCategoryBag(new CategoryBag());
+                be.getCategoryBag().getKeyedReference().add(new KeyedReference(madeupTmodel, "name", "val"));
+                sb.getBusinessEntity().add(be);
+                
+                try {
+                        BusinessDetail saveBusiness = publication.saveBusiness(sb);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+
+        }
+        
+        
+        @Test
+        public void JIRA_575_IDENT_Biz() throws Exception {
+                System.out.println("JIRA_575_IDENT_Biz");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveBusiness sb = new SaveBusiness();
+                sb.setAuthInfo(authInfoJoe);
+                BusinessEntity be = new BusinessEntity();
+                be.getName().add(new Name());
+                be.getName().get(0).setValue("Joe's JIRA_575_IDENT_Biz business");
+                be.setBusinessServices(new BusinessServices());
+                be.setIdentifierBag(new IdentifierBag());
+                be.getIdentifierBag().getKeyedReference().add(new KeyedReference(madeupTmodel, "name", "val"));
+                sb.getBusinessEntity().add(be);
+                
+                try {
+                        BusinessDetail saveBusiness = publication.saveBusiness(sb);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+
+        }
+        
+        
+        
+        @Test
+        public void JIRA_575_KR_TMODEL() throws Exception {
+                System.out.println("JIRA_575_KR_TMODEL");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+               SaveTModel stm = new SaveTModel();
+               stm.setAuthInfo(authInfoJoe);
+               TModel tm = new TModel();
+               tm.setName(new Name("JIRA_575_KR_TMODEL",null));
+               tm.setCategoryBag(new CategoryBag());
+               tm.getCategoryBag().getKeyedReference().add(new KeyedReference(madeupTmodel, "name", "val"));
+                try {
+                        publication.saveTModel(stm);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+        }
+
+        @Test
+        public void JIRA_575_KRGRP_TMODEL() throws Exception {
+                System.out.println("JIRA_575_KRGRP_TMODEL");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveTModel stm = new SaveTModel();
+                stm.setAuthInfo(authInfoJoe);
+                TModel tm = new TModel();
+                tm.setName(new Name("JIRA_575_KRGRP_TMODEL", null));
+                tm.setCategoryBag(new CategoryBag());
+                tm.getCategoryBag().getKeyedReferenceGroup().add(new KeyedReferenceGroup());
+                tm.getCategoryBag().getKeyedReferenceGroup().get(0).setTModelKey(madeupTmodel);
+                try {
+                        publication.saveTModel(stm);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+        }
+
+                
+        @Test
+        public void JIRA_575_KRGRP_Biz() throws Exception {
+                System.out.println("JIRA_575_KRGRP_Biz");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveBusiness sb = new SaveBusiness();
+                sb.setAuthInfo(authInfoJoe);
+                BusinessEntity be = new BusinessEntity();
+                be.getName().add(new Name());
+                be.getName().get(0).setValue("Joe's JIRA_575_KRGRP_Biz business");
+                be.setBusinessServices(new BusinessServices());
+                be.setCategoryBag(new CategoryBag());
+                //be.getCategoryBag().getKeyedReference().add(new KeyedReference(madeupTmodel, "name", "val"));
+                be.getCategoryBag().getKeyedReferenceGroup().add(new KeyedReferenceGroup());
+                be.getCategoryBag().getKeyedReferenceGroup().get(0).setTModelKey(madeupTmodel);
+                
+                sb.getBusinessEntity().add(be);
+                
+                try {
+                        BusinessDetail saveBusiness = publication.saveBusiness(sb);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+
+        }
+
+        
+        
+        
+        
+        @Test
+        public void JIRA_575_KRGRP_PA() throws Exception {
+                System.out.println("JIRA_575_KRGRP_PA");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                
+                tckTModel.saveJoePublisherTmodel(authInfoJoe);
+                tckTModel.saveSamSyndicatorTmodel(authInfoSam);
+                
+                tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
+                
+               AddPublisherAssertions apa = new AddPublisherAssertions();
+               apa.setAuthInfo(madeupTmodel);
+               PublisherAssertion pa = new PublisherAssertion();
+               pa.setKeyedReference(new KeyedReference(madeupTmodel, "name", "val"));
+               pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
+               pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
+               apa.getPublisherAssertion().add(pa);
+                try {
+                        publication.addPublisherAssertions(apa);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+        }
+
+                
+
+        
+        
+        
+                @Test
+        public void JIRA_575_SVC_KR() throws Exception {
+                System.out.println("JIRA_575_SVC_KR");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveBusiness sb = new SaveBusiness();
+                sb.setAuthInfo(authInfoJoe);
+                BusinessEntity be = new BusinessEntity();
+                be.getName().add(new Name());
+                be.getName().get(0).setValue("Joe's JIRA_575_SVC_KR business");
+                be.setBusinessServices(new BusinessServices());
+                BusinessService bs = new BusinessService();
+                bs.getName().add(new Name());
+                bs.getName().get(0).setValue("Joe's JIRA_575_SVC_KR service");
+                bs.setBindingTemplates(new BindingTemplates());
+                bs.setCategoryBag(new CategoryBag());
+                bs.getCategoryBag().getKeyedReference().add(new KeyedReference(madeupTmodel, "name", "val"));
+                
+                be.getBusinessServices().getBusinessService().add(bs);
+                sb.getBusinessEntity().add(be);
+                
+                try {
+                        BusinessDetail saveBusiness = publication.saveBusiness(sb);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+        }
+
+                
+                                @Test
+        public void JIRA_575_SVC_KRGRP() throws Exception {
+                System.out.println("JIRA_575_SVC_KRGRP");
+                String madeupTmodel = "uddi" + UUID.randomUUID().toString();
+                GetTModelDetail gtm = new GetTModelDetail();
+                gtm.setAuthInfo(authInfoJoe);
+                gtm.getTModelKey().add(madeupTmodel);
+                TModelDetail tModelDetail = null;
+                try {
+                        tModelDetail = inquiry.getTModelDetail(gtm);
+                } catch (Exception ex) {
+                }
+                Assume.assumeTrue(tModelDetail == null);
+
+                SaveBusiness sb = new SaveBusiness();
+                sb.setAuthInfo(authInfoJoe);
+                BusinessEntity be = new BusinessEntity();
+                be.getName().add(new Name());
+                be.getName().get(0).setValue("Joe's JIRA_575_SVC_KRGRP business");
+                be.setBusinessServices(new BusinessServices());
+                BusinessService bs = new BusinessService();
+                bs.getName().add(new Name());
+                bs.getName().get(0).setValue("Joe's JIRA_575_SVC_KRGRP service");
+                bs.setBindingTemplates(new BindingTemplates());
+                bs.setCategoryBag(new CategoryBag());
+                bs.getCategoryBag().getKeyedReferenceGroup().add(new KeyedReferenceGroup());
+                bs.getCategoryBag().getKeyedReferenceGroup().get(0).setTModelKey(madeupTmodel);
+                
+                
+                be.getBusinessServices().getBusinessService().add(bs);
+                sb.getBusinessEntity().add(be);
+                
+                try {
+                        BusinessDetail saveBusiness = publication.saveBusiness(sb);
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
+                        logger.error(ex.getMessage());
+                }
+        }
+    
     //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
     //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">



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


Mime
View raw message