Package org.uddi.api_v3

Examples of org.uddi.api_v3.ServiceList


    fs.getName().add(name);
    startFind = System.currentTimeMillis();
    //this will match ALL services (100 * 100 =) 10,000 services
    int all = numberOfBusinesses * numberOfServices;
    System.out.println("Matching " + all+  " services");
    ServiceList serviceList = inquiry.findService(fs);
    findDuration = System.currentTimeMillis() - startFind;
    System.out.println("Find " + all + " services took "  +  findDuration + "ms. Size=" + serviceList.getServiceInfos().getServiceInfo().size());

    long startDelete = System.currentTimeMillis();
    for (int i=0; i<numberOfBusinesses; i++) {
      tckBusinessService.deleteJoePublisherServices(authInfoJoe, i, numberOfServices);
    }
View Full Code Here


      tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS1_XML, TOM_BUSINESS1_KEY, 1);
      tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS2_XML, TOM_BUSINESS2_KEY, 1);
      tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS5_XML, TOM_BUSINESS5_KEY, 1);
      try {
        int size = 0;
        ServiceList sl = null;

        FindService fs = new FindService();
       
        //by default keys are ADD, we should only find service 5
                KeyedReference keyRef1 = new KeyedReference();
                keyRef1.setTModelKey(TOM_PUBLISHER_TMODEL01_KEY);
                keyRef1.setKeyValue("value-z");
               
                KeyedReference keyRef2 = new KeyedReference();
                keyRef2.setTModelKey(TOM_PUBLISHER_TMODEL02_KEY);
        keyRef2.setKeyValue("value-x");
       
        CategoryBag cb = new CategoryBag();
        cb.getKeyedReference().add(keyRef1);
        cb.getKeyedReference().add(keyRef2);
        fs.setCategoryBag(cb);
       
        sl = inquiry.findService(fs);
        if (sl.getServiceInfos() == null) {
                    Assert.fail("Should have found one entry on FindService with TModelBag, "
                       + "found " + size);
        }
        size = sl.getServiceInfos().getServiceInfo().size();
        if (size != 1) {
          Assert.fail("Should have found one entry on FindService with TModelBag, "
              + "found " + size);
        } else {
            List<ServiceInfo> siList = sl.getServiceInfos().getServiceInfo();
          String serviceKey = siList.get(0).getServiceKey();
          if (!SERVICE_KEY5.equals(serviceKey)) {
              Assert.fail("Should have found service key " + SERVICE_KEY5
                      + " but found [" + serviceKey + "]");
          }
View Full Code Here

      tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS1_XML, TOM_BUSINESS1_KEY, 1);
      tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS2_XML, TOM_BUSINESS2_KEY, 1);
      tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS5_XML, TOM_BUSINESS5_KEY, 1);
      try {
        int size = 0;
        ServiceList sl = null;

        FindService fs = new FindService();
       
        //by default keys are ADD, we should only find service 5
                KeyedReference keyRef1 = new KeyedReference();
                keyRef1.setTModelKey(TOM_PUBLISHER_TMODEL01_KEY);
                keyRef1.setKeyValue("value-y");
              
        CategoryBag cb = new CategoryBag();
        cb.getKeyedReference().add(keyRef1);
        fs.setCategoryBag(cb);
       
        sl = inquiry.findService(fs);
        if (sl.getServiceInfos() != null) {
                    Assert.fail("Should have found no entries on FindService, "
                       + " found " + size);
        }
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here

                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS1_XML, TOM_BUSINESS1_KEY, 1);
                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS2_XML, TOM_BUSINESS2_KEY, 1);
                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS5_XML, TOM_BUSINESS5_KEY, 1);
                        try {
                                int size = 0;
                                ServiceList sl = null;

                                FindService fs = new FindService();

                                //by default keys are ADD, we should only find service 5
                                KeyedReference keyRef1 = new KeyedReference();
                                keyRef1.setTModelKey(TOM_PUBLISHER_TMODEL01_KEY);
                                keyRef1.setKeyValue("value-z");

                                KeyedReference keyRef2 = new KeyedReference();
                                keyRef2.setTModelKey(TOM_PUBLISHER_TMODEL02_KEY);
                                keyRef2.setKeyValue("value-x");

                                CategoryBag cb = new CategoryBag();
                                cb.getKeyedReference().add(keyRef1);
                                cb.getKeyedReference().add(keyRef2);
                                fs.setCategoryBag(cb);

                                sl = inquiry.findService(fs);
                                if (sl.getServiceInfos() == null) {
                                        Assert.fail("Should have found one entry on FindService with TModelBag, "
                                                + "found " + size);
                                }
                                size = sl.getServiceInfos().getServiceInfo().size();
                                if (size != 1) {
                                        Assert.fail("Should have found one entry on FindService with TModelBag, "
                                                + "found " + size);
                                } else {
                                        List<ServiceInfo> siList = sl.getServiceInfos().getServiceInfo();
                                        String serviceKey = siList.get(0).getServiceKey();
                                        if (!SERVICE_KEY5.equals(serviceKey)) {
                                                Assert.fail("Should have found service key " + SERVICE_KEY5
                                                        + " but found [" + serviceKey + "]");
                                        }
View Full Code Here

                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS1_XML, TOM_BUSINESS1_KEY, 1);
                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS2_XML, TOM_BUSINESS2_KEY, 1);
                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS5_XML, TOM_BUSINESS5_KEY, 1);
                        try {
                                int size = 0;
                                ServiceList sl = null;

                                FindService fs = new FindService();

                                //by default keys are ADD, we should only find service 5
                                KeyedReference keyRef1 = new KeyedReference();
                                keyRef1.setTModelKey(TOM_PUBLISHER_TMODEL01_KEY);
                                keyRef1.setKeyValue("value-y");

                                CategoryBag cb = new CategoryBag();
                                cb.getKeyedReference().add(keyRef1);
                                fs.setCategoryBag(cb);

                                sl = inquiry.findService(fs);
                                if (sl.getServiceInfos() != null) {
                                        Assert.fail("Should have found no entries on FindService, "
                                                + " found " + size);
                                }
                        } catch (Exception e) {
                                e.printStackTrace();
View Full Code Here

                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS1_XML, TOM_BUSINESS1_KEY, 1);
                        tckBusiness.saveBusinesses(authInfoJoe, TOM_BUSINESS2_XML, TOM_BUSINESS2_KEY, 1);
                        try {
                                int size = 0;
                                ServiceList sl = null;

                                FindService fs = new FindService();
                                FindQualifiers fqs = new FindQualifiers();
                                fqs.getFindQualifier().add(UDDIConstants.COMBINE_CATEGORY_BAGS);
                                fs.setFindQualifiers(fqs);

                                KeyedReference keyRef1 = new KeyedReference();
                                keyRef1.setTModelKey(TOM_PUBLISHER_TMODEL01_KEY);
                                keyRef1.setKeyValue("value-y");

                                CategoryBag cb = new CategoryBag();
                                cb.getKeyedReference().add(keyRef1);
                                fs.setCategoryBag(cb);

                                sl = inquiry.findService(fs);
                                if (sl.getServiceInfos() == null) {
                                        Assert.fail("Should have found one entry on FindService with TModelBag, "
                                                + "found " + size);
                                }
                                size = sl.getServiceInfos().getServiceInfo().size();
                                if (size != 1) {
                                        Assert.fail("Should have found one entry on FindService with TModelBag, "
                                                + "found " + size);
                                } else {
                                        List<ServiceInfo> siList = sl.getServiceInfos().getServiceInfo();
                                        String serviceKey = siList.get(0).getServiceKey();
                                        if (!SERVICE_KEY1.equals(serviceKey)) {
                                                Assert.fail("Should have found service key " + SERVICE_KEY1
                                                        + " but found [" + serviceKey + "]");
                                        }
View Full Code Here

        FindService fs = new FindService();
        fs.setFindQualifiers(new FindQualifiers());
        fs.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
        fs.getName().add(new Name("%", null));
        try {
            ServiceList findService = inquiry.findService(fs);
            if (findService.getServiceInfos() == null) {
                logger.warn("NO SERVICES RETURNED!");
            } else {
                for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) {
                    logger.warn(findService.getServiceInfos().getServiceInfo().get(i).getName().get(0).getValue() + " "
                            + findService.getServiceInfos().getServiceInfo().get(i).getServiceKey() + " "
                            + findService.getServiceInfos().getServiceInfo().get(i).getBusinessKey());
                }
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

        //here we are assuming we don't know what key is used for the service, so we look it up
        FindService fs = new FindService();
        fs.setFindQualifiers(new FindQualifiers());
        fs.getFindQualifiers().getFindQualifier().add(UDDIConstants.EXACT_MATCH);
        fs.getName().add(new Name("ZeroCool Service", lang));
        ServiceList findService = inquiry.findService(fs);

        //parse the results and get a list of services to get the details on
        GetServiceDetail gsd = new GetServiceDetail();
        for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) {
            gsd.getServiceKey().add(findService.getServiceInfos().getServiceInfo().get(i).getServiceKey());
        }
        ServiceDetail serviceDetail = inquiry.getServiceDetail(gsd);

        //parse the service details, looking for our versioned service
        if (serviceDetail != null) {
View Full Code Here

                //clerk.register(createKeyGenator);
                System.out.println("saving...");
                SaveTM(createKeyGenator, uddi);

                System.out.println("fetching business list");
                ServiceList before = getServiceList(uddi);
                if (before.getServiceInfos() == null) {
                        System.out.println("before no service returned!");
                        before.setServiceInfos(new ServiceInfos());
                } else {
                        System.out.println(before.getServiceInfos().getServiceInfo().size() + " service returned before");
                }

                System.out.println("saving mary");
                SaveMary(uddi);

                ServiceList after = getServiceList(uddi);
                if (after.getServiceInfos().getServiceInfo() == null) {
                        System.out.println("after no service returned!");
                        after.setServiceInfos(new ServiceInfos());
                        return;
                } else {
                        System.out.println(after.getServiceInfos().getServiceInfo().size() + " service returned after");
                }
                PrintUDDI<ServiceList> p = new PrintUDDI<ServiceList>();
                if (before.getServiceInfos().getServiceInfo().size()
                        < after.getServiceInfos().getServiceInfo().size()) {
                        System.out.println("hey it worked as advertised. Here's all the services with QOS parameters");
                        System.out.println(p.print(after));
                } else {

                        System.out.println("something's not right, here's the before service listing");
View Full Code Here

          fs.setListHead(null);
          fs.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
 
          ServiceList serviceList = InquiryHelper.getServiceListFromKeys(fs, findQualifiers, em, currentMatchingKeys,
                                           startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
 
          // Upon exiting above function, if more results are to be had, the subscriptionStartIndex will contain the latest value (or null
          // if no more results)
          chunkData = subscriptionStartIndex.value;
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.ServiceList

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.