juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1555648 [8/13] - in /juddi/trunk: ./ docs/examples/auth/ juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-core-openjpa/ juddi-core/src/main/java/org/apache/juddi/api/impl/ juddi-core/src/main/java/org/apache/juddi/subscr...
Date Mon, 06 Jan 2014 02:18:39 GMT
Modified: juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_080_SubscriptionIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_080_SubscriptionIntegrationTest.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_080_SubscriptionIntegrationTest.java (original)
+++ juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_080_SubscriptionIntegrationTest.java Mon Jan  6 02:18:37 2014
@@ -22,6 +22,7 @@ import javax.xml.datatype.DatatypeConfig
 import javax.xml.datatype.DatatypeFactory;
 import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.soap.SOAPFault;
+import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Holder;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
@@ -31,9 +32,11 @@ import org.apache.juddi.v3.client.config
 import org.apache.juddi.v3.client.transport.Transport;
 import org.junit.AfterClass;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.uddi.api_v3.AddPublisherAssertions;
+import org.uddi.api_v3.BusinessDetail;
 import org.uddi.api_v3.BusinessEntity;
 import org.uddi.api_v3.BusinessService;
 import org.uddi.api_v3.CompletionStatus;
@@ -60,877 +63,1103 @@ import org.uddi.v3_service.UDDISubscript
 /**
  * @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_080_SubscriptionIntegrationTest {
 
-    private static Log logger = LogFactory.getLog(UDDI_080_SubscriptionIntegrationTest.class);
-    private static TckTModel tckTModel = null;
-    private static TckBusiness tckBusiness = null;
-    private static TckBusinessService tckBusinessService = null;
-    private static TckBindingTemplate tckBindingTemplate = null;
-    private static TckSubscription tckSubscription = null;
-    private static String authInfoJoe = null;
-    private static String authInfoSam = null;
-    private static UDDIClient manager;
-    static UDDIPublicationPortType publication = null;
-
-    @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);
-            UDDISubscriptionPortType subscription = transport.getUDDISubscriptionService();
-
-            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);
-
-            tckSubscription = new TckSubscription(subscription, security,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.");
-        }
-    }
-    static final String TRANS = "The transaction has been rolled back";
-    static final String MISSING_RESOURCE = "Can't find resource for bundle";
-
-    static void HandleException(Exception ex) {
-        System.err.println("Error caught of type " + ex.getClass().getCanonicalName());
-        ex.printStackTrace();
-        if (ex.getMessage() != null) {
-            Assert.assertFalse(ex.getMessage().contains(TRANS));
-            Assert.assertFalse(ex.getMessage().contains(MISSING_RESOURCE));
-        }
-        if (ex instanceof SOAPFault) {
-            SOAPFault sf = (SOAPFault) ex;
-            if (!sf.getTextContent().contains("org.apache.juddi.v3.error.ValueNotAllowedException")) {
-                Assert.fail();
-            }
-        }
-    }
-
-    @Test
-    public void joePublisher() {
-            logger.info("UDDI_080_SubscriptionIntegrationTest joePublisher");
-        try {
-            tckTModel.saveJoePublisherTmodel(authInfoJoe);
-            tckBusiness.saveJoePublisherBusiness(authInfoJoe);
-            tckBusinessService.saveJoePublisherService(authInfoJoe);
-            tckBindingTemplate.saveJoePublisherBinding(authInfoJoe);
-            tckSubscription.saveJoePublisherSubscription(authInfoJoe);
-            tckSubscription.getJoePublisherSubscriptionResults(authInfoJoe);
-        } finally {
-            tckSubscription.deleteJoePublisherSubscription(authInfoJoe);
-            tckBindingTemplate.deleteJoePublisherBinding(authInfoJoe);
-            tckBusinessService.deleteJoePublisherService(authInfoJoe);
-            tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
-            tckTModel.deleteJoePublisherTmodel(authInfoJoe);
-        }
-    }
-
-    @Test
-    public void samSyndicator() {
-        try {
-            tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-            tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-            tckBusinessService.saveSamSyndicatorService(authInfoSam);
-            tckSubscription.saveSamSyndicatorSubscription(authInfoSam);
-            tckSubscription.getSamSyndicatorSubscriptionResults(authInfoSam);
-        } finally {
-            tckSubscription.deleteSamSyndicatorSubscription(authInfoSam);
-            tckBusinessService.deleteSamSyndicatorService(authInfoSam);
-            tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-            tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-        }
-
-    }
-
-    @Test
-    public void samSyndicatorWithChunkingOnFind() {
-        try {
-            tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-            tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-            tckBusinessService.saveSamSyndicatorService(authInfoSam);
-            tckSubscription.saveSamSyndicatorSubscriptionWithChunkingOnFind(authInfoSam);
-            tckSubscription.getSamSyndicatorSubscriptionResultsWithChunkingOnFind(authInfoSam);
-        } finally {
-            tckSubscription.deleteSamSyndicatorSubscriptionWithChunkingOnFind(authInfoSam);
-            tckBusinessService.deleteSamSyndicatorService(authInfoSam);
-            tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-            tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-        }
-
-    }
-
-    @Test
-    public void samSyndicatorWithChunkingOnGet() {
-        try {
-            tckTModel.saveSamSyndicatorTmodel(authInfoSam);
-            tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
-            tckBusinessService.saveSamSyndicatorService(authInfoSam);
-            tckSubscription.saveSamSyndicatorSubscriptionWithChunkingOnGet(authInfoSam);
-            tckSubscription.getSamSyndicatorSubscriptionResultsWithChunkingOnGet(authInfoSam);
-        } finally {
-            tckSubscription.deleteSamSyndicatorSubscriptionWithChunkingOnGet(authInfoSam);
-            tckBusinessService.deleteSamSyndicatorService(authInfoSam);
-            tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
-            tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
-        }
-
-    }
-
-    /**
-     * Null expiration time
-     */
-    @Test
-    public void JUDDI_606_1() {
-        System.out.println("JUDDI_606_1");
-        // Null expiration time
-
-        Subscription sub = new Subscription();
-        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-        data.value = new ArrayList<Subscription>();
-        sub.setBrief(true);
-        sub.setExpiresAfter(null);
-        sub.setMaxEntities(1);
-        sub.setNotificationInterval(null);
-        sub.setBindingKey(null);
-        sub.setSubscriptionFilter(new SubscriptionFilter());
-        sub.getSubscriptionFilter().setFindService(new FindService());
-        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-        data.value.add(sub);
-        try {
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.assertNotNull(data.value.get(0).getExpiresAfter());
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void JUDDI_606_2() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_2");
-        // invalid expiration time
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        GregorianCalendar gcal = new GregorianCalendar();
-        gcal.setTimeInMillis(System.currentTimeMillis());
-        gcal.add(Calendar.DATE, -1);
-        XMLGregorianCalendar newXMLGregorianCalendar = df.newXMLGregorianCalendar(gcal);
-
-        Subscription sub = new Subscription();
-        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-        data.value = new ArrayList<Subscription>();
-        sub.setBrief(true);
-        sub.setExpiresAfter(newXMLGregorianCalendar);
-        sub.setMaxEntities(1);
-        sub.setNotificationInterval(null);
-        sub.setBindingKey(null);
-        sub.setSubscriptionFilter(new SubscriptionFilter());
-        sub.getSubscriptionFilter().setFindService(new FindService());
-        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-        data.value.add(sub);
-        try {
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.fail();
-        } catch (Exception ex) {
-            //HandleException(ex);
-        }
-    }
-
-    @Test
-    public void JUDDI_606_3() {
-        System.out.println("JUDDI_606_3");
-        //confirm a subscription key is returned when not specified
-
-        Subscription sub = new Subscription();
-        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-        data.value = new ArrayList<Subscription>();
-        sub.setBrief(true);
-        sub.setExpiresAfter(null);
-        sub.setMaxEntities(1);
-        sub.setNotificationInterval(null);
-        sub.setBindingKey(null);
-        sub.setSubscriptionFilter(new SubscriptionFilter());
-        sub.getSubscriptionFilter().setFindService(new FindService());
-        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-        data.value.add(sub);
-        try {
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.assertNotNull(data.value.get(0).getSubscriptionKey());
-            Assert.assertTrue(data.value.get(0).getSubscriptionKey().length() > 0);
-        } catch (Exception ex) {
-            //HandleException(ex);
-        }
-    }
-
-    @Test
-    public void JUDDI_606_4() {
-        System.out.println("JUDDI_606_4");
-        //null subscription filter
-
-        Subscription sub = new Subscription();
-        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-        data.value = new ArrayList<Subscription>();
-        sub.setBrief(true);
-        sub.setExpiresAfter(null);
-        sub.setMaxEntities(1);
-        sub.setNotificationInterval(null);
-        sub.setBindingKey(null);
-        sub.setSubscriptionFilter(null);
-
-        try {
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.fail();
-        } catch (Exception ex) {
-            //HandleException(ex);
-        }
-    }
-
-    @Test
-    public void JUDDI_606_5() {
-        System.out.println("JUDDI_606_5");
-        //empty subscription filter
-
-        Subscription sub = new Subscription();
-        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-        data.value = new ArrayList<Subscription>();
-        sub.setBrief(true);
-        sub.setExpiresAfter(null);
-        sub.setMaxEntities(1);
-        sub.setNotificationInterval(null);
-        sub.setBindingKey(null);
-        sub.setSubscriptionFilter(new SubscriptionFilter());
-
-        data.value.add(sub);
-        try {
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.fail();
-        } catch (Exception ex) {
-            //HandleException(ex);
-        }
-    }
-
-    @Test
-    public void JUDDI_606_6() {
-        System.out.println("JUDDI_606_6");
-        //negative max entities
-
-        Subscription sub = new Subscription();
-        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-        data.value = new ArrayList<Subscription>();
-        sub.setBrief(true);
-        sub.setExpiresAfter(null);
-        sub.setMaxEntities(-1);
-        sub.setNotificationInterval(null);
-        sub.setBindingKey(null);
-        sub.setSubscriptionFilter(new SubscriptionFilter());
-        sub.getSubscriptionFilter().setFindService(new FindService());
-        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-        data.value.add(sub);
-        try {
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.assertTrue(data.value.get(0).getMaxEntities() > 0);
-        } catch (Exception ex) {
-            //HandleException(ex);
-            //this is ok as well
-        }
-    }
-
-    @Test
-    public void JUDDI_606_7() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_7");
-        //more filters that expected
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
-            sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
-            sub.getSubscriptionFilter().setFindService(new FindService());
-            sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.fail();
-        } catch (Exception ex) {
-            HandleException(ex);
-
-        }
-    }
-
-    @Test
-    public void JUDDI_606_8() {
-        System.out.println("JUDDI_606_8");
-        //reset expiration
-
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(true);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindService(new FindService());
-            sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.assertNotNull(data.value.get(0).getExpiresAfter());
-            XMLGregorianCalendar xcal = data.value.get(0).getExpiresAfter();
-
-            Thread.sleep(5000);
-            data.value.get(0).setExpiresAfter(null);
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.assertNotNull(data.value.get(0).getExpiresAfter());
-            Assert.assertNotSame(xcal, data.value.get(0).getExpiresAfter());
-            long initial = xcal.toGregorianCalendar().getTimeInMillis();
-            long finaltime = data.value.get(0).getExpiresAfter().toGregorianCalendar().getTimeInMillis();
-            Assert.assertTrue(finaltime > initial);
-
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
-        }
-    }
-
-    @Test
-    public void JUDDI_606_9() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_9");
-        //asynch subscriptions , key doesn't exist
-
-        DatatypeFactory df = DatatypeFactory.newInstance();
-
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(true);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(df.newDuration(5000));
-            sub.setBindingKey("uddi:uddi.joepublisher.com:mykey");
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindService(new FindService());
-            sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.fail();
-        } catch (Exception ex) {
-//            HandleException(ex);
-            //Assert.fail();
-        }
-    }
-
-    @Test
-    public void JUDDI_606_10() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_10");
-        //asynch subscriptions, key exists , null interval
-
-        DatatypeFactory df = DatatypeFactory.newInstance();
-
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(true);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(TckBindingTemplate.JOE_BINDING_KEY);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindService(new FindService());
-            sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            Assert.fail();
-        } catch (Exception ex) {
-            //HandleException(ex);
-        }
-    }
-
-    @Test
-    public void JUDDI_606_11() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_11");
-        //set subscription, make a change as the same user, get subscription results
-        //no key specified
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
-            sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            SaveBusiness sb = new SaveBusiness();
-            sb.setAuthInfo(authInfoJoe);
-            BusinessEntity be = new BusinessEntity();
-            be.getName().add(new Name("Test business", null));
-            sb.getBusinessEntity().add(be);
-            publication.saveBusiness(sb);
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(null);
-            gsr.setCoveragePeriod(new CoveragePeriod());
-            GregorianCalendar gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gcal.add(Calendar.HOUR, -1);
-            gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
-            gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
-            tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.fail();
-        } catch (Exception ex) {
-            //HandleException(ex);
-            //Assert.fail();
-        }
-    }
-
-    @Test
-    public void JUDDI_606_12() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_12");
-        //set subscription, make a change as the same user, get subscription results
-        //no period specified
-
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
-            sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            SaveBusiness sb = new SaveBusiness();
-            sb.setAuthInfo(authInfoJoe);
-            BusinessEntity be = new BusinessEntity();
-            be.getName().add(new Name("Test business", null));
-            sb.getBusinessEntity().add(be);
-            publication.saveBusiness(sb);
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
-            gsr.setCoveragePeriod(null);
-            tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.fail();
-        } catch (Exception ex) {
-            //HandleException(ex);
-            //Assert.fail();
-        }
-    }
-
-    @Test
-    public void JUDDI_606_13() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_13");
-        //set subscription, make a change as the same user, get subscription results
-        //valid find_Business
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
-            sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            SaveBusiness sb = new SaveBusiness();
-            sb.setAuthInfo(authInfoJoe);
-            BusinessEntity be = new BusinessEntity();
-            be.getName().add(new Name("Test business", null));
-            sb.getBusinessEntity().add(be);
-            publication.saveBusiness(sb);
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
-            gsr.setCoveragePeriod(new CoveragePeriod());
-            GregorianCalendar gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gcal.add(Calendar.HOUR, -1);
-            gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
-            gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
-            SubscriptionResultsList subscriptionResults = tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.assertNotNull(subscriptionResults);
-            Assert.assertNotNull(subscriptionResults.getBusinessList());
-            Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
-            Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos());
-            Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos().getBusinessInfo().get(0));
-            Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos().getBusinessInfo().get(0).getBusinessKey());
-            Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos().getBusinessInfo().get(0).getName().get(0));
-
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
-        }
-    }
-
-    public void JUDDI_606_14() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_14");
-        //set subscription, make a change as the same user, get subscription results
-        //valid find_services
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setFindService(new FindService());
-            sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
-            sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
-            sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-            SaveService sb = new SaveService();
-            sb.setAuthInfo(authInfoJoe);
-            BusinessService bs = new BusinessService();
-            bs.getName().add(new Name("svc", null));
-            sb.getBusinessService().add(bs);
-            publication.saveService(sb);
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
-            gsr.setCoveragePeriod(new CoveragePeriod());
-            GregorianCalendar gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gcal.add(Calendar.HOUR, -1);
-            gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
-            gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
-            SubscriptionResultsList subscriptionResults = tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.assertNotNull(subscriptionResults);
-            Assert.assertNull(subscriptionResults.getBusinessList());
-            Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
-            Assert.assertNotNull(subscriptionResults.getServiceList());
-            Assert.assertNotNull(subscriptionResults.getServiceList().getServiceInfos().getServiceInfo().get(0));
-            Assert.assertNotNull(subscriptionResults.getServiceList().getServiceInfos().getServiceInfo().get(0).getBusinessKey());
-            Assert.assertNotNull(subscriptionResults.getServiceList().getServiceInfos().getServiceInfo().get(0).getName().get(0));
-
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
-        }
-    }
-
-    public void JUDDI_606_15() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_15");
-        //set subscription, make a change as the same user, get subscription results
-        //valid publisher assertion, incomplete
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());
-            sub.getSubscriptionFilter().getGetAssertionStatusReport().setCompletionStatus(CompletionStatus.STATUS_TO_KEY_INCOMPLETE);
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-
-            AddPublisherAssertions r = new AddPublisherAssertions();
-            r.setAuthInfo(authInfoJoe);
-            PublisherAssertion pa = new PublisherAssertion();
-            pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
-            pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
-            pa.setKeyedReference(new KeyedReference());
-            pa.getKeyedReference().setKeyName("Subsidiary");
-            pa.getKeyedReference().setKeyValue("parent-child");
-
-            pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
-
-            r.getPublisherAssertion().add(pa);
-            publication.addPublisherAssertions(r);
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
-            gsr.setCoveragePeriod(new CoveragePeriod());
-            GregorianCalendar gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gcal.add(Calendar.HOUR, -1);
-            gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
-            gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
-            SubscriptionResultsList subscriptionResults = tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.assertNotNull(subscriptionResults);
-            Assert.assertNull(subscriptionResults.getBusinessList());
-            Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
-            Assert.assertNull(subscriptionResults.getServiceList());
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport());
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem());
-            Assert.assertFalse(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().isEmpty());
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getFromKey(), TckBusiness.JOE_BUSINESS_KEY);
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getToKey(), TckBusiness.SAM_BUSINESS_KEY);
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getCompletionStatus());
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getCompletionStatus(), CompletionStatus.STATUS_TO_KEY_INCOMPLETE);
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getKeyedReference());
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
-        }
-    }
-
-    public void JUDDI_606_16() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_16");
-        //set subscription, make a change as the same user, get subscription results
-        //valid publisher assertion, complete
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());
-            sub.getSubscriptionFilter().getGetAssertionStatusReport().setCompletionStatus(CompletionStatus.STATUS_COMPLETE);
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-
-            AddPublisherAssertions r = new AddPublisherAssertions();
-            r.setAuthInfo(authInfoJoe);
-            PublisherAssertion pa = new PublisherAssertion();
-            pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
-            pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
-            pa.setKeyedReference(new KeyedReference());
-            pa.getKeyedReference().setKeyName("Subsidiary");
-            pa.getKeyedReference().setKeyValue("parent-child");
-            pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
-            r.getPublisherAssertion().add(pa);
-            publication.addPublisherAssertions(r);
-
-
-            r = new AddPublisherAssertions();
-            r.setAuthInfo(authInfoSam);
-            pa = new PublisherAssertion();
-            pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
-            pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
-            pa.setKeyedReference(new KeyedReference());
-            pa.getKeyedReference().setKeyName("Subsidiary");
-            pa.getKeyedReference().setKeyValue("parent-child");
-            pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
-            r.getPublisherAssertion().add(pa);
-            publication.addPublisherAssertions(r);
-
-
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
-            gsr.setCoveragePeriod(new CoveragePeriod());
-            GregorianCalendar gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gcal.add(Calendar.HOUR, -1);
-            gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
-            gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
-            SubscriptionResultsList subscriptionResults = tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.assertNotNull(subscriptionResults);
-            Assert.assertNull(subscriptionResults.getBusinessList());
-            Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
-            Assert.assertNull(subscriptionResults.getServiceList());
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport());
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem());
-            Assert.assertFalse(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().isEmpty());
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getFromKey(), TckBusiness.JOE_BUSINESS_KEY);
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getToKey(), TckBusiness.SAM_BUSINESS_KEY);
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getCompletionStatus());
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getCompletionStatus(), CompletionStatus.STATUS_COMPLETE);
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getKeyedReference());
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
-        }
-    }
-
-    public void JUDDI_606_17() throws DatatypeConfigurationException {
-        System.out.println("JUDDI_606_17");
-        //set subscription, make a change as the same user, get subscription results
-        //valid publisher assertion, deleted
-        DatatypeFactory df = DatatypeFactory.newInstance();
-        try {
-
-            Holder<List<Subscription>> data = new Holder<List<Subscription>>();
-            data.value = new ArrayList<Subscription>();
-            Subscription sub = new Subscription();
-            sub.setBrief(false);
-            sub.setExpiresAfter(null);
-            sub.setMaxEntities(null);
-            sub.setNotificationInterval(null);
-            sub.setBindingKey(null);
-            sub.setSubscriptionFilter(new SubscriptionFilter());
-            sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());
-            sub.getSubscriptionFilter().getGetAssertionStatusReport().setCompletionStatus(CompletionStatus.STATUS_BOTH_INCOMPLETE);
-            data.value.add(sub);
-
-            tckSubscription.subscription.saveSubscription(authInfoJoe, data);
-
-            AddPublisherAssertions r = new AddPublisherAssertions();
-            r.setAuthInfo(authInfoJoe);
-            PublisherAssertion pa = new PublisherAssertion();
-            pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
-            pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
-            pa.setKeyedReference(new KeyedReference());
-            pa.getKeyedReference().setKeyName("Subsidiary");
-            pa.getKeyedReference().setKeyValue("parent-child");
-            pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
-            r.getPublisherAssertion().add(pa);
-            publication.addPublisherAssertions(r);
-
-            //approve it
-            r = new AddPublisherAssertions();
-            r.setAuthInfo(authInfoSam);
-            r.getPublisherAssertion().add(pa);
-            publication.addPublisherAssertions(r);
-
-            DeletePublisherAssertions dp = new DeletePublisherAssertions();
-            dp.setAuthInfo(authInfoJoe);
-            dp.getPublisherAssertion().add(pa);
-            publication.deletePublisherAssertions(dp);
-
-            dp = new DeletePublisherAssertions();
-            dp.setAuthInfo(authInfoSam);
-            dp.getPublisherAssertion().add(pa);
-            publication.deletePublisherAssertions(dp);
-
-
-            GetSubscriptionResults gsr = new GetSubscriptionResults();
-            gsr.setAuthInfo(authInfoJoe);
-            gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
-            gsr.setCoveragePeriod(new CoveragePeriod());
-            GregorianCalendar gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gcal.add(Calendar.HOUR, -1);
-            gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
-            gcal = new GregorianCalendar();
-            gcal.setTimeInMillis(System.currentTimeMillis());
-            gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
-            SubscriptionResultsList subscriptionResults = tckSubscription.subscription.getSubscriptionResults(gsr);
-            Assert.assertNotNull(subscriptionResults);
-            Assert.assertNull(subscriptionResults.getBusinessList());
-            Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
-            Assert.assertNull(subscriptionResults.getServiceList());
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport());
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem());
-            Assert.assertFalse(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().isEmpty());
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getFromKey(), TckBusiness.JOE_BUSINESS_KEY);
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getToKey(), TckBusiness.SAM_BUSINESS_KEY);
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getCompletionStatus());
-            Assert.assertEquals(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getCompletionStatus(), CompletionStatus.STATUS_BOTH_INCOMPLETE);
-            Assert.assertNotNull(subscriptionResults.getAssertionStatusReport().getAssertionStatusItem().get(0).getKeyedReference());
-        } catch (Exception ex) {
-            HandleException(ex);
-            Assert.fail();
+        private static Log logger = LogFactory.getLog(UDDI_080_SubscriptionIntegrationTest.class);
+        private static TckTModel tckTModelJoe = null;
+        private static TckBusiness tckBusinessJoe = null;
+        private static TckBusinessService tckBusinessServiceJoe = null;
+        private static TckBindingTemplate tckBindingTemplateJoe = null;
+        private static TckSubscription tckSubscriptionJoe = null;
+        private static TckTModel tckTModelSam = null;
+        private static TckBusiness tckBusinessSam = null;
+        private static TckBusinessService tckBusinessServiceSam = null;
+//        private static TckBindingTemplate tckBindingTemplateSam = null;
+        private static TckSubscription tckSubscriptionSam = null;
+        private static String authInfoJoe = null;
+        private static String authInfoSam = null;
+        private static UDDIClient manager;
+        static UDDIPublicationPortType publicationJoe = null;
+        static UDDIPublicationPortType publicationSam = null;
+        static UDDISubscriptionPortType subscriptionJoe = null;
+
+        @AfterClass
+        public static void stopManager() throws ConfigurationException {
+                tckTModelJoe.deleteCreatedTModels(authInfoJoe);
+                tckTModelSam.deleteCreatedTModels(authInfoSam);
+                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);
+                        UDDISubscriptionPortType subscription = transport.getUDDISubscriptionService();
+
+                        publicationJoe = transport.getUDDIPublishService();
+                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
+
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publicationJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) subscription, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
+                        }
+
+                        tckTModelJoe = new TckTModel(publicationJoe, inquiry);
+                        tckBusinessJoe = new TckBusiness(publicationJoe, inquiry);
+                        tckBusinessServiceJoe = new TckBusinessService(publicationJoe, inquiry);
+                        tckBindingTemplateJoe = new TckBindingTemplate(publicationJoe, inquiry);
+                        subscriptionJoe = subscription;
+                        tckSubscriptionJoe = new TckSubscription(subscription, security, inquiry);
+
+
+                        transport = manager.getTransport();
+                        publicationSam = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+                        subscription = transport.getUDDISubscriptionService();
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publicationSam, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                                TckSecurity.setCredentials((BindingProvider) subscription, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
+                        }
+                        tckTModelSam = new TckTModel(publicationSam, inquiry);
+                        tckBusinessSam = new TckBusiness(publicationSam, inquiry);
+                        tckBusinessServiceSam = new TckBusinessService(publicationSam, inquiry);
+                        //tckBindingTemplateSam = new TckBindingTemplate(publicationSam, inquiry);
+                        tckSubscriptionSam = new TckSubscription(subscription, security, inquiry);
+
+
+                        String authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                        transport = manager.getTransport();
+                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
+                        inquiry = transport.getUDDIInquiryService();
+
+                        if (!TckPublisher.isUDDIAuthMode()) {
+                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+
+                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
+                        }
+
+                        TckTModel tckTModelUDDI = new TckTModel(publication, inquiry);
+                        tckTModelUDDI.saveUDDIPublisherTmodel(authInfoUDDI);
+                        tckTModelUDDI.saveTModels(authInfoUDDI, TckTModel.TMODELS_XML);
+                } catch (Exception e) {
+                        logger.error(e.getMessage(), e);
+                        Assert.fail("Could not obtain authInfo token.");
+                }
+        }
+        static final String TRANS = "The transaction has been rolled back";
+        static final String MISSING_RESOURCE = "Can't find resource for bundle";
+
+        static void HandleException(Exception ex) {
+                System.err.println("Error caught of type " + ex.getClass().getCanonicalName());
+                ex.printStackTrace();
+                if (ex.getMessage() != null) {
+                        Assert.assertFalse(ex.getMessage().contains(TRANS));
+                        Assert.assertFalse(ex.getMessage().contains(MISSING_RESOURCE));
+                }
+                if (ex instanceof SOAPFault) {
+                        SOAPFault sf = (SOAPFault) ex;
+                        if (!sf.getTextContent().contains("org.apache.juddi.v3.error.ValueNotAllowedException")) {
+                                Assert.fail();
+                        }
+                }
+        }
+
+        @Test
+        public void joePublisher() {
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                try {
+                        TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplateJoe.saveJoePublisherBinding(authInfoJoe);
+                        tckSubscriptionJoe.saveJoePublisherSubscription(authInfoJoe);
+                        tckSubscriptionJoe.getJoePublisherSubscriptionResults(authInfoJoe);
+                } finally {
+                        tckSubscriptionJoe.deleteJoePublisherSubscription(authInfoJoe);
+                        tckBindingTemplateJoe.deleteJoePublisherBinding(authInfoJoe);
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
+
+        @Test
+        public void samSyndicator() {
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                try {
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckBusinessServiceSam.saveSamSyndicatorService(authInfoSam);
+                        tckSubscriptionSam.saveSamSyndicatorSubscription(authInfoSam);
+                        tckSubscriptionSam.getSamSyndicatorSubscriptionResults(authInfoSam);
+                } finally {
+                        tckSubscriptionSam.deleteSamSyndicatorSubscription(authInfoSam);
+                        tckBusinessServiceSam.deleteSamSyndicatorService(authInfoSam);
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                }
+
+        }
+
+        @Test
+        public void samSyndicatorWithChunkingOnFind() {
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                try {
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckBusinessServiceSam.saveSamSyndicatorService(authInfoSam);
+                        tckSubscriptionSam.saveSamSyndicatorSubscriptionWithChunkingOnFind(authInfoSam);
+                        tckSubscriptionSam.getSamSyndicatorSubscriptionResultsWithChunkingOnFind(authInfoSam);
+                } finally {
+                        tckSubscriptionSam.deleteSamSyndicatorSubscriptionWithChunkingOnFind(authInfoSam);
+                        tckBusinessServiceSam.deleteSamSyndicatorService(authInfoSam);
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                }
+
+        }
+
+        @Test
+        public void samSyndicatorWithChunkingOnGet() {
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                try {
+                        tckTModelSam.saveSamSyndicatorTmodel(authInfoSam);
+                        tckBusinessSam.saveSamSyndicatorBusiness(authInfoSam);
+                        tckBusinessServiceSam.saveSamSyndicatorService(authInfoSam);
+                        tckSubscriptionSam.saveSamSyndicatorSubscriptionWithChunkingOnGet(authInfoSam);
+                        tckSubscriptionSam.getSamSyndicatorSubscriptionResultsWithChunkingOnGet(authInfoSam);
+                } finally {
+                        tckSubscriptionSam.deleteSamSyndicatorSubscriptionWithChunkingOnGet(authInfoSam);
+                        tckBusinessServiceSam.deleteSamSyndicatorService(authInfoSam);
+                        tckBusinessSam.deleteSamSyndicatorBusiness(authInfoSam);
+                        tckTModelSam.deleteSamSyndicatorTmodel(authInfoSam);
+                }
+
+        }
+
+        /**
+         * Null expiration time, the server should set the expiration time
+         */
+        @Test
+        public void JUDDI_606_1() {
+                System.out.println("JUDDI_606_1");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                // Null expiration time
+
+                Subscription sub = new Subscription();
+                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                data.value = new ArrayList<Subscription>();
+                sub.setBrief(true);
+                sub.setExpiresAfter(null);
+                sub.setMaxEntities(1);
+                sub.setNotificationInterval(null);
+                sub.setBindingKey(null);
+                sub.setSubscriptionFilter(new SubscriptionFilter());
+                sub.getSubscriptionFilter().setFindService(new FindService());
+                sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                data.value.add(sub);
+                try {
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.assertNotNull(data.value.get(0).getExpiresAfter());
+                } catch (Exception ex) {
+                        HandleException(ex);
+                        Assert.fail();
+                }
+        }
+
+        /**
+         * invalid expiration time
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_2() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_2");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                // invalid expiration time
+                DatatypeFactory df = DatatypeFactory.newInstance();
+                GregorianCalendar gcal = new GregorianCalendar();
+                gcal.setTimeInMillis(System.currentTimeMillis());
+                gcal.add(Calendar.DATE, -1);
+                XMLGregorianCalendar newXMLGregorianCalendar = df.newXMLGregorianCalendar(gcal);
+
+                Subscription sub = new Subscription();
+                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                data.value = new ArrayList<Subscription>();
+                sub.setBrief(true);
+                sub.setExpiresAfter(newXMLGregorianCalendar);
+                sub.setMaxEntities(1);
+                sub.setNotificationInterval(null);
+                sub.setBindingKey(null);
+                sub.setSubscriptionFilter(new SubscriptionFilter());
+                sub.getSubscriptionFilter().setFindService(new FindService());
+                sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                data.value.add(sub);
+                try {
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        logger.info("Expected exception: " + ex.getMessage());
+                }
+        }
+
+        /**
+         * confirm a subscription key is returned when not specified
+         */
+        @Test
+        public void JUDDI_606_3() {
+                System.out.println("JUDDI_606_3");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                //
+
+                Subscription sub = new Subscription();
+                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                data.value = new ArrayList<Subscription>();
+                sub.setBrief(true);
+                sub.setExpiresAfter(null);
+                sub.setMaxEntities(1);
+                sub.setNotificationInterval(null);
+                sub.setBindingKey(null);
+                sub.setSubscriptionFilter(new SubscriptionFilter());
+                sub.getSubscriptionFilter().setFindService(new FindService());
+                sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                data.value.add(sub);
+                try {
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.assertNotNull(data.value.get(0).getSubscriptionKey());
+                        Assert.assertTrue(data.value.get(0).getSubscriptionKey().length() > 0);
+                } catch (Exception ex) {
+                        HandleException(ex);
+                        Assert.fail();
+                }
+        }
+
+        /**
+         * null subscription filter
+         */
+        @Test
+        public void JUDDI_606_4() {
+                System.out.println("JUDDI_606_4");
+                //
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+
+                Subscription sub = new Subscription();
+                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                data.value = new ArrayList<Subscription>();
+                sub.setBrief(true);
+                sub.setExpiresAfter(null);
+                sub.setMaxEntities(1);
+                sub.setNotificationInterval(null);
+                sub.setBindingKey(null);
+                sub.setSubscriptionFilter(null);
+
+                try {
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        logger.info("Expected exception: " + ex.getMessage());
+                }
+        }
+
+        /**
+         * empty subscription filter
+         */
+        @Test
+        public void JUDDI_606_5() {
+                System.out.println("JUDDI_606_5");
+                //
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+
+                Subscription sub = new Subscription();
+                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                data.value = new ArrayList<Subscription>();
+                sub.setBrief(true);
+                sub.setExpiresAfter(null);
+                sub.setMaxEntities(1);
+                sub.setNotificationInterval(null);
+                sub.setBindingKey(null);
+                sub.setSubscriptionFilter(new SubscriptionFilter());
+
+                data.value.add(sub);
+                try {
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        logger.info("Expected exception: " + ex.getMessage());
+                }
+        }
+
+        /**
+         * negative max entities
+         */
+        @Test
+        public void JUDDI_606_6() {
+                System.out.println("JUDDI_606_6");
+                //
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+
+                Subscription sub = new Subscription();
+                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                data.value = new ArrayList<Subscription>();
+                sub.setBrief(true);
+                sub.setExpiresAfter(null);
+                sub.setMaxEntities(-1);
+                sub.setNotificationInterval(null);
+                sub.setBindingKey(null);
+                sub.setSubscriptionFilter(new SubscriptionFilter());
+                sub.getSubscriptionFilter().setFindService(new FindService());
+                sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                data.value.add(sub);
+                try {
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.assertTrue(data.value.get(0).getMaxEntities() > 0);
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        //this is ok as well
+                        logger.info("Expected exception: " + ex.getMessage());
+                }
+        }
+
+        /**
+         * more filters that expected
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_7() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_7");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                //
+                DatatypeFactory df = DatatypeFactory.newInstance();
+                try {
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(false);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(null);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
+                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
+                        sub.getSubscriptionFilter().setFindService(new FindService());
+                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        logger.info(ex.getMessage());
+
+                }
+        }
+
+        /**
+         * testing reset expiration. i.e. save, wait a second then resave it,
+         * the expiration time should be further into the future
+         */
+        @Test
+        public void JUDDI_606_8() {
+                System.out.println("JUDDI_606_8");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                //
+
+                try {
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(true);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(null);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindService(new FindService());
+                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.assertNotNull(data.value.get(0).getExpiresAfter());
+                        XMLGregorianCalendar xcal = data.value.get(0).getExpiresAfter();
+
+                        Thread.sleep(5000);
+                        data.value.get(0).setExpiresAfter(null);
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.assertNotNull(data.value.get(0).getExpiresAfter());
+                        Assert.assertNotSame(xcal, data.value.get(0).getExpiresAfter());
+                        long initial = xcal.toGregorianCalendar().getTimeInMillis();
+                        long finaltime = data.value.get(0).getExpiresAfter().toGregorianCalendar().getTimeInMillis();
+                        Assert.assertTrue(finaltime > initial);
+
+                } catch (Exception ex) {
+                        HandleException(ex);
+                        Assert.fail();
+                }
+        }
+
+        /**
+         * asynch subscriptions , binding key doesn't exist
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_9() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_9");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                //
+
+                DatatypeFactory df = DatatypeFactory.newInstance();
+
+                try {
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(true);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(df.newDuration(5000));
+                        sub.setBindingKey("uddi:uddi.joepublisher.com:mykey");
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindService(new FindService());
+                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        logger.info("Expected exception: " + ex.getMessage());
+                }
+        }
+
+        /**
+         * asynch subscriptions, key exists , null interval
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_10() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_10");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                //
+                try {
+
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplateJoe.saveJoePublisherBinding(authInfoJoe);
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(true);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(TckBindingTemplate.JOE_BINDING_KEY);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindService(new FindService());
+                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        logger.info("Expected exception: " + ex.getMessage());
+                } finally {
+                        tckBindingTemplateJoe.deleteJoePublisherBinding(authInfoJoe);
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                }
+        }
+
+        /**
+         * set subscription, make a change as the same user, get subscription
+         * results no key specified
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_11() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_11");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+
+                String key = null;
+                DatatypeFactory df = DatatypeFactory.newInstance();
+                try {
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(false);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(null);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
+                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        SaveBusiness sb = new SaveBusiness();
+                        sb.setAuthInfo(authInfoJoe);
+                        BusinessEntity be = new BusinessEntity();
+                        be.getName().add(new Name("Test business", null));
+                        sb.getBusinessEntity().add(be);
+                        BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);
+
+                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();
+
+                        GetSubscriptionResults gsr = new GetSubscriptionResults();
+                        gsr.setAuthInfo(authInfoJoe);
+                        gsr.setSubscriptionKey(null);
+                        gsr.setCoveragePeriod(new CoveragePeriod());
+                        GregorianCalendar gcal = new GregorianCalendar();
+                        gcal.setTimeInMillis(System.currentTimeMillis());
+                        gcal.add(Calendar.HOUR, -1);
+                        gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
+                        gcal = new GregorianCalendar();
+                        gcal.setTimeInMillis(System.currentTimeMillis());
+                        gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
+                        tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        //Assert.fail();
+                        logger.info("Expected exception: " + ex.getMessage());
+                } finally {
+                        TckCommon.DeleteBusiness(key, authInfoJoe, publicationJoe);
+                }
+        }
+
+        /**
+         *
+         * @throws DatatypeConfigurationException set subscription, make a
+         * change as the same user, get subscription results no period specified
+         */
+        @Test
+        public void JUDDI_606_12() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_12");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+                //
+                String key = null;
+                try {
+
+                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
+                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
+                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
+                        tckBindingTemplateJoe.saveJoePublisherBinding(authInfoJoe);
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(false);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(null);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
+                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        SaveBusiness sb = new SaveBusiness();
+                        sb.setAuthInfo(authInfoJoe);
+                        BusinessEntity be = new BusinessEntity();
+                        be.getName().add(new Name("Test business", null));
+                        sb.getBusinessEntity().add(be);
+                        BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);
+
+                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();
+                        GetSubscriptionResults gsr = new GetSubscriptionResults();
+                        gsr.setAuthInfo(authInfoJoe);
+                        gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
+                        gsr.setCoveragePeriod(null);
+                        tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
+                        Assert.fail();
+                } catch (Exception ex) {
+                        //HandleException(ex);
+                        //Assert.fail();
+                        logger.info("Expected exception: " + ex.getMessage());
+                } finally {
+                        TckCommon.DeleteBusiness(key, authInfoJoe, publicationJoe);
+                        tckBindingTemplateJoe.deleteJoePublisherBinding(authInfoJoe);
+                        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
+                        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
+                        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
+                        
+
+                }
+        }
+
+        /**
+         * set subscription, make a change as the same user, get subscription
+         * results valid find_Business
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_13() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_13");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+
+                String key = null;
+                DatatypeFactory df = DatatypeFactory.newInstance();
+                try {
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(false);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(null);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
+                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
+                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
+                        data.value.add(sub);
+
+                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
+                        SaveBusiness sb = new SaveBusiness();
+                        sb.setAuthInfo(authInfoJoe);
+                        BusinessEntity be = new BusinessEntity();
+                        be.getName().add(new Name("Test business", null));
+                        sb.getBusinessEntity().add(be);
+                        BusinessDetail saveBusiness = publicationJoe.saveBusiness(sb);
+                        key = saveBusiness.getBusinessEntity().get(0).getBusinessKey();
+
+                        GetSubscriptionResults gsr = new GetSubscriptionResults();
+                        gsr.setAuthInfo(authInfoJoe);
+                        gsr.setSubscriptionKey(data.value.get(0).getSubscriptionKey());
+                        gsr.setCoveragePeriod(new CoveragePeriod());
+                        GregorianCalendar gcal = new GregorianCalendar();
+                        gcal.setTimeInMillis(System.currentTimeMillis());
+                        gcal.add(Calendar.HOUR, -1);
+                        gsr.getCoveragePeriod().setStartPoint(df.newXMLGregorianCalendar(gcal));
+                        gcal = new GregorianCalendar();
+                        gcal.setTimeInMillis(System.currentTimeMillis());
+                        gsr.getCoveragePeriod().setEndPoint(df.newXMLGregorianCalendar(gcal));
+                        SubscriptionResultsList subscriptionResults = tckSubscriptionJoe.subscription.getSubscriptionResults(gsr);
+                        Assert.assertNotNull(subscriptionResults);
+                        Assert.assertNotNull(subscriptionResults.getBusinessList());
+                        Assert.assertNotNull(subscriptionResults.getCoveragePeriod());
+                        Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos());
+                        Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos().getBusinessInfo().get(0));
+                        Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos().getBusinessInfo().get(0).getBusinessKey());
+                        Assert.assertNotNull(subscriptionResults.getBusinessList().getBusinessInfos().getBusinessInfo().get(0).getName().get(0));
+
+                } catch (Exception ex) {
+                        HandleException(ex);
+                        Assert.fail();
+                } finally {
+                        TckCommon.DeleteBusiness(key, authInfoJoe, publicationJoe);
+                }
+        }
+
+        /**
+         * set subscription, make a change as the same user, get subscription
+         * results valid find_services
+         *
+         * @throws DatatypeConfigurationException
+         */
+        @Test
+        public void JUDDI_606_14() throws DatatypeConfigurationException {
+                System.out.println("JUDDI_606_14");
+                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
+
+                DatatypeFactory df = DatatypeFactory.newInstance();
+                try {
+
+
+                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
+                        data.value = new ArrayList<Subscription>();
+                        Subscription sub = new Subscription();
+                        sub.setBrief(false);
+                        sub.setExpiresAfter(null);
+                        sub.setMaxEntities(null);
+                        sub.setNotificationInterval(null);
+                        sub.setBindingKey(null);
+                        sub.setSubscriptionFilter(new SubscriptionFilter());
+                        sub.getSubscriptionFilter().setFindService(new FindService());
+                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());

[... 333 lines stripped ...]


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


Mime
View raw message