Package org.uddi.api_v3

Examples of org.uddi.api_v3.BusinessDetail


       
        public void verifyBusinessSignature(String authInfo, String businessKey) {
            try {
                GetBusinessDetail gb = new GetBusinessDetail();
                gb.getBusinessKey().add(businessKey);
                BusinessDetail bd = inquiry.getBusinessDetail(gb);
                List<BusinessEntity> beOutList = bd.getBusinessEntity();
                BusinessEntity bizEntity = beOutList.get(0);
                       
                boolean sigOk = verifySignedJAXBObject(bizEntity);
                assertTrue("Signature invalid!", sigOk);
            } catch(Throwable e) {
View Full Code Here


      publication.saveBusiness(sb);
 
      // 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);

            if (serialize) {
                JAXB.marshal(beOut, new File("target/aftersave.xml"));
            }
View Full Code Here

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

        // Store deleted keys in the results
        if (missingKeyBag.getBusinessKey() != null && missingKeyBag.getBusinessKey().size() > 0)
          result.getKeyBag().add(missingKeyBag);
       
        KeyBag resultsKeyBag = new KeyBag();
        BusinessDetail businessDetail = new BusinessDetail();
 
        // Set the currentIndex to 0 or the value of the chunkData
        int currentIndex = 0;
        if (chunkData != null)
          currentIndex = chunkData;
       
        int returnedRowCount = 0;
        while(currentIndex < existingList.size()) {
 
          org.apache.juddi.model.BusinessEntity modelBusinessEntity = existingList.get(currentIndex);
 
          if (startPointDate.after(modelBusinessEntity.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (endPointDate.before(modelBusinessEntity.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (modelSubscription.isBrief()) {
            resultsKeyBag.getBusinessKey().add(modelBusinessEntity.getEntityKey());
          }
          else {
            org.uddi.api_v3.BusinessEntity apiBusinessEntity = new org.uddi.api_v3.BusinessEntity();
            MappingModelToApi.mapBusinessEntity(modelBusinessEntity, apiBusinessEntity);
            businessDetail.getBusinessEntity().add(apiBusinessEntity);
           
            returnedRowCount++;
          }
 
          // If the returned rows equals the max allowed, we can end the loop.
View Full Code Here

            bs.setBindingTemplates(new BindingTemplates());
            bs.getBindingTemplates().getBindingTemplate().add(bt);
            be.setBusinessServices(new BusinessServices());
            be.getBusinessServices().getBusinessService().add(bs);
            sb.getBusinessEntity().add(be);
            BusinessDetail saveBusiness = publication.saveBusiness(sb);

            DeleteBusiness db = new DeleteBusiness();
            db.setAuthInfo(authInfoJoe);
            db.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
            publication.deleteBusiness(db);
            Assert.fail("request should have been rejected");

        } catch (ValueNotAllowedException ex) {
            HandleException(ex);
View Full Code Here

        be.getBusinessServices().getBusinessService().add(bs);

        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            DeleteBusiness db = new DeleteBusiness();
            db.setAuthInfo(authInfoJoe);
            db.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
            publication.deleteBusiness(db);
            Assert.fail("request should have been rejected");

        } catch (ValueNotAllowedException ex) {
            HandleException(ex);
View Full Code Here

        be.getBusinessServices().getBusinessService().add(bs);

        sb.getBusinessEntity().add(be);
       
        BusinessDetail saveBusiness = publication.saveBusiness(sb);
        DeleteBusiness db = new DeleteBusiness();
        db.setAuthInfo(authInfoJoe);
        db.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
        publication.deleteBusiness(db);
    }
View Full Code Here

        be.getBusinessServices().getBusinessService().add(bs);

        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            DeleteBusiness db = new DeleteBusiness();
            db.setAuthInfo(authInfoJoe);
            db.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
            publication.deleteBusiness(db);
            Assert.fail("request should have been rejected");

        } catch (ValueNotAllowedException ex) {
            HandleException(ex);
View Full Code Here

        n.setValue("A Test business");
        be.getName().add(n);
        be.setContacts(ContactMaxEmailMaxUseType());
        sb.getBusinessEntity().add(be);
       
        BusinessDetail saveBusiness = publication.saveBusiness(sb);
        DeleteBusiness db = new DeleteBusiness();
        db.setAuthInfo(authInfoJoe);
        db.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
        publication.deleteBusiness(db);
    }
View Full Code Here

        n.setValue("A Test business");
        be.getName().add(n);
        be.setContacts(ContactTooLongEmailMaxUseType());
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            DeleteBusiness db = new DeleteBusiness();
            db.setAuthInfo(authInfoJoe);
            db.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
            publication.deleteBusiness(db);
            Assert.fail("request should have been rejected");

        } catch (ValueNotAllowedException ex) {
            HandleException(ex);
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.BusinessDetail

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.