You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2013/12/21 18:35:52 UTC

svn commit: r1552928 [3/4] - in /juddi/branches/juddi-3.3.x: juddi-core/src/test/java/org/apache/juddi/api/impl/ uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/ uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/ uddi-tck/src/test/jav...

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java?rev=1552928&r1=1552927&r2=1552928&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java Sat Dec 21 17:35:51 2013
@@ -36,36 +36,26 @@ import org.uddi.v3_service.UDDISubscript
 import com.dumbster.smtp.SimpleSmtpServer;
 import com.dumbster.smtp.SmtpMessage;
 import java.net.InetAddress;
-import java.util.List;
 import javax.xml.ws.BindingProvider;
-import org.apache.commons.codec.language.bm.Rule;
 import org.apache.juddi.v3.client.UDDIConstants;
-import static org.apache.juddi.v3.tck.TckBusiness.MARY_BUSINESS_XML;
+
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
 import org.uddi.api_v3.FindQualifiers;
 import org.uddi.api_v3.FindService;
 import org.uddi.api_v3.Name;
 import org.uddi.api_v3.ServiceList;
-import org.uddi.sub_v3.DeleteSubscription;
-import org.uddi.sub_v3.Subscription;
 
 /**
+ * Used during the Maven build process for testing against jUDDI
  * @author <a href="mailto:tcunning@apache.org">Tom Cunningham</a>
  * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
+ * @see UDDI_090_SubscriptionListenerExternalTest       
  */
 public class UDDI_090_SubscriptionListenerIntegrationTest {
 
-        public UDDI_090_SubscriptionListenerIntegrationTest() {
-                serialize = false;
-                if (System.getProperty("debug") != null
-                        && System.getProperty("debug").equalsIgnoreCase("true")) {
-                        serialize = true;
-                }
-        }
         private static Log logger = LogFactory.getLog(UDDI_090_SubscriptionListenerIntegrationTest.class);
         private static UDDISubscriptionPortType subscriptionMary = null;
         private static UDDIInquiryPortType inquiryMary = null;
@@ -76,6 +66,8 @@ public class UDDI_090_SubscriptionListen
         private static String hostname = null;
         private static UDDISubscriptionPortType subscriptionJoe = null;
         private static UDDIInquiryPortType inquiryJoe = null;
+        private static UDDIPublicationPortType publicationMary = null;
+        private static UDDIPublicationPortType publicationJoe = null;
         private static TckTModel tckTModelJoe = null;
         private static TckBusiness tckBusinessJoe = null;
         private static TckBusinessService tckBusinessServiceJoe = null;
@@ -87,16 +79,17 @@ public class UDDI_090_SubscriptionListen
         private static SimpleSmtpServer mailServer;
         private static Integer smtpPort = 25;
         private static Integer httpPort = 80;
-        private static boolean serialize = false;
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
+                tckTModelJoe.deleteCreatedTModels(authInfoJoe);
+                tckTModelMary.deleteCreatedTModels(authInfoMary);
                 manager.stop();
                 //shutting down the TCK SubscriptionListener
                 endPoint.stop();
                 endPoint = null;
         }
