juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1550327 [3/8] - in /juddi/branches/juddi-3.3.x: ./ juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ juddi-core/src/main/java/org/apache/juddi/validation/ juddi-cor...
Date Thu, 12 Dec 2013 00:27:32 GMT
Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceIntegrationTest.java?rev=1550327&r1=1550326&r2=1550327&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceIntegrationTest.java Thu Dec 12 00:27:31 2013
@@ -14,6 +14,7 @@
  */
 package org.apache.juddi.v3.tck;
 
+import javax.xml.ws.BindingProvider;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -30,119 +31,144 @@ import org.uddi.v3_service.UDDISecurityP
 /**
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
-public class UDDI_040_BusinessServiceIntegrationTest 
-{
-	 
-	private static Log logger = LogFactory.getLog(UDDI_040_BusinessServiceIntegrationTest.class);
-	
-	protected static TckTModel tckTModel               = null;
-	protected static TckBusiness tckBusiness           = null;
-	protected static TckBusinessService tckBusinessService  = null;
-	
-	protected static String authInfoJoe                = null;
-	protected static String authInfoSam                = null;
-    private static UDDIClient manager;
-	
-	@AfterClass
-	public static void stopManager() throws ConfigurationException {
-		manager.stop();
-	}
-	
-	@BeforeClass
-	public static void startManager() throws ConfigurationException {
-		manager  = new UDDIClient();
-		manager.start();
-		
-		logger.debug("Getting auth tokens..");
-		try {
-			 Transport transport = manager.getTransport();
-        	 UDDISecurityPortType security = transport.getUDDISecurityService();
-        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(),  TckPublisher.getJoePassword());
- 			 authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(),  TckPublisher.getSamPassword());
-        	 Assert.assertNotNull(authInfoJoe);
-        	 Assert.assertNotNull(authInfoSam);
-        	 
-        	 UDDIPublicationPortType publication = transport.getUDDIPublishService();
-        	 UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
-        	 tckTModel  = new TckTModel(publication, inquiry);
-        	 tckBusiness = new TckBusiness(publication, inquiry);
-        	 tckBusinessService = new TckBusinessService(publication, inquiry);
- 			 String authInfoUDDI  = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(),  TckPublisher.getUDDIPassword());
- 			 tckTModel.saveUDDIPublisherTmodel(authInfoUDDI);
- 			 tckTModel.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);
-	     } catch (Exception e) {
-	    	 logger.error(e.getMessage(), e);
-				Assert.fail("Could not obtain authInfo token.");
-	     } 
-	}
-	
-	@Test
-	public void joepublisher() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			tckBusinessService.deleteJoePublisherService(authInfoJoe);
-		} finally {
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-		}
-	}
-	
-	@Test
-	public void samsyndicator() {
-		try {
-			
-			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-			tckBusinessService.saveSamSyndicatorService(authInfoSam);
-			tckBusinessService.deleteSamSyndicatorService(authInfoSam);
-		} finally {
-			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-		}
-	}
-	
-	/**
-	 * 5.2.16.3 paragraph 4
-	 * Data contained within businessEntity structures can be rearranged with 
-	 * this API call. This can be done by redefining parent container relationships 
-	 * for other registered information. For instance, if a new businessEntity 
-	 * is saved with information about a businessService that is registered 
-	 * already as part of a different businessEntity, this results in the 
-	 * businessService being moved from its current container to the new businessEntity.	
-	 * This condition occurs when the businessKey of the businessService being 
-	 * saved matches the businessKey of the businessEntity being saved. 
-	 * An attempt to delete or move a businessService in this manner by 
-	 * a party who is not the publisher of the businessService MUST be 
-	 * rejected with an error E_userMismatch.
-	 */
-	@Test
-	public void joepublisherMoveBusinessService() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			tckBusiness.checkServicesBusinessOne(1);
-			tckBusiness.saveJoePublisherBusiness3(authInfoJoe);
-			//check that this business has no services
-			tckBusiness.checkServicesBusinessThree(0);
-			//Now move the service from one to three
-			tckBusiness.saveJoePublisherBusiness1to3(authInfoJoe);
-			tckBusiness.checkServicesBusinessOne(0);
-			tckBusiness.checkServicesBusinessThree(1);
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail(e.getMessage());
-		} finally {
-			tckBusinessService.deleteJoePublisherService(authInfoJoe);
-			tckBusiness.deleteJoePublisherBusiness3(authInfoJoe);
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-		}
-	}
-	
-	
+public class UDDI_040_BusinessServiceIntegrationTest {
 
+        private static Log logger = LogFactory.getLog(UDDI_040_BusinessServiceIntegrationTest.class);
+        protected static TckTModel tckTModelJoe = null;
+        protected static TckBusiness tckBusinessJoe = null;
+        protected static TckBusinessService tckBusinessServiceJoe = null;
+        protected static TckTModel tckTModelSam = null;
+        protected static TckBusiness tckBusinessSam = null;
+        protected static TckBusinessService tckBusinessServiceSam = null;
+        protected static String authInfoJoe = null;
+        protected static String authInfoSam = null;
+        private static UDDIClient manager;
+
+        @AfterClass
+        public static void stopManager() throws ConfigurationException {
+                manager.stop();
+        }
+
+        @BeforeClass
+        public static void startManager() throws ConfigurationException {
+                manager = new UDDIClient();
+                manager.start();
+
+                logger.debug("Getting auth tokens..");
+                try {
+                        Transport transport = manager.getTransport();
+                        UDDISecurityPortType security = transport.getUDDISecurityService();
+                        authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                        //Assert.assertNotNull(authInfoJoe);
+                        //Assert.assertNotNull(authInfoSam);
+
+
+                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
+                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        }
+                        tckTModelJoe = new TckTModel(publication, inquiry);
+                        tckBusinessJoe = new TckBusiness(publication, inquiry);
+                        tckBusinessServiceJoe = new TckBusinessService(publication, inquiry);
+
+                        transport = manager.getTransport();
+                        publication = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                        }
+                        tckTModelSam = new TckTModel(publication, inquiry);
+                        tckBusinessSam = new TckBusiness(publication, inquiry);
+                        tckBusinessServiceSam = new TckBusinessService(publication, inquiry);
+                        
+                        
+                        transport = manager.getTransport();
+                        publication = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+                        String authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                        }
+                        
+                        TckTModel tckTModel = new TckTModel(publication, inquiry);
+                        tckTModel.saveUDDIPublisherTmodel(authInfoUDDI);
+                        tckTModel.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);
+                } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        Assert.fail("Could not obtain authInfo token.");
+                }
+        }
+
+        @Test
+        public void joepublisher() {
+                try {
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                } finally {
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
+
+        @Test
+        public void samsyndicator() {
+                try {
+
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckBusinessServiceSam.saveSamSyndicatorService(authInfoSam);
+                        tckBusinessServiceSam.deleteSamSyndicatorService(authInfoSam);
+                } finally {
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                }
+        }
+
+        /**
+         * 5.2.16.3 paragraph 4 Data contained within businessEntity structures
+         * can be rearranged with this API call. This can be done by redefining
+         * parent container relationships for other registered information. For
+         * instance, if a new businessEntity is saved with information about a
+         * businessService that is registered already as part of a different
+         * businessEntity, this results in the businessService being moved from
+         * its current container to the new businessEntity. This condition
+         * occurs when the businessKey of the businessService being saved
+         * matches the businessKey of the businessEntity being saved. An attempt
+         * to delete or move a businessService in this manner by a party who is
+         * not the publisher of the businessService MUST be rejected with an
+         * error E_userMismatch.
+         */
+        @Test
+        public void joepublisherMoveBusinessService() {
+                try {
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.checkServicesBusinessOne(1);
+                        tckBusinessJoe.saveJoePublisherBusiness3(authInfoJoe);
+                        //check that this business has no services
+                        tckBusinessJoe.checkServicesBusinessThree(0);
+                        //Now move the service from one to three
+                        tckBusinessJoe.saveJoePublisherBusiness1to3(authInfoJoe);
+                        tckBusinessJoe.checkServicesBusinessOne(0);
+                        tckBusinessJoe.checkServicesBusinessThree(1);
+                } catch (Exception e) {
+                        e.printStackTrace();
+                        Assert.fail(e.getMessage());
+                } finally {
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness3(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
 }

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadTest.java?rev=1550327&r1=1550326&r2=1550327&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadTest.java Thu Dec 12 00:27:31 2013
@@ -18,40 +18,43 @@ import org.junit.Test;
 
 /**
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
 public class UDDI_040_BusinessServiceLoadTest extends UDDI_040_BusinessServiceIntegrationTest
 {	
 	int numberOfServices=1100;
 	@Test @Override
 	public void joepublisher() {
-		tckTModel.saveJoePublisherTmodel(authInfoJoe);
-		tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                numberOfServices = TckPublisher.getMaxLoadServices();
+		tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+		tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
 		long startSave = System.currentTimeMillis();
-		tckBusinessService.saveJoePublisherServices(authInfoJoe, 0, numberOfServices);
+		tckBusinessServiceJoe.saveJoePublisherServices(authInfoJoe, 0, numberOfServices);
 		long saveDuration = System.currentTimeMillis() - startSave;
 		System.out.println("Save " + numberOfServices + " Joes Services Duration=" + saveDuration);
 		long startDelete = System.currentTimeMillis();
-		tckBusinessService.deleteJoePublisherServices(authInfoJoe, 0, numberOfServices);
+		tckBusinessServiceJoe.deleteJoePublisherServices(authInfoJoe, 0, numberOfServices);
 		long deleteDuration = System.currentTimeMillis() - startDelete;
 		System.out.println("Delete " + numberOfServices + " Joes Services Duration= " + deleteDuration);
-		tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-		tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+		tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+		tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
 	}
 	
 	@Test @Override
 	public void samsyndicator() {
-		tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-		tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
+                numberOfServices = TckPublisher.getMaxLoadServices();
+		tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+		tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
 		long startSave = System.currentTimeMillis();
-		tckBusinessService.saveSamSyndicatorServices(authInfoSam, 0, numberOfServices);
+		tckBusinessServiceSam.saveSamSyndicatorServices(authInfoSam, 0, numberOfServices);
 		long saveDuration = System.currentTimeMillis() - startSave;
 		System.out.println("Save " + numberOfServices + " Sams Services Duration=" + saveDuration);
 		long startDelete = System.currentTimeMillis();
-		tckBusinessService.deleteSamSyndicatorServices(authInfoSam, 0, numberOfServices);
+		tckBusinessServiceSam.deleteSamSyndicatorServices(authInfoSam, 0, numberOfServices);
 		long deleteDuration = System.currentTimeMillis() - startDelete;
 		System.out.println("Delete " + numberOfServices + " Sams Services Duration= " + deleteDuration);
-		tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-		tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
+		tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+		tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
 	}
 	
 }

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_050_BindingTemplateIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_050_BindingTemplateIntegrationTest.java?rev=1550327&r1=1550326&r2=1550327&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_050_BindingTemplateIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_050_BindingTemplateIntegrationTest.java Thu Dec 12 00:27:31 2013
@@ -14,6 +14,7 @@
  */
 package org.apache.juddi.v3.tck;
 
+import javax.xml.ws.BindingProvider;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -30,91 +31,109 @@ import org.uddi.v3_service.UDDISecurityP
 /**
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
-public class UDDI_050_BindingTemplateIntegrationTest 
-{
-	private static Log logger = LogFactory.getLog(UDDI_050_BindingTemplateIntegrationTest.class);
-	
-	private static TckTModel tckTModel                    = null;
-	private static TckBusiness tckBusiness                = null;
-	private static TckBusinessService tckBusinessService  = null;
-	private static TckBindingTemplate tckBindingTemplate  = null;
-	private static TckFindEntity tckFindEntity            = null;
-	private static String authInfoJoe                     = null;
-    private static UDDIClient manager;
-	
-	@AfterClass
-	public static void stopManager() throws ConfigurationException {
-		manager.stop();
-	}
-	
-	@BeforeClass
-	public static void startManager() throws ConfigurationException {
-		manager  = new UDDIClient();
-		manager.start();
-		
-		logger.debug("Getting auth tokens..");
-		try {
-			 Transport transport = manager.getTransport();
-        	 UDDISecurityPortType security = transport.getUDDISecurityService();
-        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(),  TckPublisher.getJoePassword());
-        	 Assert.assertNotNull(authInfoJoe);
-        	 
-        	 UDDIPublicationPortType publication = transport.getUDDIPublishService();
-        	 UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
-        	 tckTModel  = new TckTModel(publication, inquiry);
-        	 tckBusiness = new TckBusiness(publication, inquiry);
-        	 tckBusinessService = new TckBusinessService(publication, inquiry);
-        	 tckBindingTemplate = new TckBindingTemplate(publication, inquiry);
-        	 tckFindEntity      = new TckFindEntity(inquiry);
- 			 String authInfoUDDI  = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(),  TckPublisher.getUDDIPassword());
- 			 tckTModel.saveUDDIPublisherTmodel(authInfoUDDI);
- 			 tckTModel.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);
-	     } catch (Exception e) {
-	    	 logger.error(e.getMessage(), e);
-				Assert.fail("Could not obtain authInfo token.");
-	     } 
-	}
-	
-	@Test
-	public void joepublisher() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-		} finally {
-			tckBusinessService.deleteJoePublisherService(authInfoJoe);
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-		}
-	}
-	
-	@Test
-	public void findService() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			tckBindingTemplate.deleteBinding(authInfoJoe, "uddi:uddi.joepublisher.com:bindingone");
-			String serviceKey = tckFindEntity.findService(null);
-			tckFindEntity.findServiceDetail(serviceKey);
-			
-			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			
-			serviceKey = tckFindEntity.findService(null);
-			tckFindEntity.findServiceDetail(serviceKey);
-			
-			tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-			
-			tckFindEntity.findService(null);
-			tckFindEntity.findServiceDetail(serviceKey);
-		} finally {
-			tckBusinessService.deleteJoePublisherService(authInfoJoe);
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-		}
-	}
+public class UDDI_050_BindingTemplateIntegrationTest {
+
+        private static Log logger = LogFactory.getLog(UDDI_050_BindingTemplateIntegrationTest.class);
+        private static TckTModel tckTModel = null;
+        private static TckBusiness tckBusiness = null;
+        private static TckBusinessService tckBusinessService = null;
+        private static TckBindingTemplate tckBindingTemplate = null;
+        private static TckFindEntity tckFindEntity = null;
+        private static String authInfoJoe = null;
+        private static UDDIClient manager;
+
+        @AfterClass
+        public static void stopManager() throws ConfigurationException {
+                manager.stop();
+        }
+
+        @BeforeClass
+        public static void startManager() throws ConfigurationException {
+                manager = new UDDIClient();
+                manager.start();
+
+                logger.debug("Getting auth tokens..");
+                try {
+                        Transport transport = manager.getTransport();
+                        UDDISecurityPortType security = transport.getUDDISecurityService();
+                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
+                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
+                        authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        //Assert.assertNotNull(authInfoJoe);
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        }
+
+
+                        tckTModel = new TckTModel(publication, inquiry);
+                        tckBusiness = new TckBusiness(publication, inquiry);
+                        tckBusinessService = new TckBusinessService(publication, inquiry);
+                        tckBindingTemplate = new TckBindingTemplate(publication, inquiry);
+                        tckFindEntity = new TckFindEntity(inquiry);
+
+
+                        transport = manager.getTransport();
+                        security = transport.getUDDISecurityService();
+                        publication = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+                        String authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                        //Assert.assertNotNull(authInfoJoe);
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                        }
+
+
+                        tckTModel.saveUDDIPublisherTmodel(authInfoUDDI);
+                        tckTModel.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);
+                } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        Assert.fail("Could not obtain authInfo token.");
+                }
+        }
+
+        @Test
+        public void joepublisher() {
+                try {
+                        tckTModel.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessService.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+                        tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+                } finally {
+                        tckBusinessService.deleteJoePublisherService(authInfoJoe);
+                        tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
+
+        @Test
+        public void findService() {
+                try {
+                        tckTModel.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessService.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+                        tckBindingTemplate.deleteBinding(authInfoJoe, "uddi:uddi.joepublisher.com:bindingone");
+                        String serviceKey = tckFindEntity.findService(null);
+                        tckFindEntity.findServiceDetail(serviceKey);
+
+                        tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+
+                        serviceKey = tckFindEntity.findService(null);
+                        tckFindEntity.findServiceDetail(serviceKey);
+
+                        tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+
+                        tckFindEntity.findService(null);
+                        tckFindEntity.findServiceDetail(serviceKey);
+                } finally {
+                        tckBusinessService.deleteJoePublisherService(authInfoJoe);
+                        tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
 }

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_060_PublisherAssertionIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_060_PublisherAssertionIntegrationTest.java?rev=1550327&r1=1550326&r2=1550327&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_060_PublisherAssertionIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_060_PublisherAssertionIntegrationTest.java Thu Dec 12 00:27:31 2013
@@ -17,7 +17,9 @@ package org.apache.juddi.v3.tck;
 /**
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
+import javax.xml.ws.BindingProvider;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -32,131 +34,166 @@ import org.uddi.v3_service.UDDIPublicati
 import org.uddi.v3_service.UDDISecurityPortType;
 
 public class UDDI_060_PublisherAssertionIntegrationTest {
-	
-	private static Log logger = LogFactory.getLog(UDDI_060_PublisherAssertionIntegrationTest.class);
-    
-	private static TckTModel tckTModel                = null;
-	private static TckBusiness tckBusiness            = null;
-	private static TckPublisherAssertion tckAssertion = null;
-	private static TckFindEntity tckFindEntity        = null;
-	private static String authInfoJoe                 = null;
-	private static String authInfoSam                 = null;
-	private static String authInfoMary                = null;
-	
-    private static UDDIClient manager;
-	
-	@AfterClass
-	public static void stopManager() throws ConfigurationException {
-		manager.stop();
-	}
-	
-	@BeforeClass
-	public static void startManager() throws ConfigurationException {
-		manager  = new UDDIClient();
-		manager.start();
-		
-		logger.debug("Getting auth tokens..");
-		try {
-			 Transport transport = manager.getTransport();
-        	 UDDISecurityPortType security = transport.getUDDISecurityService();
-        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(),  TckPublisher.getJoePassword());
-        	 authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(),  TckPublisher.getSamPassword());
-        	 authInfoMary = TckSecurity.getAuthToken(security, TckPublisher.getMaryPublisherId(),  TckPublisher.getMaryPassword());
-        	 Assert.assertNotNull(authInfoJoe);
-        	 
-        	 UDDIPublicationPortType publication = transport.getUDDIPublishService();
-        	 UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
-        	 tckTModel  = new TckTModel(publication, inquiry);
-        	 tckBusiness = new TckBusiness(publication, inquiry);
-        	 tckAssertion = new TckPublisherAssertion(publication);
-        	 tckFindEntity = new TckFindEntity(inquiry);
-        	  
-	     } catch (Exception e) {
-	    	 logger.error(e.getMessage(), e);
-				Assert.fail("Could not obtain authInfo token.");
-	     } 
-	}
-	
-	@Test
-	public void testJoepublisherToSamSyndicator() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-			tckAssertion.saveJoePublisherPublisherAssertion(authInfoJoe);
-			tckAssertion.deleteJoePublisherPublisherAssertion(authInfoJoe);
-		} finally {
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-		}
-	}
-	
-	/**
-	 * This test should find no publisher assertions because we only save them
-	 * from the joe publisher side.
-	 */
-	@Test
-	public void testFindNoAssertions() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-			tckTModel.saveMaryPublisherTmodel(authInfoMary);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-			tckBusiness.saveMaryPublisherBusiness(authInfoMary);
-			tckAssertion.saveJoePublisherPublisherAssertion(authInfoJoe);
-			tckAssertion.saveJoePublisherPublisherAssertion2(authInfoJoe);
-			
-			tckFindEntity.findRelatedBusiness_sortByName(true);
-			tckFindEntity.findRelatedBusinessToKey(true);
-			tckFindEntity.findRelatedBusinessFromKey(true);
-			
-			tckAssertion.deleteJoePublisherPublisherAssertion(authInfoJoe);
-			tckAssertion.deleteJoePublisherPublisherAssertion2(authInfoJoe);
-		} finally {
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckBusiness.deleteMaryPublisherBusiness(authInfoMary);
-			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-			tckTModel.deleteMaryPublisherTmodel(authInfoMary);
-		}
-	}
-	
-	/**
-	 * This test should find 2 publisher assertions.
-	 */
-	@Test
-	public void testFindAssertions() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-			tckTModel.saveMaryPublisherTmodel(authInfoMary);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-			tckBusiness.saveMaryPublisherBusiness(authInfoMary);
-			tckAssertion.saveJoePublisherPublisherAssertion(authInfoJoe);
-			tckAssertion.saveJoePublisherPublisherAssertion2(authInfoJoe);
-			tckAssertion.saveSamPublisherPublisherAssertion(authInfoSam);
-			tckAssertion.saveMaryPublisherPublisherAssertion(authInfoMary);
-			
-			tckFindEntity.findRelatedBusiness_sortByName(false);
-			tckFindEntity.findRelatedBusinessToKey(false);
-			tckFindEntity.findRelatedBusinessFromKey(false);
-			
-			tckAssertion.deleteJoePublisherPublisherAssertion(authInfoJoe);
-			tckAssertion.deleteJoePublisherPublisherAssertion2(authInfoJoe);
-			
-		} finally {
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckBusiness.deleteMaryPublisherBusiness(authInfoMary);
-			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-			tckTModel.deleteMaryPublisherTmodel(authInfoMary);
-		}
-	}
+
+        private static Log logger = LogFactory.getLog(UDDI_060_PublisherAssertionIntegrationTest.class);
+        private static TckTModel tckTModelJoe = null;
+        private static TckBusiness tckBusinessJoe = null;
+        private static TckPublisherAssertion tckAssertionJoe = null;
+        private static TckFindEntity tckFindEntityJoe = null;
+        private static TckTModel tckTModelSam = null;
+        private static TckBusiness tckBusinessSam = null;
+        private static TckPublisherAssertion tckAssertionSam = null;
+        private static TckFindEntity tckFindEntitySam = null;
+        private static TckTModel tckTModelMary = null;
+        private static TckBusiness tckBusinessMary = null;
+        private static TckPublisherAssertion tckAssertionMary = null;
+        private static TckFindEntity tckFindEntityMary = null;
+        private static String authInfoJoe = null;
+        private static String authInfoSam = null;
+        private static String authInfoMary = null;
+        private static UDDIClient manager;
+
+        @AfterClass
+        public static void stopManager() throws ConfigurationException {
+                manager.stop();
+        }
+
+        @BeforeClass
+        public static void startManager() throws ConfigurationException {
+                manager = new UDDIClient();
+                manager.start();
+
+                logger.debug("Getting auth tokens..");
+                try {
+                        Transport transport = manager.getTransport();
+                        UDDISecurityPortType security = transport.getUDDISecurityService();
+                        authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                        authInfoMary = TckSecurity.getAuthToken(security, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                        //Assert.assertNotNull(authInfoJoe);
+
+                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
+                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        }
+                        tckTModelJoe = new TckTModel(publication, inquiry);
+                        tckBusinessJoe = new TckBusiness(publication, inquiry);
+                        tckAssertionJoe = new TckPublisherAssertion(publication);
+                        tckFindEntityJoe = new TckFindEntity(inquiry);
+
+                        transport = manager.getTransport();
+                        publication = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                        }
+                        tckTModelSam = new TckTModel(publication, inquiry);
+                        tckBusinessSam = new TckBusiness(publication, inquiry);
+                        tckAssertionSam = new TckPublisherAssertion(publication);
+                        tckFindEntitySam = new TckFindEntity(inquiry);
+                        
+                        
+                        transport = manager.getTransport();
+                        publication = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getMaryPublisherId(), TckPublisher.getMaryPassword());
+                        }
+                        tckTModelMary = new TckTModel(publication, inquiry);
+                        tckBusinessMary = new TckBusiness(publication, inquiry);
+                        tckAssertionMary = new TckPublisherAssertion(publication);
+                        tckFindEntityMary = new TckFindEntity(inquiry);
+
+                } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        Assert.fail("Could not obtain authInfo token.");
+                }
+        }
+
+        @Test
+        public void testJoepublisherToSamSyndicator() {
+                try {
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckAssertionJoe.saveJoePublisherPublisherAssertion(authInfoJoe);
+                        tckAssertionJoe.deleteJoePublisherPublisherAssertion(authInfoJoe);
+                } finally {
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                }
+        }
+
+        /**
+         * This test should find no publisher assertions because we only save
+         * them from the joe publisher side.
+         */
+        @Test
+        public void testFindNoAssertions() {
+                try {
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);
+                        tckAssertionJoe.saveJoePublisherPublisherAssertion(authInfoJoe);
+                        tckAssertionJoe.saveJoePublisherPublisherAssertion2(authInfoJoe);
+
+                        tckFindEntityJoe.findRelatedBusiness_sortByName(true);
+                        tckFindEntityJoe.findRelatedBusinessToKey(true);
+                        tckFindEntityJoe.findRelatedBusinessFromKey(true);
+
+                        tckAssertionJoe.deleteJoePublisherPublisherAssertion(authInfoJoe);
+                        tckAssertionJoe.deleteJoePublisherPublisherAssertion2(authInfoJoe);
+                } finally {
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);
+                }
+        }
+
+        /**
+         * This test should find 2 publisher assertions.
+         */
+        @Test
+        public void testFindAssertions() {
+                try {
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);
+                        tckAssertionJoe.saveJoePublisherPublisherAssertion(authInfoJoe);
+                        tckAssertionSam.saveJoePublisherPublisherAssertion2(authInfoJoe);
+                        tckAssertionSam.saveSamPublisherPublisherAssertion(authInfoSam);
+                        tckAssertionMary.saveMaryPublisherPublisherAssertion(authInfoMary);
+
+                        tckFindEntityJoe.findRelatedBusiness_sortByName(false);
+                        tckFindEntityJoe.findRelatedBusinessToKey(false);
+                        tckFindEntityJoe.findRelatedBusinessFromKey(false);
+
+                        tckAssertionJoe.deleteJoePublisherPublisherAssertion(authInfoJoe);
+                        tckAssertionJoe.deleteJoePublisherPublisherAssertion2(authInfoJoe);
+
+                } finally {
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);
+                }
+        }
 }

