Example usage for javax.xml.datatype DatatypeFactory newInstance

List of usage examples for javax.xml.datatype DatatypeFactory newInstance

Introduction

In this page you can find the example usage for javax.xml.datatype DatatypeFactory newInstance.

Prototype

public static DatatypeFactory newInstance() throws DatatypeConfigurationException 

Source Link

Document

Obtain a new instance of a DatatypeFactory .

Usage

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerExternalTest.java

/**
 * getBusiness tests joe want's updates on mary's business
 *
 * @throws Exception//w w w. j  a  va  2  s.c o m
 */
@Test
public void joePublisherUpdate_SMTP_GET_TMODEL_DETAIL() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    logger.info("joePublisherUpdate_SMTP_GET_TMODEL_DETAIL");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        UDDISubscriptionListenerImpl.notifcationMap.clear();
        UDDISubscriptionListenerImpl.notificationCount = 0;
        String before = TckCommon.DumpAllTModels(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
        TModel saveMaryPublisherTmodel = tckTModelMary.saveMaryPublisherTmodel(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        tckSubscriptionListenerJoe.saveService(authInfoJoe,
                TckSubscriptionListener.LISTENER_SMTP_SERVICE_EXTERNAL_XML, 0, email);
        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey("uddi:uddi.joepublisher.com:bindinglistenersmtp");
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetTModelDetail(new GetTModelDetail());
        sub.getSubscriptionFilter().getGetTModelDetail().getTModelKey()
                .add(TckTModel.MARY_PUBLISHER_TMODEL_KEY);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("updating Mary's tModel ********** ");
        updateTModel(authInfoMary, saveMaryPublisherTmodel, publicationMary);

        logger.info("Waiting " + TckPublisher.getSubscriptionTimeout() + " seconds for delivery");
        //waiting up to 100 seconds for the listener to notice the change.
        boolean found = false;
        for (int i = 0; i < TckPublisher.getSubscriptionTimeout(); i++) {
            Thread.sleep(1000);
            System.out.print(".");
            if (fetchMail("a new description") > 0) {
                found = true;
                break;
            }
        }

        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllTModels(authInfoJoe, inquiryJoe));
            Assert.fail("No Notification was sent");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        e.printStackTrace();

        Assert.fail();
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        //tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * getBusiness tests joe want's updates on mary's business
 *
 * @throws Exception/*from w w w . j  a va  2  s  .c  o  m*/
 */
@Test
public void joePublisherUpdate_GET_BUSINESS_DETAIL() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_GET_BUSINESS_DETAIL");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetBusinessDetail(new GetBusinessDetail());
        sub.getSubscriptionFilter().getGetBusinessDetail().getBusinessKey().add(TckBusiness.MARY_BUSINESS_KEY);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("updating Mary's business ********** ");
        updatePublisherBusiness(authInfoMary, saveMaryPublisherBusiness, publicationMary, "Updated Name");

        boolean found = verifyDelivery("Updated Name");

        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail(e.getMessage());
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * getBusiness tests joe want's updates on mary's business
 *
 * @throws Exception//from   ww  w .j  a  v  a2s  .c  o m
 */
@Test
public void joePublisherUpdate_GET_TMODEL_DETAIL() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_GET_TMODEL_DETAIL");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);
        TModel saveMaryPublisherTmodel = tckTModelMary.saveMaryPublisherTmodel(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetTModelDetail(new GetTModelDetail());
        sub.getSubscriptionFilter().getGetTModelDetail().getTModelKey()
                .add(TckTModel.MARY_PUBLISHER_TMODEL_KEY);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("updating Mary's tModel ********** ");
        updateTModel(authInfoMary, saveMaryPublisherTmodel, publicationMary);

        boolean found = verifyDelivery("a new description");

        if (!found) {
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail();
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        //tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * getService tests joe want's updates on mary's service
 *
 * @throws Exception/*w  w  w.  java2 s .c  o  m*/
 */
@Test
public void joePublisherUpdate_GET_SERVICE_DETAIL() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_GET_SERVICE_DETAIL");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        BusinessService bs = new BusinessService();
        bs.setBusinessKey(saveMaryPublisherBusiness.getBusinessKey());
        bs.setServiceKey(TckTModel.MARY_KEY_PREFIX + UUID.randomUUID().toString());
        bs.getName().add(new Name("Mary's service for " + getTransport(), null));
        SaveService ss = new SaveService();
        ss.getBusinessService().add(bs);
        ss.setAuthInfo(authInfoMary);
        bs = publicationMary.saveService(ss).getBusinessService().get(0);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetServiceDetail(new GetServiceDetail());
        sub.getSubscriptionFilter().getGetServiceDetail().getServiceKey().add(bs.getServiceKey());

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("updating Mary's service ********** ");
        updatePublisherService(authInfoMary, bs, publicationMary);

        boolean found = verifyDelivery("Updated Name");

        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail();
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * getBinding tests joe want's updates on mary's binding
 *
 * @throws Exception// w ww . jav a  2 s  .  c  o  m
 */
@Test
public void joePublisherUpdate_GET_BINDING_DETAIL() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_GET_BINDING_DETAIL");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        BusinessService bs = new BusinessService();
        bs.setBusinessKey(saveMaryPublisherBusiness.getBusinessKey());
        bs.setServiceKey(TckTModel.MARY_KEY_PREFIX + UUID.randomUUID().toString());
        bs.getName().add(new Name("Mary's service for " + getTransport(), null));
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setAccessPoint(new AccessPoint("http://localhost", "endPoint"));
        bt.setBindingKey(TckTModel.MARY_KEY_PREFIX + UUID.randomUUID().toString());
        bt.setServiceKey(bs.getServiceKey());
        bt = UDDIClient.addSOAPtModels(bt);

        bs.getBindingTemplates().getBindingTemplate().add(bt);
        SaveService ss = new SaveService();
        ss.getBusinessService().add(bs);
        ss.setAuthInfo(authInfoMary);
        bs = publicationMary.saveService(ss).getBusinessService().get(0);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetBindingDetail(new GetBindingDetail());
        sub.getSubscriptionFilter().getGetBindingDetail().getBindingKey().add(bt.getBindingKey());

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("updating Mary's binding ********** ");
        updatePublisherBinding(authInfoMary, bt, publicationMary);

        boolean found = verifyDelivery("wsdlDeployment");

        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail();
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * PUBLISHERASSERTION tests joe want's updates on mary's binding
 *
 * @throws Exception// www .j a  va2s .co m
 */
@Test
// @Ignore
public void joePublisherUpdate_PUBLISHERASSERTION_DETAIL_TO() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_PUBLISHERASSERTION_DETAIL_TO");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        //tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());
        sub.getSubscriptionFilter().getGetAssertionStatusReport()
                .setCompletionStatus(CompletionStatus.STATUS_TO_KEY_INCOMPLETE);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("saving Mary's publisher assertion********** ");
        AddPublisherAssertions pa = new AddPublisherAssertions();
        pa.setAuthInfo(authInfoMary);
        PublisherAssertion pas = new PublisherAssertion();
        pas.setToKey(TckBusiness.JOE_BUSINESS_KEY);
        pas.setFromKey(TckBusiness.MARY_BUSINESS_KEY);
        pas.setKeyedReference(new KeyedReference(UDDIConstants.RELATIONSHIPS, "parent", "parent-child"));
        pa.getPublisherAssertion().add(pas);

        publicationMary.addPublisherAssertions(pa);

        boolean found = verifyDelivery(TckBusiness.MARY_BUSINESS_KEY);

        DeletePublisherAssertions deletePublisherAssertions = new DeletePublisherAssertions();
        deletePublisherAssertions.setAuthInfo(authInfoMary);
        deletePublisherAssertions.getPublisherAssertion().add(pas);
        publicationMary.deletePublisherAssertions(deletePublisherAssertions);
        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail();
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * PUBLISHERASSERTION tests joe want's updates on mary's binding
 *
 * @throws Exception//from ww w  . j  av a  2 s .  co m
 */
@Test
//@Ignore
public void joePublisherUpdate_PUBLISHERASSERTION_DETAIL_FROM() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_PUBLISHERASSERTION_DETAIL_FROM");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        //tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());
        sub.getSubscriptionFilter().getGetAssertionStatusReport()
                .setCompletionStatus(CompletionStatus.STATUS_FROM_KEY_INCOMPLETE);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("saving Mary's publisher assertion********** ");
        AddPublisherAssertions pa = new AddPublisherAssertions();
        pa.setAuthInfo(authInfoMary);
        PublisherAssertion pas = new PublisherAssertion();
        pas.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
        pas.setToKey(TckBusiness.MARY_BUSINESS_KEY);
        pas.setKeyedReference(new KeyedReference(UDDIConstants.RELATIONSHIPS, "parent", "parent-child"));
        pa.getPublisherAssertion().add(pas);

        publicationMary.addPublisherAssertions(pa);

        boolean found = verifyDelivery(TckBusiness.MARY_BUSINESS_KEY);

        DeletePublisherAssertions deletePublisherAssertions = new DeletePublisherAssertions();
        deletePublisherAssertions.setAuthInfo(authInfoMary);
        deletePublisherAssertions.getPublisherAssertion().add(pas);
        publicationMary.deletePublisherAssertions(deletePublisherAssertions);
        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail(e.getMessage());
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * PUBLISHERASSERTION tests joe want's updates on mary's binding
 *
 * @throws Exception/*from   w  w w . j  a va2s. co  m*/
 */
@Test
public void joePublisherUpdate_PUBLISHERASSERTION_DETAIL_NULL() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_PUBLISHERASSERTION_DETAIL_NULL");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        //tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("saving Mary's publisher assertion********** ");
        AddPublisherAssertions pa = new AddPublisherAssertions();
        pa.setAuthInfo(authInfoMary);
        PublisherAssertion pas = new PublisherAssertion();
        pas.setToKey(TckBusiness.JOE_BUSINESS_KEY);
        pas.setFromKey(TckBusiness.MARY_BUSINESS_KEY);
        pas.setKeyedReference(new KeyedReference(UDDIConstants.RELATIONSHIPS, "parent", "parent-child"));
        pa.getPublisherAssertion().add(pas);

        publicationMary.addPublisherAssertions(pa);

        boolean found = verifyDelivery(TckBusiness.MARY_BUSINESS_KEY);

        DeletePublisherAssertions deletePublisherAssertions = new DeletePublisherAssertions();
        deletePublisherAssertions.setAuthInfo(authInfoMary);
        deletePublisherAssertions.getPublisherAssertion().add(pas);
        publicationMary.deletePublisherAssertions(deletePublisherAssertions);
        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        e.printStackTrace();
        TckCommon.PrintMarker();
        Assert.fail(e.getMessage());
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * PUBLISHERASSERTION2 tests joe want's updates on mary's binding
 *
 * @throws Exception/* w w  w  .ja v a 2s.co m*/
 */
@Test
public void joePublisherUpdate_PUBLISHERASSERTION_DETAIL_COMPLETE() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_PUBLISHERASSERTION_DETAIL_COMPLETE");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
        //tckTModelJoe.saveTModels(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);
        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);

        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setGetAssertionStatusReport(new GetAssertionStatusReport());
        sub.getSubscriptionFilter().getGetAssertionStatusReport()
                .setCompletionStatus(CompletionStatus.STATUS_COMPLETE);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);
        logger.info("saving Mary's publisher assertion********** ");
        AddPublisherAssertions pa = new AddPublisherAssertions();
        pa.setAuthInfo(authInfoMary);
        PublisherAssertion pas = new PublisherAssertion();
        pas.setToKey(TckBusiness.JOE_BUSINESS_KEY);
        pas.setFromKey(TckBusiness.MARY_BUSINESS_KEY);
        pas.setKeyedReference(new KeyedReference(UDDIConstants.RELATIONSHIPS, "parent", "parent-child"));
        pa.getPublisherAssertion().add(pas);

        publicationMary.addPublisherAssertions(pa);
        pa.setAuthInfo(authInfoJoe);
        publicationJoe.addPublisherAssertions(pa);

        boolean found = verifyDelivery(TckBusiness.MARY_BUSINESS_KEY);
        DeletePublisherAssertions deletePublisherAssertions = new DeletePublisherAssertions();
        deletePublisherAssertions.setAuthInfo(authInfoMary);
        deletePublisherAssertions.getPublisherAssertion().add(pas);
        publicationMary.deletePublisherAssertions(deletePublisherAssertions);
        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail(e.getMessage());
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}