-        
+
         @BeforeClass
         public static void startManager() throws ConfigurationException {
                 try {
@@ -126,6 +119,17 @@ public class UDDI_090_SubscriptionListen
                         String httpEndpoint = "http://" + hostname + ":" + httpPort + "/tcksubscriptionlistener";
                         System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
                         endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
+                        int count = 0;
+                        while (!endPoint.isPublished()) {
+                                httpPort = 9600 + new Random().nextInt(99);
+                                httpEndpoint = "http://" + hostname + ":" + httpPort + "/tcksubscriptionlistener";
+                                System.out.println("Bringing up SubscriptionListener endpoint at " + httpEndpoint);
+                                endPoint = Endpoint.publish(httpEndpoint, new UDDISubscriptionListenerImpl());
+                                count++;
+                                if (count > 10) {
+                                        Assert.fail("unable to bring up endpoint");
+                                }
+                        }
 
                         manager = new UDDIClient();
                         manager.start();
@@ -137,42 +141,45 @@ public class UDDI_090_SubscriptionListen
                         UDDISecurityPortType security = transport.getUDDISecurityService();
                         authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                         authInfoMary = TckSecurity.getAuthToken(security, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
-                        Assert.assertNotNull(authInfoJoe);
+                        //Assert.assertNotNull(authInfoJoe);
 
 
 
-                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
+                        publicationJoe = transport.getUDDIPublishService();
                         inquiryJoe = transport.getUDDIInquiryService();
                         subscriptionJoe = transport.getUDDISubscriptionService();
                         if (!TckPublisher.isUDDIAuthMode()) {
-                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) publicationJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                                 TckSecurity.setCredentials((BindingProvider) inquiryJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                                 TckSecurity.setCredentials((BindingProvider) subscriptionJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                         }
 
 
-                        tckTModelJoe = new TckTModel(publication, inquiryJoe);
-                        tckBusinessJoe = new TckBusiness(publication, inquiryJoe);
-                        tckBusinessServiceJoe = new TckBusinessService(publication, inquiryJoe);
-                        tckSubscriptionListenerJoe = new TckSubscriptionListener(subscriptionJoe, publication);
+                        tckTModelJoe = new TckTModel(publicationJoe, inquiryJoe);
+                        tckBusinessJoe = new TckBusiness(publicationJoe, inquiryJoe);
+                        tckBusinessServiceJoe = new TckBusinessService(publicationJoe, inquiryJoe);
+                        tckSubscriptionListenerJoe = new TckSubscriptionListener(subscriptionJoe, publicationJoe);
 
 
 
 
-                        publication = transport.getUDDIPublishService();
+                        transport = manager.getTransport();
+                        publicationMary = transport.getUDDIPublishService();
                         inquiryMary = transport.getUDDIInquiryService();
                         subscriptionMary = transport.getUDDISubscriptionService();
                         if (!TckPublisher.isUDDIAuthMode()) {
-                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
-                                TckSecurity.setCredentials((BindingProvider) inquiryJoe, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
-                                TckSecurity.setCredentials((BindingProvider) subscriptionJoe, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                                TckSecurity.setCredentials((BindingProvider) publicationMary, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiryMary, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                                TckSecurity.setCredentials((BindingProvider) subscriptionMary, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
                         }
 
 
-                        tckTModelMary = new TckTModel(publication, inquiryMary);
-                        tckBusinessMary = new TckBusiness(publication, inquiryMary);
-                        tckBusinessServiceMary = new TckBusinessService(publication, inquiryMary);
-                        tckSubscriptionListenerMary = new TckSubscriptionListener(subscriptionMary, publication);
+                        tckTModelMary = new TckTModel(publicationMary, inquiryMary);
+                        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
+
+                        tckBusinessMary = new TckBusiness(publicationMary, inquiryMary);
+                        tckBusinessServiceMary = new TckBusinessService(publicationMary, inquiryMary);
+                        tckSubscriptionListenerMary = new TckSubscriptionListener(subscriptionMary, publicationMary);
 
                 } catch (Exception e) {
                         logger.error(e.getMessage(), e);
@@ -180,30 +187,11 @@ public class UDDI_090_SubscriptionListen
                 }
         }
 
-        public static void removeAllExistingSubscriptions(String authinfo, UDDISubscriptionPortType sub) {
-                List<Subscription> subscriptions;
-                try {
-                        subscriptions = sub.getSubscriptions(authinfo);
-
-                        DeleteSubscription ds = new DeleteSubscription();
-                        ds.setAuthInfo(authinfo);
-                        for (int i = 0; i < subscriptions.size(); i++) {
-                                ds.getSubscriptionKey().add(subscriptions.get(i).getSubscriptionKey());
-                        }
-                        if (!subscriptions.isEmpty()) {
-                                logger.info("Purging " + subscriptions.size() + " old subscriptions");
-                                sub.deleteSubscription(ds);
-                        }
-                } catch (Exception ex) {
-                        logger.warn("error clearing subscriptions", ex);
-                }
-        }
-
         @Test
-        public void joePublisherUpdateService_HTTP_FIND_SERVICE() {
-                logger.info("joePublisherUpdateService_HTTP_FIND_SERVICE");
+        public void joePublisherUpdate_HTTP_FIND_SERVICE() {
+                logger.info("joePublisherUpdate_HTTP_FIND_SERVICE");
                 try {
-                        removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
                         UDDISubscriptionListenerImpl.notifcationMap.clear();
                         UDDISubscriptionListenerImpl.notificationCount = 0;
                         tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
@@ -211,7 +199,8 @@ public class UDDI_090_SubscriptionListen
                         //Saving the binding template that will be called by the server for a subscription event
                         tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
                         //Saving the HTTP Listener Service
-                        tckSubscriptionListenerJoe.saveService(authInfoJoe, "uddi_data/subscriptionnotifier/listenerService.xml", httpPort, hostname);
+                        logger.info("sanity check, this shouldn't be the rmi file " + TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML);
+                        tckSubscriptionListenerJoe.saveService(authInfoJoe, TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort, hostname);
                         //Saving the HTTP Subscription
                         tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, "uddi_data/subscriptionnotifier/subscription1.xml");
                         //Changing the service we subscribed to "JoePublisherService"
@@ -249,15 +238,16 @@ public class UDDI_090_SubscriptionListen
         }
 
         @Test
-        public void joePublisherUpdateService_SMTP_FIND_SERVICE() {
-                logger.info("joePublisherUpdateService_SMTP_FIND_SERVICE");
+        public void joePublisherUpdate_SMTP_FIND_SERVICE() {
+                logger.info("joePublisherUpdate_SMTP_FIND_SERVICE");
                 try {
-                        removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
-                        //    if (mailServer != null && !mailServer.isStopped()) {
-                        //        mailServer.stop();
-                        //    }
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        if (mailServer != null && !mailServer.isStopped()) {
+                                mailServer.stop();
+                        }
                         mailServer = SimpleSmtpServer.start(smtpPort);
 
+
                         tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
                         tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
                         //Saving the binding template that will be called by the server for a subscription event
@@ -271,10 +261,10 @@ public class UDDI_090_SubscriptionListen
                         logger.info("Updating Service ********** ");
                         tckBusinessServiceJoe.updateJoePublisherService(authInfoJoe, "foo");
 
-                        //waiting up to 100 seconds for the listener to notice the change.
-                        for (int i = 0; i < 200; i++) {
-                                Thread.sleep(500);
-                                System.out.print(".");
+                        //waiting up to 30 seconds for the listener to notice the change.
+                        for (int i = 0; i < 60; i++) {
+                                Thread.sleep(1000);
+                                System.out.print(mailServer.getReceivedEmailSize() + ",");
                                 if (mailServer.getReceivedEmailSize() > 0) {
                                         logger.info("Received Email Notification");
                                         break;
@@ -286,7 +276,7 @@ public class UDDI_090_SubscriptionListen
                         @SuppressWarnings("rawtypes")
                         Iterator emailIter = mailServer.getReceivedEmail();
                         SmtpMessage email = (SmtpMessage) emailIter.next();
-                        if (serialize) {
+                        if (TckCommon.isDebug()) {
                                 System.out.println("Subject:" + email.getHeaderValue("Subject"));
                                 System.out.println("Body:" + email.getBody());
                         }
@@ -308,12 +298,15 @@ public class UDDI_090_SubscriptionListen
                 }
         }
 
-        //   @Test
-        public void joePublisherUpdateBusiness_HTTP_FIND_BUSINESS() {
-                logger.info("joePublisherUpdateBusiness_HTTP_FIND_BUSINESS");
+        @Test
+        public void joePublisherUpdate_HTTP_FIND_BUSINESS() {
+                logger.info("joePublisherUpdate_HTTP_FIND_BUSINESS");
                 try {
-                        removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
-                        DumpAllBusinesses();
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        TckCommon.DeleteBusiness(TckBusiness.MARY_BUSINESS_KEY, authInfoMary, publicationMary);
+                        if (TckCommon.isDebug()) {
+                                DumpAllBusinesses();
+                        }
                         Thread.sleep(5000);
                         UDDISubscriptionListenerImpl.notifcationMap.clear();
                         UDDISubscriptionListenerImpl.notificationCount = 0;
@@ -321,8 +314,9 @@ public class UDDI_090_SubscriptionListen
                         tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
                         tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
                         //Saving the Listener Service
+                        logger.info("sanity check, this shouldn't be the rmi file " + TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML);
                         logger.info("Saving Joe's callback endpoint ********** ");
-                        tckSubscriptionListenerJoe.saveService(authInfoJoe, "uddi_data/subscriptionnotifier/listenerService.xml", httpPort, hostname);
+                        tckSubscriptionListenerJoe.saveService(authInfoJoe, TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort, hostname);
                         //Saving the Subscription
                         logger.info("Saving Joe's subscription********** ");
                         tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, "uddi_data/subscriptionnotifier/subscription2.xml");
@@ -336,27 +330,32 @@ public class UDDI_090_SubscriptionListen
                         tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);
                         DumpAllBusinesses();
                         //waiting up to 10 seconds for the listener to notice the change.
-                        String test = "";
-                        for (int i = 0; i < 20; i++) {
-                                Thread.sleep(500);
+
+                        for (int i = 0; i < 60; i++) {
+                                Thread.sleep(1000);
                                 System.out.print(".");
-                                if (UDDISubscriptionListenerImpl.notificationCount > 0) {
-                                        //logger.info("Received Notification");
-                                        //break;
-                                } else {
-                                        System.out.print(test);
-                                }
+                                //if (UDDISubscriptionListenerImpl.notificationCount > 0) {
+
+                                //}
                         }
                         logger.info("RX " + UDDISubscriptionListenerImpl.notificationCount + " notifications");
                         Iterator<String> it = UDDISubscriptionListenerImpl.notifcationMap.values().iterator();
+                        boolean found = false;
                         while (it.hasNext()) {
-                                logger.info("Notification: " + it.next());
+                                String msg = it.next();
+                                if (TckCommon.isDebug()) {
+                                        logger.info("Notification: " + msg);
+                                }
+                                if (msg.toLowerCase().contains("mary")) {
+                                        found = true;
+                                }
+
                         }
                         DumpAllBusinesses();
                         if (UDDISubscriptionListenerImpl.notificationCount == 0) {
                                 Assert.fail("No Notification was sent");
                         }
-                        if (!UDDISubscriptionListenerImpl.notifcationMap.get(0).contains("uddi:uddi.marypublisher.com:marybusinessone")) {
+                        if (!found) {
                                 Assert.fail("Notification does not contain the correct service");
                         }
 
@@ -369,7 +368,8 @@ public class UDDI_090_SubscriptionListen
                         tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, "uddi:uddi.joepublisher.com:subscriptionone");
                         tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
                         tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
-                        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        TckCommon.DeleteBusiness(TckBusiness.MARY_BUSINESS_KEY, authInfoMary, publicationMary);
+                        //tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
                 }
         }
 
@@ -396,14 +396,15 @@ public class UDDI_090_SubscriptionListen
                 }
         }
 
-        //@Test
-        public void joePublisherUpdateBusiness_SMTP_FIND_BUSINESS() {
-                logger.info("joePublisherUpdateBusiness_SMTP_FIND_BUSINESS");
+        @Test
+        public void joePublisherUpdate_SMTP_FIND_BUSINESS() {
+                logger.info("joePublisherUpdate_SMTP_FIND_BUSINESS");
                 try {
-                        removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
-                        //  if (mailServer != null && !mailServer.isStopped()) {
-                        //      mailServer.stop();
-                        //  }
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        TckCommon.DeleteBusiness(TckBusiness.MARY_BUSINESS_KEY, authInfoMary, publicationMary);
+                        if (mailServer != null && !mailServer.isStopped()) {
+                                mailServer.stop();
+                        }
                         mailServer = SimpleSmtpServer.start(smtpPort);
                         tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
                         tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
@@ -417,14 +418,15 @@ public class UDDI_090_SubscriptionListen
 
                         Thread.sleep(3000);
                         logger.info("Saving Mary's Business ********** ");
-                        tckBusinessMary.saveBusiness(authInfoMary, MARY_BUSINESS_XML, "uddi:uddi.marypublisher.com:marybusinessone");
+                        //"uddi:uddi.marypublisher.com:marybusinessone"
+                        tckBusinessMary.saveBusiness(authInfoMary, TckBusiness.MARY_BUSINESS_XML, TckBusiness.MARY_BUSINESS_KEY);
 
-                        for (int i = 0; i < 200; i++) {
-                                Thread.sleep(500);
-                                System.out.print(".");
+                        for (int i = 0; i < 60; i++) {
+                                Thread.sleep(1000);
+                                System.out.println(mailServer.getReceivedEmailSize() + " message received.");
                                 if (mailServer.getReceivedEmailSize() > 0) {
-                                        logger.info("Received Email Notification");
-                                        break;
+                                        //logger.info("Received Email Notification");
+                                        //break;
                                 }
                         }
                         if (mailServer.getReceivedEmailSize() == 0) {
@@ -432,13 +434,21 @@ public class UDDI_090_SubscriptionListen
                         }
                         @SuppressWarnings("rawtypes")
                         Iterator emailIter = mailServer.getReceivedEmail();
-                        SmtpMessage email = (SmtpMessage) emailIter.next();
-                        if (serialize) {
-                                System.out.println("Subject:" + email.getHeaderValue("Subject"));
-                                System.out.println("Body:" + email.getBody());
+                        boolean found = false;
+                        while (emailIter.hasNext()) {
+                                SmtpMessage email = (SmtpMessage) emailIter.next();
+                                if (TckCommon.isDebug()) {
+                                        System.out.println("Subject:" + email.getHeaderValue("Subject"));
+                                        System.out.println("Body:" + email.getBody());
+
+                                }
+                                if (email.getBody().toLowerCase().contains("mary")) {
+                                        found = true;
+                                }
                         }
-                        if (!email.getBody().replaceAll("=", "").contains("uddi:uddi.marypublisher.com:marybusinessone")) {
+                        if (!found) {
                                 DumpAllBusinesses();
+                                logger.fatal("Notification does not contain the correct service");
                                 Assert.fail("Notification does not contain the correct service");
                         }
 
@@ -453,16 +463,17 @@ public class UDDI_090_SubscriptionListen
                         tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
                         tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
                         //      tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-                        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        //tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        TckCommon.DeleteBusiness(TckBusiness.MARY_BUSINESS_KEY, authInfoMary, publicationMary);
                         mailServer.stop();
                 }
         }
 
         //tmodel tests
-        //@Test
-        public void joePublisherUpdateBusiness_HTTP_FIND_TMODEL() {
-                logger.info("joePublisherUpdateBusiness_HTTP_FIND_TMODEL");
-                removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+        @Test
+        public void joePublisherUpdate_HTTP_FIND_TMODEL() {
+                logger.info("joePublisherUpdate_HTTP_FIND_TMODEL");
+                TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
                 try {
                         UDDISubscriptionListenerImpl.notifcationMap.clear();
                         UDDISubscriptionListenerImpl.notificationCount = 0;
@@ -471,6 +482,7 @@ public class UDDI_090_SubscriptionListen
                         tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
                         tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
                         //Saving the Listener Service
+                        logger.info("sanity check, this shouldn't be the rmi file " + TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML);
                         tckSubscriptionListenerJoe.saveService(authInfoJoe, TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort, hostname);
                         //Saving the Subscription
                         tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
@@ -512,10 +524,10 @@ public class UDDI_090_SubscriptionListen
                 }
         }
 
-        //@Test
-        public void joePublisherUpdateBusiness_SMTP_FIND_TMODEL() {
-                logger.info("joePublisherUpdateBusiness_SMTP_FIND_TMODEL");
-                removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+        @Test
+        public void joePublisherUpdate_SMTP_FIND_TMODEL() {
+                logger.info("joePublisherUpdate_SMTP_FIND_TMODEL");
+                TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
                 try {
                         if (mailServer != null && !mailServer.isStopped()) {
                                 mailServer.stop();
@@ -550,7 +562,7 @@ public class UDDI_090_SubscriptionListen
                         @SuppressWarnings("rawtypes")
                         Iterator emailIter = mailServer.getReceivedEmail();
                         SmtpMessage email = (SmtpMessage) emailIter.next();
-                        if (serialize) {
+                        if (TckCommon.isDebug()) {
                                 System.out.println("Subject:" + email.getHeaderValue("Subject"));
                                 System.out.println("Body:" + email.getBody());
                         }
@@ -572,6 +584,8 @@ public class UDDI_090_SubscriptionListen
                         mailServer.stop();
                 }
         }
-        //TODO If a subscriber specifies a maximum number of entries to be returned with a subscription and the amount of data to be returned exceeds this limit, or if the node determines based on its policy that there are too many entries to be returned in a single group, then the node SHOULD provide a chunkToken with results.  
+        //TODO If a subscriber specifies a maximum number of entries to be returned with a subscription and the amount of data to be returned exceeds 
+//this limit, or if the node determines based on its policy that there are too many entries to be returned in a single group, 
+        //then the node SHOULD provide a chunkToken with results.  
         //TODO  If no more results are pending, the value of the chunkToken MUST be "0".
 }

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java?rev=1552928&r1=1552927&r2=1552928&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java Sat Dec 21 17:35:51 2013
@@ -64,6 +64,9 @@ public class UDDI_110_FindBusinessIntegr
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
+                tckTModel.deleteCreatedTModels(authInfoJoe);
+                tckTModel01.deleteCreatedTModels(authInfoJoe);
+                tckTModel02.deleteCreatedTModels(authInfoJoe);
                 manager.stop();
         }
 

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java?rev=1552928&r1=1552927&r2=1552928&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java Sat Dec 21 17:35:51 2013
@@ -74,6 +74,7 @@ public class UDDI_120_CombineCategoryBag
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
+                tckTModel.deleteCreatedTModels(authInfoJoe);
                 manager.stop();
         }
 

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java?rev=1552928&r1=1552927&r2=1552928&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java Sat Dec 21 17:35:51 2013
@@ -79,6 +79,7 @@ public class UDDI_130_CombineCategoryBag
 
 	@AfterClass
 	public static void stopManager() throws ConfigurationException {
+                tckTModel.deleteCreatedTModels(authInfoJoe);
 		manager.stop();
 	}
 

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java?rev=1552928&r1=1552927&r2=1552928&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java Sat Dec 21 17:35:51 2013
@@ -82,9 +82,7 @@ public class UDDI_140_NegativePublicatio
         static UDDIInquiryPortType inquiryJoe = null;
         static UDDIPublicationPortType publicationJoe = null;
         static TckTModel tckTModelJoe = null;
-        
         protected static String authInfoJoe = null;
-        
         private static UDDIClient manager;
         static final String str256 = "1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
         static final String str255 = "uddi:tmodelkey:categories:1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
@@ -105,6 +103,7 @@ public class UDDI_140_NegativePublicatio
 
         @AfterClass
         public static void stopManager() throws ConfigurationException {
+                tckTModelJoe.deleteCreatedTModels(authInfoJoe);
                 manager.stop();
         }
 
@@ -118,7 +117,7 @@ public class UDDI_140_NegativePublicatio
                         Transport transport = manager.getTransport();
                         security = transport.getUDDISecurityService();
                         authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
-        
+
 
                         publicationJoe = transport.getUDDIPublishService();
                         inquiryJoe = transport.getUDDIInquiryService();
@@ -134,19 +133,19 @@ public class UDDI_140_NegativePublicatio
                         String authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
 
                         transport = manager.getTransport();
-                         UDDIPublicationPortType publicationJoe= transport.getUDDIPublishService();
-                         UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
+                        UDDIPublicationPortType publicationJoe = transport.getUDDIPublishService();
+                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
 
                         if (!TckPublisher.isUDDIAuthMode()) {
                                 TckSecurity.setCredentials((BindingProvider) publicationJoe, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
                                 TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
                         }
-                      
+
 
                         TckTModel uddi = new TckTModel(publicationJoe, inquiry);
                         uddi.saveUDDIPublisherTmodel(authInfoUDDI);
                         uddi.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);
-                        
+
                         tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
                 } catch (Exception e) {
                         logger.error(e.getMessage(), e);
@@ -182,7 +181,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("Hello Nurse");
+                n.setValue("BusinessKeyTooLongTest -Hello Nurse");
                 be.getName().add(n);
                 be.setBusinessKey(strkey256_1);
                 sb.getBusinessEntity().add(be);
@@ -290,7 +289,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessNameLangTooLongTest A Test business");
                 //27
                 n.setLang(str27);
                 be.getName().add(n);
@@ -317,7 +316,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessNameLangMaxLengthTest A Test business");
                 n.setLang(str26);
 
                 be.getName().add(n);
@@ -337,7 +336,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDescriptionLangTooLongTest A Test business");
                 Description d = new Description();
                 d.setValue("a description");
                 //27
@@ -367,7 +366,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDescriptionLangMaxLengthTest A Test business");
                 Description d = new Description();
                 d.setValue("a description");
                 //26
@@ -390,7 +389,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDescriptionMaxLengthTest A Test business");
                 Description d = new Description();
                 d.setValue(str255);
                 be.getDescription().add(d);
@@ -412,7 +411,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDescriptionTooLongLengthTest A Test business");
                 Description d = new Description();
                 d.setValue(str256);
                 be.getDescription().add(d);
@@ -440,7 +439,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDiscoveryURLTooLongTest A Test business");
                 be.getName().add(n);
                 be.setDiscoveryURLs(new DiscoveryURLs());
                 DiscoveryURL d = new DiscoveryURL();
@@ -469,7 +468,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDiscoveryURLMaxLengthTest A Test business");
                 be.getName().add(n);
                 be.setDiscoveryURLs(new DiscoveryURLs());
                 DiscoveryURL d = new DiscoveryURL();
@@ -492,7 +491,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDiscoveryURLMaxLengthMaxUseTypeTest A Test business");
                 be.getName().add(n);
                 be.setDiscoveryURLs(new DiscoveryURLs());
                 DiscoveryURL d = new DiscoveryURL();
@@ -516,7 +515,7 @@ public class UDDI_140_NegativePublicatio
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
 
-                n.setValue("A Test business");
+                n.setValue("BusinessDiscoveryURLMaxLengthToolongUseTypeTest A Test business");
                 be.getName().add(n);
                 be.setDiscoveryURLs(new DiscoveryURLs());
                 DiscoveryURL d = new DiscoveryURL();
@@ -544,7 +543,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxEmailMaxUseTypeTest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactMaxEmailMaxUseType());
                 sb.getBusinessEntity().add(be);
@@ -769,7 +768,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactTooLongEmailMaxUseTypeTest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactTooLongEmailMaxUseType());
                 sb.getBusinessEntity().add(be);
@@ -794,7 +793,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxEmailToolongUseTypeTest A Test business");
                 be.getName().add(n);
 
                 be.setContacts(ContactEmailUseTypeToolong());
@@ -822,7 +821,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactDescriptionMaxLangMaxtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactMaxDescription());
                 sb.getBusinessEntity().add(be);
@@ -842,7 +841,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactDescriptionTooLongtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactDescriptionTooLong());
                 sb.getBusinessEntity().add(be);
@@ -867,7 +866,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactDescriptionLangTooLongTest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactDescriptionLangTooLong());
                 sb.getBusinessEntity().add(be);
@@ -892,7 +891,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactPhoneMaxLentest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactPhoneMaxLength());
                 sb.getBusinessEntity().add(be);
@@ -912,7 +911,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactPhoneTooLongtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactPhoneTooLong());
                 sb.getBusinessEntity().add(be);
@@ -936,7 +935,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactPhoneMaxLongtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactPhoneMaxLength());
                 sb.getBusinessEntity().add(be);
@@ -954,7 +953,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactPhoneMaxLongMaxUseTypetest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactPhoneUseTypeMaxLen());
                 sb.getBusinessEntity().add(be);
@@ -973,7 +972,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactPhoneUseTypeTooLongtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactPhoneUseTypeTooLong());
                 sb.getBusinessEntity().add(be);
@@ -997,7 +996,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFFFFFFFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, false, false, false, false, false, false));
                 sb.getBusinessEntity().add(be);
@@ -1017,7 +1016,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressTFFFFFFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(true, false, false, false, false, false, false));
                 sb.getBusinessEntity().add(be);
@@ -1042,7 +1041,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFTFFFFFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, true, false, false, false, false, false));
                 sb.getBusinessEntity().add(be);