Modified: juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java?rev=1550327&r1=1550326&r2=1550327&view=diff
==============================================================================
--- juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java (original)
+++ juddi/branches/juddi-3.3.x/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java Thu Dec 12 00:27:31 2013
@@ -14,6 +14,7 @@
  */
 package org.apache.juddi.v3.tck;
 
+import javax.xml.ws.BindingProvider;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -31,100 +32,105 @@ import org.uddi.v3_service.UDDISecurityP
 /**
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
-public class UDDI_070_FindEntityIntegrationTest 
-{
-  
-	private static Log logger = LogFactory.getLog(UDDI_070_FindEntityIntegrationTest.class);
-	
-	private static TckTModel tckTModel                    = null;
-	private static TckBusiness tckBusiness                = null;
-	private static TckBusinessService tckBusinessService  = null;
-	private static TckBindingTemplate tckBindingTemplate  = null;
-	private static TckFindEntity tckFindEntity            = null;
-	private static String authInfoJoe                     = null;
-    private static UDDIClient manager;
-	
-	@AfterClass
-	public static void stopManager() throws ConfigurationException {
-		manager.stop();
-	}
-	
-	@BeforeClass
-	public static void startManager() throws ConfigurationException {
-		manager  = new UDDIClient();
-		manager.start();
-		
-		logger.debug("Getting auth tokens..");
-		try {
-			 Transport transport = manager.getTransport();
-        	 UDDISecurityPortType security = transport.getUDDISecurityService();
-        	 authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(),  TckPublisher.getJoePassword());
-        	 Assert.assertNotNull(authInfoJoe);
-        	 
-        	 UDDIPublicationPortType publication = transport.getUDDIPublishService();
-        	 UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
-        	 tckTModel  = new TckTModel(publication, inquiry);
-        	 tckBusiness = new TckBusiness(publication, inquiry);
-        	 tckBusinessService = new TckBusinessService(publication, inquiry);
-        	 tckBindingTemplate = new TckBindingTemplate(publication, inquiry);
-        	 tckFindEntity = new TckFindEntity(inquiry);
-	         
-	     } catch (Exception e) {
-	    	 logger.error(e.getMessage(), e);
-				Assert.fail("Could not obtain authInfo token.");
-	     } 
-	}
-	
-	@Test
-	public void findEntities() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			tckFindEntity.findBusiness();
-			tckFindEntity.findService(null);
-			tckFindEntity.findBinding(null);
-			tckFindEntity.findTModel(null);
-			tckFindEntity.getNonExitingBusiness();
-		} catch (Exception e) {
-			e.printStackTrace();
-			Assert.fail();
-		} catch (Throwable t) {
-			t.printStackTrace();
-			Assert.fail();
-		} finally {
-			tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-			tckBusinessService.deleteJoePublisherService(authInfoJoe);
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-		}
-	}
-
-	@Test
-	public void findSignedEntities() {
-		try {
-			tckTModel.saveJoePublisherTmodel(authInfoJoe);
-			tckBusiness.saveJoePublisherBusinessX509Signature(authInfoJoe);
-			tckBusinessService.saveJoePublisherService(authInfoJoe);
-			tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-			
-			tckFindEntity.findAllSignedBusiness();
-			tckFindEntity.findService(UDDIConstants.SIGNATURE_PRESENT);
-			tckFindEntity.findBinding(UDDIConstants.SIGNATURE_PRESENT);
-			//tckFindEntity.findTModel(UDDIConstants.SIGNATURE_PRESENT);
-			
-			tckFindEntity.findAllBusiness();
-			tckFindEntity.getNonExitingBusiness();
-		} finally {
-			tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-			tckBusinessService.deleteJoePublisherService(authInfoJoe);
-			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-		}
-		
-	}
-	
+public class UDDI_070_FindEntityIntegrationTest {
 
+        private static Log logger = LogFactory.getLog(UDDI_070_FindEntityIntegrationTest.class);
+        private static TckTModel tckTModel = null;
+        private static TckBusiness tckBusiness = null;
+        private static TckBusinessService tckBusinessService = null;
+        private static TckBindingTemplate tckBindingTemplate = null;
+        private static TckFindEntity tckFindEntity = null;
+        private static String authInfoJoe = null;
+        private static UDDIClient manager;
+
+        @AfterClass
+        public static void stopManager() throws ConfigurationException {
+                manager.stop();
+        }
+
+        @BeforeClass
+        public static void startManager() throws ConfigurationException {
+                manager = new UDDIClient();
+                manager.start();
+
+                logger.debug("Getting auth tokens..");
+                try {
+                        Transport transport = manager.getTransport();
+                        UDDISecurityPortType security = transport.getUDDISecurityService();
+                        authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        //Assert.assertNotNull(authInfoJoe);
+                        
+
+                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
+                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
+                        
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        }
+                        
+                        
+                        tckTModel = new TckTModel(publication, inquiry);
+                        tckBusiness = new TckBusiness(publication, inquiry);
+                        tckBusinessService = new TckBusinessService(publication, inquiry);
+                        tckBindingTemplate = new TckBindingTemplate(publication, inquiry);
+                        tckFindEntity = new TckFindEntity(inquiry);
+
+                } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        Assert.fail("Could not obtain authInfo token.");
+                }
+        }
+
+        @Test
+        public void findEntities() {
+                try {
+                        tckTModel.saveJoePublisherTmodel(authInfoJoe, true);
+                        tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessService.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+                        tckFindEntity.findBusiness();
+                        tckFindEntity.findService(null);
+                        tckFindEntity.findBinding(null);
+                        tckFindEntity.findTModel(null);
+                        tckFindEntity.getNonExitingBusiness();
+                } catch (Exception e) {
+                        e.printStackTrace();
+                        Assert.fail();
+                } catch (Throwable t) {
+                        t.printStackTrace();
+                        Assert.fail();
+                } finally {
+                        tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+                        tckBusinessService.deleteJoePublisherService(authInfoJoe);
+                        tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
+
+        @Test
+        public void findSignedEntities() {
+                try {
+                        tckTModel.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusiness.saveJoePublisherBusinessX509Signature(authInfoJoe);
+                        tckBusinessService.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
+
+                        tckFindEntity.findAllSignedBusiness();
+                        tckFindEntity.findService(UDDIConstants.SIGNATURE_PRESENT);
+                        tckFindEntity.findBinding(UDDIConstants.SIGNATURE_PRESENT);
+                        //tckFindEntity.findTModel(UDDIConstants.SIGNATURE_PRESENT);
+
+                        tckFindEntity.findAllBusiness();
+                        tckFindEntity.getNonExitingBusiness();
+                } finally {
+                        tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
+                        tckBusinessService.deleteJoePublisherService(authInfoJoe);
+                        tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+                }
+
+        }
 }



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


Mime
View raw message