From source file:org.apache.juddi.v3.tck.UDDI_090_SubscriptionListenerIntegrationBase.java

/**
 * find related businesses i.e. setup subscriptions for all related
 * businesses to joe's biz then setup PA between Joe and Mary
 *
 * @throws Exception//from  ww  w.  j ava  2s  . c o m
 */
@Test
public void joePublisherUpdate_FIND_RELATED_BIZ() throws Exception {
    Assume.assumeTrue(TckPublisher.isEnabled());
    Assume.assumeNotNull(getHostame());
    Assume.assumeTrue(IsEnabled());
    logger.info("joePublisherUpdate_" + getTransport() + "_FIND_RELATED_BIZ");
    TckCommon.removeAllExistingSubscriptions(authInfoJoe, subscriptionJoe);
    Holder<List<Subscription>> holder = null;
    try {
        reset();

        String before = TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe);

        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);

        tckTModelMary.saveMaryPublisherTmodel(authInfoMary);

        BusinessEntity saveMaryPublisherBusiness = tckBusinessMary.saveMaryPublisherBusiness(authInfoMary);
        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
        //Saving the Listener Service
        String bindingkey = tckSubscriptionListenerJoe.saveService(authInfoJoe,
                getXMLLocationOfServiceForDelivery(), getPort(), getHostame());

        //Saving the Subscription
        holder = new Holder<List<Subscription>>();
        holder.value = new ArrayList<Subscription>();
        Subscription sub = new Subscription();
        sub.setBindingKey(bindingkey);
        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
        sub.setSubscriptionFilter(new SubscriptionFilter());
        sub.getSubscriptionFilter().setFindRelatedBusinesses(new FindRelatedBusinesses());
        sub.getSubscriptionFilter().getFindRelatedBusinesses().setBusinessKey(TckBusiness.MARY_BUSINESS_KEY);

        holder.value.add(sub);
        subscriptionJoe.saveSubscription(authInfoJoe, holder);
        logger.info("subscription saved for " + holder.value.get(0).getSubscriptionKey());
        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
        //Changing the service we subscribed to "JoePublisherService"
        Thread.sleep(1000);

        logger.info("saving Mary's publisher assertion********** ");
        AddPublisherAssertions pa = new AddPublisherAssertions();
        pa.setAuthInfo(authInfoMary);
        PublisherAssertion pas = new PublisherAssertion();
        pas.setToKey(TckBusiness.JOE_BUSINESS_KEY);
        pas.setFromKey(TckBusiness.MARY_BUSINESS_KEY);
        pas.setKeyedReference(new KeyedReference(UDDIConstants.RELATIONSHIPS, "parent", "parent-child"));
        pa.getPublisherAssertion().add(pas);

        publicationMary.addPublisherAssertions(pa);
        logger.info("saving Joe's publisher assertion********** ");
        pa = new AddPublisherAssertions();
        pa.setAuthInfo(authInfoJoe);
        pas = new PublisherAssertion();
        pas.setToKey(TckBusiness.JOE_BUSINESS_KEY);
        pas.setFromKey(TckBusiness.MARY_BUSINESS_KEY);
        pas.setKeyedReference(new KeyedReference(UDDIConstants.RELATIONSHIPS, "parent", "parent-child"));
        pa.getPublisherAssertion().add(pas);
        publicationJoe.addPublisherAssertions(pa);

        //expecting that Joe gets notified that joe's and mary's businesses are now "related"
        boolean found = verifyDelivery(TckBusiness.MARY_BUSINESS_KEY);
        DeletePublisherAssertions deletePublisherAssertions = new DeletePublisherAssertions();
        deletePublisherAssertions.setAuthInfo(authInfoMary);
        deletePublisherAssertions.getPublisherAssertion().add(pas);
        publicationMary.deletePublisherAssertions(deletePublisherAssertions);

        deletePublisherAssertions = new DeletePublisherAssertions();
        deletePublisherAssertions.setAuthInfo(authInfoJoe);
        deletePublisherAssertions.getPublisherAssertion().add(pas);
        // publicationJoe.deletePublisherAssertions(deletePublisherAssertions);

        if (!found) {
            logger.warn("Test failed, dumping business list");
            logger.warn("BEFORE " + before);
            logger.warn("After " + TckCommon.DumpAllBusinesses(authInfoJoe, inquiryJoe));
            TckCommon.PrintMarker();
            Assert.fail("Notification does not contain the correct service.");
        }

    } catch (Exception e) {
        logger.error("No exceptions please.");
        TckCommon.PrintMarker();
        e.printStackTrace();

        Assert.fail(e.getMessage());
    } finally {
        //tckSubscriptionListenerJoe.deleteNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION_KEY);
        DeleteSubscription ds = new DeleteSubscription();
        ds.setAuthInfo(authInfoJoe);
        ds.getSubscriptionKey().add(holder.value.get(0).getSubscriptionKey());
        subscriptionJoe.deleteSubscription(ds);
        tckBusinessMary.deleteMaryPublisherBusiness(authInfoMary);
        tckTModelMary.deleteMaryPublisherTmodel(authInfoMary);

        tckBusinessServiceJoe.deleteJoePublisherService(authInfoJoe);
        tckBusinessJoe.deleteJoePublisherBusiness(authInfoJoe);
        tckTModelJoe.deleteJoePublisherTmodel(authInfoJoe);
        tckTModelJoe.deleteTModel(authInfoJoe, TckTModel.JOE_PUBLISHER_TMODEL_SUBSCRIPTION3_TMODEL_KEY,
                TckTModel.JOE_PUBLISHER_TMODEL_XML_SUBSCRIPTION3);

    }
}