@@ -1067,7 +1066,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFFTFFFFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, false, true, false, false, false, false));
                 sb.getBusinessEntity().add(be);
@@ -1092,7 +1091,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFFFTFFFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, false, false, true, false, false, false));
                 sb.getBusinessEntity().add(be);
@@ -1116,7 +1115,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFFFFTFFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, false, false, false, true, false, false));
                 sb.getBusinessEntity().add(be);
@@ -1141,7 +1140,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFFFFFTFtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, false, false, false, false, true, false));
                 sb.getBusinessEntity().add(be);
@@ -1166,7 +1165,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ContactMaxAddressFFFFFFTtest A Test business");
                 be.getName().add(n);
                 be.setContacts(ContactAddressAllMax(false, false, false, false, false, false, true));
                 sb.getBusinessEntity().add(be);
@@ -1191,7 +1190,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("KeyReferenceMax A Test business");
                 be.getName().add(n);
                 be.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -1215,7 +1214,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("KeyReferenceKeyTooLong A Test business");
                 be.getName().add(n);
                 be.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -1245,7 +1244,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("KeyReferenceNameTooLong A Test business");
                 be.getName().add(n);
                 be.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -1275,7 +1274,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("KeyReferenceValueTooLong A Test business");
                 be.getName().add(n);
                 be.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -1305,7 +1304,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceNameTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1336,7 +1335,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceNameMaxLenTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1361,7 +1360,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceNameMaxLangLenTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1387,7 +1386,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceNameTooLongLangTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1419,7 +1418,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceDescTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1453,7 +1452,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceDescLangTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1488,7 +1487,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceDescMaxLangTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1518,7 +1517,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceDescMaxLangTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1553,7 +1552,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("ServiceMaxCatBagTooBigTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1594,7 +1593,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateNoAccessPointTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1630,7 +1629,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointMaxUseTypeTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1664,7 +1663,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointUseTypeTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1704,7 +1703,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointValueTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1744,7 +1743,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointMaxValueTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1778,7 +1777,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateNoAccessPointNoRedirectorTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1816,7 +1815,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointAndRedirectorTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1860,7 +1859,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateHostRedirectorReferencalIntegritytest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1884,7 +1883,7 @@ public class UDDI_140_NegativePublicatio
                 System.out.println("Saving the business with the first service");
                 BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);
 
