Package org.uddi.api_v3

Examples of org.uddi.api_v3.FindService


            HandleException(ex);
            Assert.fail("unexpected failure");
        }

        int found1 = 0;
        FindService fb = new FindService();
        fb.setAuthInfo(authInfoJoe);
        n = new Name();
        n.setValue("%");
        fb.getName().add(n);
        fb.setFindQualifiers(new FindQualifiers());
        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
        try {
            ServiceList findBusiness = inquiry.findService(fb);
            if (findBusiness.getServiceInfos() != null) {
                for (int i = 0; i < findBusiness.getServiceInfos().getServiceInfo().size(); i++) {
                    if (targetServiceKeys.contains(findBusiness.getServiceInfos().getServiceInfo().get(i).getServiceKey())) {
                        found1++;
                    }
                }
            }
        } catch (Exception ex) {
            HandleException(ex);
            Assert.fail("unexpected failure");
        }
        if (found1 != 2) {
            failuremsg += "No lang defined, " + found1 + " records found instead of 2";
        }



        found1 = 0;
        fb = new FindService();
        fb.setAuthInfo(authInfoJoe);
        n = new Name();
        n.setLang("en");
        n.setValue("%");
        fb.getName().add(n);
        fb.setFindQualifiers(new FindQualifiers());
        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
        try {
            ServiceList findBusiness = inquiry.findService(fb);
            if (findBusiness.getServiceInfos() != null) {
                for (int i = 0; i < findBusiness.getServiceInfos().getServiceInfo().size(); i++) {
                    if (businesskeysToDelete.contains(findBusiness.getServiceInfos().getServiceInfo().get(i).getBusinessKey())) {
View Full Code Here


    long findDuration = System.currentTimeMillis() - startFind;
    System.out.println("Find 20 businesses took "  +  findDuration + "ms. Size=" + result.getBusinessInfos().getBusinessInfo().size());
    // it takes less then 1 second, make sure it stays faster then 5 seconds
    //Assert.assertTrue(findDuration < 5000);
       
    FindService fs = new FindService();
    fs.setFindQualifiers(apiFq);
    name.setValue("Service One%");
    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);
View Full Code Here

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

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

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

                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findBusiness(fb);
        }

        private void findservice(String fq) throws Exception {
                FindService fb = new FindService();
                fb.setAuthInfo(authInfoJoe);
                fb.setFindQualifiers(new FindQualifiers());
                fb.getFindQualifiers().getFindQualifier().add(fq);
                fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findService(fb);
        }
View Full Code Here

                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findBusiness(fb);
        }

        private void findservice(String[] fq) throws Exception {
                FindService fb = new FindService();
                fb.setAuthInfo(authInfoJoe);
                fb.setFindQualifiers(new FindQualifiers());
                fb.getFindQualifiers().getFindQualifier().addAll(Arrays.asList(fq));
                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findService(fb);
        }
View Full Code Here

        public static FindService MapFindService(org.uddi.api_v2.FindService body) {
                if (body == null) {
                        return null;
                }
                FindService r = new FindService();
                r.setBusinessKey(body.getBusinessKey());
                r.setCategoryBag(MapCategoryBag(body.getCategoryBag()));
                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
                r.setMaxRows(body.getMaxRows());
                r.setTModelBag(MapTModelBag(body.getTModelBag()));
                r.getName().addAll(MapName(body.getName()));
                if (ContainsWildCard(r.getName())) {
                        r.setFindQualifiers(AddApproximateMatch(r.getFindQualifiers()));
                }
                return r;

        }
View Full Code Here

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

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

TOP

Related Classes of org.uddi.api_v3.FindService

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.