Package org.uddi.api_v3

Examples of org.uddi.api_v3.BusinessDetail


      }

      request.getBusinessEntity().addAll(Arrays.asList(businessArray));
    }
   
        BusinessDetail bd = null;
        JAXBElement<?> o = execute(this.objectFactory.createSaveBusiness(request),
            this.getPublishURI());
        if (o != null) bd = (BusinessDetail) o.getValue();

        return bd;
View Full Code Here


     
      SubscriptionResultsList result = subscription.getSubscriptionResults(getSubResultsIn);
      if (result == null)
        Assert.fail("Null result from getSubscriptionResults operation");

      BusinessDetail busDetail = result.getBusinessDetail();
      if (busDetail == null)
        Assert.fail("No result from getSubscriptionResults operation");
      List<BusinessEntity> beList = busDetail.getBusinessEntity();
      if (beList == null || beList.size() == 0)
        Assert.fail("No result from getSubscriptionResults operation");
      BusinessEntity beOut = beList.get(0);
     
      BusinessEntity beIn = (BusinessEntity)EntityCreator.buildFromDoc(TckBusiness.SAM_BUSINESS_XML, "org.uddi.api_v3");
View Full Code Here

  public void getNonExitingBusiness() {
    String nonExistingKey = "nonexistingKey";
    try {
      GetBusinessDetail body = new GetBusinessDetail();
      body.getBusinessKey().add(nonExistingKey);
      BusinessDetail  result = inquiry.getBusinessDetail(body);
      Assert.fail("No business should be found");
      System.out.println(result.getBusinessEntity().size());
    } catch (Exception e) {
      try {
        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(e);
        assertNotNull(report);
        assertTrue(report.countainsErrorCode(DispositionReport.E_INVALID_KEY_PASSED));
View Full Code Here

      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      ValidatePublish validator = new ValidatePublish(publisher);
      validator.validateSaveBusiness(em, body, null);
 
      BusinessDetail result = new BusinessDetail();
     
      List<org.uddi.api_v3.BusinessEntity> apiBusinessEntityList = body.getBusinessEntity();
      for (org.uddi.api_v3.BusinessEntity apiBusinessEntity : apiBusinessEntityList) {
       
        org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();
       
        MappingApiToModel.mapBusinessEntity(apiBusinessEntity, modelBusinessEntity);
       
        setOperationalInfo(em, modelBusinessEntity, publisher);
 
        em.persist(modelBusinessEntity);
 
        result.getBusinessEntity().add(apiBusinessEntity);
      }
     
      //check how many business this publisher owns.
      validator.validateSaveBusinessMax(em);
 
View Full Code Here

        GetBusinessDetail gbd = new GetBusinessDetail();
        gbd.setAuthInfo(token);
        for (int i = 0; i < businessInfos.getBusinessInfo().size(); i++) {
            gbd.getBusinessKey().add(businessInfos.getBusinessInfo().get(i).getBusinessKey());
        }
        BusinessDetail businessDetail = inquiry.getBusinessDetail(gbd);
        for (int i = 0; i < businessDetail.getBusinessEntity().size(); i++) {
            System.out.println("Business Detail - key: " + businessDetail.getBusinessEntity().get(i).getBusinessKey());
            System.out.println("Name: " + ListToString(businessDetail.getBusinessEntity().get(i).getName()));
            System.out.println("CategoryBag: " + CatBagToString(businessDetail.getBusinessEntity().get(i).getCategoryBag()));
            PrintContacts(businessDetail.getBusinessEntity().get(i).getContacts());
        }
    }
View Full Code Here

      tx.begin();

      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());

      BusinessDetail result = new BusinessDetail();

      List<String> businessKeyList = body.getBusinessKey();
      for (String businessKey : businessKeyList) {
        org.apache.juddi.model.BusinessEntity modelBusinessEntity = null;
        try {
          modelBusinessEntity = em.find(org.apache.juddi.model.BusinessEntity.class, businessKey);
        } catch (ClassCastException e) {}
        if (modelBusinessEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.BusinessNotFound", businessKey));

        org.uddi.api_v3.BusinessEntity apiBusinessEntity = new org.uddi.api_v3.BusinessEntity();

        MappingModelToApi.mapBusinessEntity(modelBusinessEntity, apiBusinessEntity);

        result.getBusinessEntity().add(apiBusinessEntity);
      }

      tx.commit();
                        long procTime = System.nanoTime() - startTime;
                        serviceCounter.update(InquiryQuery.GET_BUSINESSDETAIL, QueryStatus.SUCCESS, procTime);                     
View Full Code Here

    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveBusiness saveBusiness = new SaveBusiness();
      saveBusiness.setAuthInfo(authToken);
      saveBusiness.getBusinessEntity().add(business);
      BusinessDetail businessDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBusiness(saveBusiness);
      businessEntity = businessDetail.getBusinessEntity().get(0);
      if (log.isDebugEnabled()) log.debug("Registering businessEntity " + businessEntity.getName().get(0).getValue() + " completed.");
    } catch (Exception e) {
      log.error("Unable to register business " + business.getName().get(0).getValue()
          + " ." + e.getMessage(),e);
    } catch (Throwable t) {
View Full Code Here

      TransportException, ConfigurationException  {
    GetBusinessDetail getBusinessDetail = new GetBusinessDetail();
    getBusinessDetail.getBusinessKey().add(businessKey);
    getBusinessDetail.setAuthInfo(node.getSecurityUrl());
    try {
      BusinessDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBusinessDetail(getBusinessDetail);
      return bd.getBusinessEntity().get(0);
    } catch (DispositionReportFaultMessage dr) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
      checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, businessKey);
    } catch (SOAPFaultException sfe) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(sfe);
View Full Code Here

  public void checkNumberOfServices(String businessKey, int expectedServices) {
   
    try {
      GetBusinessDetail gb = new GetBusinessDetail();
      gb.getBusinessKey().add(businessKey);
      BusinessDetail bd;
      bd = inquiry.getBusinessDetail(gb);
      List<BusinessEntity> beOutList = bd.getBusinessEntity();
      BusinessEntity beOut = beOutList.get(0);
      if (expectedServices > 0) {
        assertEquals(expectedServices, beOut.getBusinessServices().getBusinessService().size());
      } else {
        Assert.assertNull(beOut.getBusinessServices());
View Full Code Here

 
        public void signBusiness(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);
                bizEntity.getSignature().clear();
                BusinessEntity bizEntitySigned = signJAXBObject(bizEntity);
                       
                SaveBusiness sb = new SaveBusiness();
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.