-                PrintBusinessDetails(saveBusiness.getBusinessEntity());
+                TckCommon.PrintBusinessDetails(saveBusiness.getBusinessEntity());
 
                 //setup the next one
                 bs = new BusinessService();
@@ -1905,7 +1904,7 @@ public class UDDI_140_NegativePublicatio
                 //This SHOULD be allowed
                 System.out.println("Saving the business with the first and second service as a host redirect");
                 saveBusiness = publicationJoe.saveBusiness(sb);
-                PrintBusinessDetails(saveBusiness.getBusinessEntity());
+                TckCommon.PrintBusinessDetails(saveBusiness.getBusinessEntity());
 
                 DeleteBusiness db = new DeleteBusiness();
                 db.setAuthInfo(authInfoJoe);
@@ -1922,7 +1921,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointAsBindingTemplateReferencalIntegritytest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -1945,7 +1944,7 @@ public class UDDI_140_NegativePublicatio
                 System.out.println("Saving the business with the first service");
                 BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);
 
-                PrintBusinessDetails(saveBusiness.getBusinessEntity());
+                TckCommon.PrintBusinessDetails(saveBusiness.getBusinessEntity());
 
                 //setup the next one
                 bs = new BusinessService();
@@ -1967,7 +1966,7 @@ public class UDDI_140_NegativePublicatio
                 //This SHOULD be allowed
                 System.out.println("Saving the business with the first and second service as a host redirect");
                 saveBusiness = publicationJoe.saveBusiness(sb);
