Package org.uddi.sub_v3

Examples of org.uddi.sub_v3.Subscription


        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();
View Full Code Here


        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) {
View Full Code Here

                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();
View Full Code Here

                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();
View Full Code Here

                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) {
View Full Code Here

                        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) {
View Full Code Here

                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);
View Full Code Here

                        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);
View Full Code Here

                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);
View Full Code Here

                }

                //register for callbacks
                SubscriptionCallbackListener.registerCallback(this);

                Subscription sub = new Subscription();

                sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(1000));
                sub.setBindingKey(start.getBindingKey());
                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(UDDIConstants.WILDCARD, null));

                Subscription subscription = clerk.register(sub, clerk.getUDDINode().getApiNode());
                if (TckCommon.isDebug()) {
                        PrintUDDI<Subscription> p2 = new PrintUDDI<Subscription>();
                        logger.info(p2.print(subscription));
                }
                Assert.assertNotNull(subscription);
                Assert.assertNotNull(subscription.getBindingKey());
                Assert.assertNotNull(subscription.getSubscriptionKey());
                logger.info("Registered subscription key: " + (subscription.getSubscriptionKey()) + " bindingkey: " + subscription.getBindingKey());

                //fetch the business just to verify binding registration
                BusinessEntity businessDetail = clerk.getBusinessDetail("uddi:somebusiness:somebusinesskey");
                Assert.assertNotNull(businessDetail);
                Assert.assertNotNull(businessDetail.getBusinessKey());
                Assert.assertNotNull(businessDetail.getBusinessServices());
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0));
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0).getBindingTemplates());
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0).getBindingTemplates().getBindingTemplate().get(0));
                if (TckCommon.isDebug()) {
                        PrintUDDI<BusinessEntity> p2 = new PrintUDDI<BusinessEntity>();
                        logger.info(p2.print(businessDetail));
                }

                //trigger the callback
                BusinessEntity trigger = new BusinessEntity();
                trigger.getName().add(new Name("somebusiness trigger SubscriptionCallbackTest1", null));
                BusinessEntity triggered = clerk.register(trigger);
                //wait up to 30 seconds or until we get something
                long wait = TckPublisher.getSubscriptionTimeout();
                while (wait > 0 && notifications == 0) {
                        Thread.sleep(1000);
                        System.out.print(".");
                        wait--;
                }

                logger.info("Callback check." + notifications);
                //Thread.sleep(2000);
                SubscriptionCallbackListener.stop(manager, "default", start.getBindingKey());
                clerk.unRegisterSubscription(subscription.getSubscriptionKey());
                clerk.unRegisterTModel(createKeyGenator.getTModelKey());

                clerk.unRegisterBusiness(triggered.getBusinessKey());
                clerk.unRegisterBusiness(businessDetail.getBusinessKey());
                //verify
View Full Code Here

TOP

Related Classes of org.uddi.sub_v3.Subscription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.