Package org.uddi.api_v3

Examples of org.uddi.api_v3.Name


                        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


                        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

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

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

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

                        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);
                        tckTModelJoe.saveJoePublisherTmodel(authInfoJoe);
                        tckBusinessJoe.saveJoePublisherBusiness(authInfoJoe);
View Full Code Here

public class EntityForLang {
 
  public static Name getName(List<Name> entityList, String lang) {
   
    if (entityList.size()==0) {
      Name name = new Name();
      name.setValue("");
      name.setLang(lang);
      entityList.add(name);
    }
    if (lang==null) return entityList.get(0);
    for (Name entity : entityList) {
      if (lang.equalsIgnoreCase(entity.getLang())) {
View Full Code Here

                if (!partitionName.endsWith(":keygenerator")) {
                        //throw new IllegalArgumentException("partitionName must have a ':keygenerator' postfix");
                        partitionName = partitionName + ":keygenerator";
                }
                TModel tm = new TModel();
                tm.setName(new Name());
                tm.getName().setValue(DescriptiveName);
                tm.getName().setLang(DescriptiveNameLanguage);
                tm.setCategoryBag(new CategoryBag());
                KeyedReference kr = new KeyedReference();
                kr.setTModelKey(UDDIConstants.KEY_GENERATOR_TMODEL);
View Full Code Here

                logger.info("Registered tModel keygen: " + createKeyGenator.getTModelKey());

                //setup the business to attach to
                BusinessEntity be = new BusinessEntity();
                be.setBusinessKey("uddi:somebusiness:somebusinesskey");
                be.getName().add(new Name("somebusiness SubscriptionCallbackTest1", null));
                be.setBusinessServices(new BusinessServices());
                BusinessService bs = new BusinessService();
                bs.setBusinessKey("uddi:somebusiness:somebusinesskey");
                bs.setServiceKey("uddi:somebusiness:someservicekey");
                bs.getName().add(new Name("service SubscriptionCallbackTest1", null));
                be.getBusinessServices().getBusinessService().add(bs);
                BusinessEntity register = clerk.register(be);
                logger.info("Registered business keygen: " + register.getBusinessKey());

                //start up our listener
                BindingTemplate start = SubscriptionCallbackListener.start(manager, "default");
                Assert.assertNotNull(start);

                if (TckCommon.isDebug()) {
                        PrintUDDI<BindingTemplate> p = new PrintUDDI<BindingTemplate>();
                        logger.info(p.print(start));
                }

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

        @Test
        public void InquiryREST_GET_Business() throws Exception {
                Assume.assumeTrue(TckPublisher.isInquiryRestEnabled());
                FindBusiness fb = new FindBusiness();
                fb.setMaxRows(1);
                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                fb.setFindQualifiers(new FindQualifiers());
                fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                BusinessList findBusiness = inquiry.findBusiness(fb);
                Assume.assumeTrue(findBusiness != null);
                Assume.assumeTrue(findBusiness.getBusinessInfos() != null);
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.Name

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.