-                PrintBusinessDetails(saveBusiness.getBusinessEntity());
+                TckCommon.PrintBusinessDetails(saveBusiness.getBusinessEntity());
 
                 DeleteBusiness db = new DeleteBusiness();
                 db.setAuthInfo(authInfoJoe);
@@ -1987,7 +1986,7 @@ public class UDDI_140_NegativePublicatio
 
                         BusinessEntity be = new BusinessEntity();
                         Name bsn = new Name();
-                        bsn.setValue("A bogus business");
+                        bsn.setValue("BindingTemplateAccessPointAsBindingTemplateINVALIDReferencalIntegritytest A bogus business");
                         be.getName().add(bsn);
 
                         BusinessService bs = new BusinessService();
@@ -2024,7 +2023,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateHostRedirectorTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -2063,7 +2062,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointMaxLengthTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -2096,7 +2095,7 @@ public class UDDI_140_NegativePublicatio
                 sb.setAuthInfo(authInfoJoe);
                 BusinessEntity be = new BusinessEntity();
                 Name n = new Name();
-                n.setValue("A Test business");
+                n.setValue("BindingTemplateAccessPointTooLongTest A Test business");
                 be.getName().add(n);
                 be.setBusinessServices(new BusinessServices());
                 BusinessService bs = new BusinessService();
