Package org.uddi.api_v2

Examples of org.uddi.api_v2.FindBusiness


  }
 
  public List<BusinessInfo> findAllSignedBusiness() {
    List<BusinessInfo> biList = null;
    try {
      FindBusiness body = (FindBusiness)EntityCreator.buildFromDoc(FIND_ALL_SIGNED_BUSINESSES_XML, "org.uddi.api_v3");
      BusinessList result = inquiry.findBusiness(body);
      if (result == null)
        Assert.fail("Null result from find business operation");
      BusinessInfos bInfos = result.getBusinessInfos();
      if (bInfos == null)
View Full Code Here


                }
                return sb.toString();
        }        
        public static String DumpAllBusinesses(String authinfo, UDDIInquiryPortType inquriy) {
                StringBuilder sb = new StringBuilder();
                FindBusiness fs = new FindBusiness();
                fs.setAuthInfo(authinfo);
                fs.setFindQualifiers(new FindQualifiers());
                fs.getFindQualifiers().getFindQualifier().add("approximateMatch");
                fs.getName().add(new Name("%", null));
                try {
                        BusinessList findService = inquriy.findBusiness(fs);
                        if (findService.getBusinessInfos() == null) {
                                return ("NO BUSINESSES RETURNED!");
                        } else {
View Full Code Here

        StringWriter sw = new StringWriter();
        if (method.equalsIgnoreCase("findBinding")) {
            JAXB.marshal(new FindBinding(), sw);
        }
        if (method.equalsIgnoreCase("findBusiness")) {
            JAXB.marshal(new FindBusiness(), sw);
        }
        if (method.equalsIgnoreCase("findService")) {
            JAXB.marshal(new FindService(), sw);
        }
        if (method.equalsIgnoreCase("findRelatedBusines")) {
View Full Code Here

   
    Name name = new Name();
    name.setValue(businessEntity.getName().get(0).getValue());
    name.setLang(businessEntity.getName().get(0).getLang());
   
    FindBusiness findBusiness = new FindBusiness();
    findBusiness.getName().add(name);
   
    inqueryService = JUDDIServiceProvider.getInquiryService();
    businessList = inqueryService.findBusiness(findBusiness);
    try
    {
View Full Code Here

    FindQualifiers findQualifiers = new FindQualifiers();
    findQualifiers.getFindQualifier().add("sortByNameDesc");
    findQualifiers.getFindQualifier().add("approximateMatch");

    //The FindBusiness object that is submitted via the inquiry service.
    FindBusiness findBusiness = new FindBusiness();
    findBusiness.setAuthInfo(authenticationToken.getAuthInfo());
    findBusiness.getName().add(q);
    findBusiness.setFindQualifiers(findQualifiers);
    findBusiness.setMaxRows(max);

    BusinessList businessList = inquiryService.findBusiness(findBusiness);
    businessInfos = businessList.getBusinessInfos();

    //Print out the names of the returned businesses
View Full Code Here

            resultsKeyBag.getBusinessKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindBusiness fb = subscriptionFilter.getFindBusiness();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(fb.getFindQualifiers());
         
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          fb.setListHead(null);
          fb.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          BusinessList businessList = InquiryHelper.getBusinessListFromKeys(fb, findQualifiers, em, currentMatchingKeys,
                                            startPointDate, endPointDate, subscriptionStartIndex, modelSubscription.getMaxEntities());
View Full Code Here

                clerkManager.stop();
        }

        private void ExportBusiness() throws Exception {
                FileOutputStream fos = new FileOutputStream(businessfile);
                FindBusiness req = new FindBusiness();
                req.setAuthInfo(token);
                req.getName().add(new Name(UDDIConstants.WILDCARD, null));
                req.setFindQualifiers(new FindQualifiers());
                req.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                int offset = 0;
                int maxrows = 100;

                req.setMaxRows(maxrows);
                req.setListHead(offset);
                BusinessList findTModel = null;
                SaveBusiness sb = new SaveBusiness();
                do {
                        findTModel = inquiry.findBusiness(req);
                        if (findTModel.getBusinessInfos() != null) {
                                for (int i = 0; i < findTModel.getBusinessInfos().getBusinessInfo().size(); i++) {
                                        boolean go = true;
                                        String owner = Common.GetOwner(findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey(), token, inquiry);
                                        if (owner!=null && !usernames.contains(owner)) {
                                                usernames.add(owner);
                                        }
                                        if (myitemsonly) {
                                                if (owner == null || !owner.equalsIgnoreCase(username)) {
                                                        go = false;
                                                        System.out.println("skipping " + findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey() + " owned by " + owner);
                                                }
                                        }
                                        if (go) {
                                           if (owner!=null)
                                                mapping.setProperty(findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey(), owner);
                                                System.out.println("Exporting " + findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey() + " owner " + owner);
                                                sb.getBusinessEntity().add(GetBusiness(findTModel.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey(), token));
                                        }
                                }
                        }
                        //do stuff
                        offset = offset + maxrows;
                        req.setListHead(offset);

                } while (false);//findTModel.getListDescription().getIncludeCount() > 0 );

                if (stripSig) {
                        int x=0;
View Full Code Here

  public BusinessList findBusiness(Name[] nameArray,
      DiscoveryURLs discoveryURLs, IdentifierBag identifierBag,
      CategoryBag categoryBag, TModelBag tModelBag,
      FindQualifiers findQualifiers, int maxRows)
      throws RegistryV3Exception {
    FindBusiness request = this.objectFactory.createFindBusiness();

    if (nameArray != null) {
      request.getName().addAll(Arrays.asList(nameArray));
    }

    if (discoveryURLs != null) {
      request.setDiscoveryURLs(discoveryURLs);
    }

    if (identifierBag != null) {
      request.setIdentifierBag(identifierBag);
    }

    if (categoryBag != null) {
      request.setCategoryBag(categoryBag);
    }

    if (tModelBag != null) {
      request.setTModelBag(tModelBag);
    }

    if (findQualifiers != null) {
      request.setFindQualifiers(findQualifiers);
    }

    request.setMaxRows(maxRows);

        BusinessList bl = null;
        JAXBElement<?> o = execute(this.objectFactory.createFindBusiness(request),
            this.getInquiryURI());
        if (o != null) bl = (BusinessList) o.getValue();
View Full Code Here

    this.inquiry = inquiry;
  }

  public void findBusiness() {
    try {
      FindBusiness body = (FindBusiness)EntityCreator.buildFromDoc(FIND_BUSINESS_XML, "org.uddi.api_v3");
      BusinessList result = inquiry.findBusiness(body);
      if (result == null)
        Assert.fail("Null result from find business operation");
      BusinessInfos bInfos = result.getBusinessInfos();
      if (bInfos == null)
View Full Code Here

    }
  }
 
  public void findAllBusiness() {
    try {
      FindBusiness body = (FindBusiness)EntityCreator.buildFromDoc(FIND_ALL_BUSINESSES_XML, "org.uddi.api_v3");
      BusinessList result = inquiry.findBusiness(body);
      if (result == null)
        Assert.fail("Null result from find business operation");
      BusinessInfos bInfos = result.getBusinessInfos();
      if (bInfos == null)
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.FindBusiness

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.