Package org.uddi.api_v3

Examples of org.uddi.api_v3.KeyedReferenceGroup


      // Now get the entity and check the values
      GetBusinessDetail gb = new GetBusinessDetail();
      gb.getBusinessKey().add(businessKey);
      BusinessDetail bd = inquiry.getBusinessDetail(gb);
      List<BusinessEntity> beOutList = bd.getBusinessEntity();
      BusinessEntity beOut = beOutList.get(0);
      //We are expecting 2 services
      assertEquals(2,beOut.getBusinessServices().getBusinessService().size());
     
      //Now updating the business by adding another description
      SaveBusiness sb = new SaveBusiness();
      sb.setAuthInfo(authInfo);
      BusinessEntity beIn = beOut;
      Description desc2= new Description();
      desc2.setLang("nl");
      desc2.setValue("Omschrijving");
      beIn.getDescription().add(desc2);
      sb.getBusinessEntity().add(beIn);
      publication.saveBusiness(sb);
 
      // Now get the entity and check the values
      BusinessDetail bdnew = inquiry.getBusinessDetail(gb);
      List<BusinessEntity> beOutListNew = bdnew.getBusinessEntity();
      BusinessEntity beOutNew = beOutListNew.get(0);

      assertEquals(beIn.getBusinessKey(), beOutNew.getBusinessKey());
      // After the update we still are supposed to see two services.
      assertNotNull(beOutNew.getBusinessServices());
      assertEquals(2,beOutNew.getBusinessServices().getBusinessService().size());
     
     
    } catch(Throwable e) {
      logger.error(e.getMessage(),e);
      Assert.fail("No exception should be thrown");
View Full Code Here


      if (bInfos == null)
        Assert.fail("No result from find business operation");
      List<BusinessInfo> biList = bInfos.getBusinessInfo();
      if (biList == null || biList.size() == 0)
        Assert.fail("No result from find business operation");
      BusinessInfo biOut = biList.get(0);
     
      BusinessEntity beIn = (BusinessEntity)EntityCreator.buildFromDoc(TckBusiness.JOE_BUSINESS_XML, "org.uddi.api_v3");
     
      assertEquals(beIn.getBusinessKey(), biOut.getBusinessKey());
     
      TckValidator.checkNames(beIn.getName(), biOut.getName());
      TckValidator.checkDescriptions(beIn.getDescription(), biOut.getDescription());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown.");
    }
View Full Code Here

    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)
        Assert.fail("No result from find business operation");
      List<BusinessInfo> biList = bInfos.getBusinessInfo();
      if (biList == null || biList.size() == 0)
        Assert.fail("No result from find business operation");
      BusinessInfo biOut = biList.get(0);
     
      BusinessEntity beIn = (BusinessEntity)EntityCreator.buildFromDoc(TckBusiness.JOE_BUSINESS_XML, "org.uddi.api_v3");
View Full Code Here

    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)
        Assert.fail("No result from find business operation");
      List<BusinessInfo> biList = bInfos.getBusinessInfo();
      if (biList == null || biList.size() == 0)
        Assert.fail("No result from find business operation");
      //expecting more than 2 businesses
      Assert.assertTrue(biList.size()>1);
     
View Full Code Here

     
      tckBusiness.saveBusinesses(authInfoTom, TOM_BUSINESS_XML, TOM_BUSINESS_KEY, 1);
     
      try {
        int size = 0;
        BusinessList bl = null;
 
        FindBusiness fbb = new FindBusiness();
        TModelBag tmb = new TModelBag();
        tmb.getTModelKey().add(TOM_PUBLISHER_TMODEL01_KEY);
        fbb.setTModelBag(tmb);
        bl = inquiry.findBusiness(fbb);
        size = bl.getBusinessInfos().getBusinessInfo().size();
        if (size != 1) {
          Assert.fail("Should have found one entry on FindBusiness with TModelBag, "
              + "found " + size);
        } else {
          List<BusinessInfo> biList = bl.getBusinessInfos().getBusinessInfo();
          if (biList.get(0).getServiceInfos().getServiceInfo().size() != 1) {
            Assert.fail("Should have found only one ServiceInfo");
          } else {
              List<ServiceInfo> siList = biList.get(0).getServiceInfos().getServiceInfo();
              ServiceInfo si = siList.get(0);
View Full Code Here

  }

  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)
        Assert.fail("No result from find business operation");
      List<BusinessInfo> biList = bInfos.getBusinessInfo();
      if (biList == null || biList.size() == 0)
        Assert.fail("No result from find business operation");
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)
        Assert.fail("No result from find business operation");
      List<BusinessInfo> biList = bInfos.getBusinessInfo();
      if (biList == null || biList.size() == 0)
        Assert.fail("No result from find business operation");
View Full Code Here

      logger.debug("FindBusiness " + findBusiness + " sending findBusinesses request..");
      List<Business> businesses = new ArrayList<Business>();
     
      Transport transport = WebHelper.getTransport(session.getServletContext());
      UDDIInquiryPortType inquiryService = transport.getUDDIInquiryService();
      BusinessList businessList = inquiryService.findBusiness(findBusiness);
      for (BusinessInfo businessInfo : businessList.getBusinessInfos().getBusinessInfo()) {
        Business business = new Business(
            businessInfo.getBusinessKey(),
            EntityForLang.getName(businessInfo.getName(),lang).getValue(),
            EntityForLang.getDescription(businessInfo.getDescription(),lang).getValue());
        List<Service> services = new ArrayList<Service>();
View Full Code Here

  }
  /**
   * Copies the Service from one UDDI to another UDDI.
   */
  public void xRegisterService() {
    BusinessService businessService;
    try {
      businessService = fromClerk.findService(entityKey,fromClerk.getUDDINode().getApiNode());
      log.info("xregister service " + businessService.getName().get(0).getValue() + " + from "
          + fromClerk.getName() + " to " + toClerk.getName());
      businessService.setBindingTemplates(null);
      toClerk.register(businessService,toClerk.getUDDINode().getApiNode());
    } catch (Exception e) {
      log.error("Could not " + toString() + ". " + e.getMessage() + " " + e.getCause(),e);
    }
  }
View Full Code Here

  }
  /**
   * Copies the Service from one UDDI to another UDDI along with all the bindingTemplates.
   */
  public void xRegisterServiceAndBindings() {
    BusinessService businessService;
    try {
      businessService = fromClerk.findService(entityKey,fromClerk.getUDDINode().getApiNode());
      log.info("xregister service " + businessService.getName().get(0).getValue() + " + from "
          + fromClerk.getName() + " to " + toClerk.getName());
      toClerk.register(businessService,toClerk.getUDDINode().getApiNode());
    } catch (Exception e) {
      log.error("Could not " + toString() + ". " + e.getMessage() + " " + e.getCause(),e);
    }
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.KeyedReferenceGroup

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.