@@ -2141,7 +2140,7 @@ public class UDDI_140_NegativePublicatio
                 st.setAuthInfo(authInfoJoe);
                 TModel tm = new TModel();
                 tm.setName(new Name());
-                tm.getName().setValue("My Cool Company Keymodel generator");
+                tm.getName().setValue("CreateKeyGenMaxLengthTest My Cool Company Keymodel generator");
                 tm.getName().setLang("en");
                 tm.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -2170,7 +2169,7 @@ public class UDDI_140_NegativePublicatio
                 st.setAuthInfo(authInfoJoe);
                 TModel tm = new TModel();
                 tm.setName(new Name());
-                tm.getName().setValue("My Cool Company Keymodel generator");
+                tm.getName().setValue("CreateKeyGenTooLongTest My Cool Company Keymodel generator");
                 tm.getName().setLang("en");
                 tm.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -2200,7 +2199,7 @@ public class UDDI_140_NegativePublicatio
                 st.setAuthInfo(authInfoJoe);
                 TModel tm = new TModel();
                 tm.setName(new Name());
-                tm.getName().setValue("Key gen name");
+                tm.getName().setValue("CreateKeyGenKeyDescriptionTooLongTest Key gen name");
                 tm.getName().setLang("en");
                 Description d = new Description();
                 d.setValue(str256);
@@ -2231,7 +2230,7 @@ public class UDDI_140_NegativePublicatio
                 st.setAuthInfo(authInfoJoe);
                 TModel tm = new TModel();
                 tm.setName(new Name());
-                tm.getName().setValue("Key gen name");
+                tm.getName().setValue("CreateKeyGenKeyDescriptionTooLongTest Key gen name");
                 tm.getName().setLang("en");
                 Description d = new Description();
                 d.setValue("A description");
@@ -2266,7 +2265,7 @@ public class UDDI_140_NegativePublicatio
                 st.setAuthInfo(authInfoJoe);
                 TModel tm = new TModel();
                 tm.setName(new Name());
-                tm.getName().setValue("hello world");
+                tm.getName().setValue("CreateKeyGenNameLangTooLongTest hello world");
                 tm.getName().setLang(str27);
                 tm.setCategoryBag(new CategoryBag());
                 KeyedReference kr = new KeyedReference();
@@ -2286,9 +2285,15 @@ public class UDDI_140_NegativePublicatio
                 }
         }
 
-        //create a tmodel with a key gen defined valid, regular tmodel,
-        //then a business, service, binding template, tmodel instance infos, attach tmodel with some data, success
-        //create a tmodel without a key gen defined- fail
+        /**
+         * //create a tmodel with a key gen defined valid, regular tmodel,
+         * //then a business, service, binding template, tmodel instance infos,
+         * attach tmodel with some data, success //create a tmodel without a key
+         * gen defined- fail
+         *
+         * @throws DispositionReportFaultMessage
+         * @throws RemoteException
+         */
         @Test(expected = SOAPFaultException.class)
         public void CreateTmodelnoKeyGen() throws DispositionReportFaultMessage, RemoteException {
                 System.out.println("CreateTmodelnoKeyGen");
@@ -2297,7 +2302,7 @@ public class UDDI_140_NegativePublicatio
                 st.setAuthInfo(authInfoJoe);
                 TModel tm = new TModel();
                 tm.setName(new Name());
-                tm.getName().setValue("My Cool Company's tmodel");
+                tm.getName().setValue("CreateTmodelnoKeyGen My Cool Company's tmodel");
                 tm.getName().setLang("en");
 
                 tm.setTModelKey("uddi:uddi.joepublisher.com:nokeygenerator:customkey");
@@ -2321,150 +2326,8 @@ public class UDDI_140_NegativePublicatio
                 //create a business, service, binding with tmodel instance infos
 
         }
-
+        
         //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
-        //<editor-fold defaultstate="collapsed" desc="Some basic util functions to print out the data structure">
-        /**
-         * Converts category bags of tmodels to a readable string
-         *
-         * @param categoryBag
-         * @return
-         */
-        public static String CatBagToString(CategoryBag categoryBag) {
-                StringBuilder sb = new StringBuilder();
-                if (categoryBag == null) {
-                        return "no data";
-                }
-                for (int i = 0; i < categoryBag.getKeyedReference().size(); i++) {
-                        sb.append(KeyedReferenceToString(categoryBag.getKeyedReference().get(i)));
-                }
-                for (int i = 0; i < categoryBag.getKeyedReferenceGroup().size(); i++) {
-                        sb.append("Key Ref Grp: TModelKey=");
-                        for (int k = 0; k < categoryBag.getKeyedReferenceGroup().get(i).getKeyedReference().size(); k++) {
-                                sb.append(KeyedReferenceToString(categoryBag.getKeyedReferenceGroup().get(i).getKeyedReference().get(k)));
-                        }
-                }
-                return sb.toString();
-        }
-
-        public static String KeyedReferenceToString(KeyedReference item) {
-                StringBuilder sb = new StringBuilder();
-                sb.append("Key Ref: Name=").
-                        append(item.getKeyName()).
-                        append(" Value=").
-                        append(item.getKeyValue()).
-                        append(" tModel=").
-                        append(item.getTModelKey()).
-                        append(System.getProperty("line.separator"));
-                return sb.toString();
-        }
-
-        public static void PrintContacts(Contacts contacts) {
-                if (contacts == null) {
-                        return;
-                }
-                for (int i = 0; i < contacts.getContact().size(); i++) {
-                        System.out.println("Contact " + i + " type:" + contacts.getContact().get(i).getUseType());
-                        for (int k = 0; k < contacts.getContact().get(i).getPersonName().size(); k++) {
-                                System.out.println("Name: " + contacts.getContact().get(i).getPersonName().get(k).getValue());
-                        }
-                        for (int k = 0; k < contacts.getContact().get(i).getEmail().size(); k++) {
-                                System.out.println("Email: " + contacts.getContact().get(i).getEmail().get(k).getValue());
-                        }
-                        for (int k = 0; k < contacts.getContact().get(i).getAddress().size(); k++) {
-                                System.out.println("Address sort code " + contacts.getContact().get(i).getAddress().get(k).getSortCode());
-                                System.out.println("Address use type " + contacts.getContact().get(i).getAddress().get(k).getUseType());
-                                System.out.println("Address tmodel key " + contacts.getContact().get(i).getAddress().get(k).getTModelKey());
-                                for (int x = 0; x < contacts.getContact().get(i).getAddress().get(k).getAddressLine().size(); x++) {
-                                        System.out.println("Address line value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getValue());
-                                        System.out.println("Address line key name " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyName());
-                                        System.out.println("Address line key value " + contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyValue());
-                                }
-                        }
-                        for (int k = 0; k < contacts.getContact().get(i).getDescription().size(); k++) {
-                                System.out.println("Desc: " + contacts.getContact().get(i).getDescription().get(k).getValue());
-                        }
-                        for (int k = 0; k < contacts.getContact().get(i).getPhone().size(); k++) {
-                                System.out.println("Phone: " + contacts.getContact().get(i).getPhone().get(k).getValue());
-                        }
-                }
-
-        }
-
-        /**
-         * This function is useful for translating UDDI's somewhat complex data
-         * format to something that is more useful.
-         *
-         * @param bindingTemplates
-         */
-        public static void PrintBindingTemplates(BindingTemplates bindingTemplates) {
-                if (bindingTemplates == null) {
-                        return;
-                }
-                for (int i = 0; i < bindingTemplates.getBindingTemplate().size(); i++) {
-                        System.out.println("Binding Key: " + bindingTemplates.getBindingTemplate().get(i).getBindingKey());
-
-                        if (bindingTemplates.getBindingTemplate().get(i).getAccessPoint() != null) {
-                                System.out.println("Access Point: " + bindingTemplates.getBindingTemplate().get(i).getAccessPoint().getValue() + " type " + bindingTemplates.getBindingTemplate().get(i).getAccessPoint().getUseType());
-                        }
-
-                        if (bindingTemplates.getBindingTemplate().get(i).getHostingRedirector() != null) {
-                                System.out.println("Hosting Redirection: " + bindingTemplates.getBindingTemplate().get(i).getHostingRedirector().getBindingKey());
-                        }
-                }
-        }
-
-        public static void PrintBusinessInfo(BusinessInfos businessInfos) {
-                if (businessInfos == null) {
-                        System.out.println("No data returned");
-                } else {
-                        for (int i = 0; i < businessInfos.getBusinessInfo().size(); i++) {
-                                System.out.println("===============================================");
-                                System.out.println("Business Key: " + businessInfos.getBusinessInfo().get(i).getBusinessKey());
-                                System.out.println("Name: " + ListToString(businessInfos.getBusinessInfo().get(i).getName()));
-
-                                System.out.println("Name: " + ListToDescString(businessInfos.getBusinessInfo().get(i).getDescription()));
-                                System.out.println("Services:");
-                                PrintServiceInfo(businessInfos.getBusinessInfo().get(i).getServiceInfos());
-                        }
-                }
-        }
-
-        public static String ListToString(List<Name> name) {
-                StringBuilder sb = new StringBuilder();
-                for (int i = 0; i < name.size(); i++) {
-                        sb.append(name.get(i).getValue()).append(" ");
-                }
-                return sb.toString();
-        }
-
-        public static String ListToDescString(List<Description> name) {
-                StringBuilder sb = new StringBuilder();
-                for (int i = 0; i < name.size(); i++) {
-                        sb.append(name.get(i).getValue()).append(" ");
-                }
-                return sb.toString();
-        }
-
-        public static void PrintServiceInfo(ServiceInfos serviceInfos) {
-                for (int i = 0; i < serviceInfos.getServiceInfo().size(); i++) {
-                        System.out.println("-------------------------------------------");
-                        System.out.println("Service Key: " + serviceInfos.getServiceInfo().get(i).getServiceKey());
-                        System.out.println("Owning Business Key: " + serviceInfos.getServiceInfo().get(i).getBusinessKey());
-                        System.out.println("Name: " + ListToString(serviceInfos.getServiceInfo().get(i).getName()));
-                }
-        }
-
-        public static void PrintBusinessDetails(List<BusinessEntity> businessDetail) {
-
-
-                for (int i = 0; i < businessDetail.size(); i++) {
-                        System.out.println("Business Detail - key: " + businessDetail.get(i).getBusinessKey());
-                        System.out.println("Name: " + ListToString(businessDetail.get(i).getName()));
-                        System.out.println("CategoryBag: " + CatBagToString(businessDetail.get(i).getCategoryBag()));
-                        PrintContacts(businessDetail.get(i).getContacts());
-                }
-        }
 }



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