Package org.uddi.api_v2

Examples of org.uddi.api_v2.ServiceDetail


        public ServiceDetail getServiceDetail(GetServiceDetail getDetail, Node node) throws RemoteException,
                TransportException, ConfigurationException {

                getDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
                try {
                        ServiceDetail tModelDetail = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getDetail);
                        return tModelDetail;
                } catch (DispositionReportFaultMessage dr) {
                        DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
                        checkForErrorInDispositionReport(report, null, null);
                } catch (SOAPFaultException sfe) {
View Full Code Here


 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSaveService(em, body, null);
     
      ServiceDetail result = new ServiceDetail();
 
      List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = body.getBusinessService();
      for (org.uddi.api_v3.BusinessService apiBusinessService : apiBusinessServiceList) {
       
        org.apache.juddi.model.BusinessService modelBusinessService = new org.apache.juddi.model.BusinessService();
        org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();
        modelBusinessEntity.setEntityKey(apiBusinessService.getBusinessKey());
       
        MappingApiToModel.mapBusinessService(apiBusinessService, modelBusinessService, modelBusinessEntity);
 
        setOperationalInfo(em, modelBusinessService, publisher, false);
 
        em.persist(modelBusinessService);
       
        result.getBusinessService().add(apiBusinessService);
      }
 
      tx.commit();
                        long procTime = System.nanoTime() - startTime;
                        serviceCounter.update(PublicationQuery.SAVE_SERVICE,
View Full Code Here

        //parse the results and get a list of services to get the details on
        GetServiceDetail gsd = new GetServiceDetail();
        for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) {
            gsd.getServiceKey().add(findService.getServiceInfos().getServiceInfo().get(i).getServiceKey());
        }
        ServiceDetail serviceDetail = inquiry.getServiceDetail(gsd);

        //parse the service details, looking for our versioned service
        if (serviceDetail != null) {
            for (int i = 0; i < serviceDetail.getBusinessService().size(); i++) {
                if (serviceDetail.getBusinessService().get(i).getBindingTemplates() != null) {
                    Set<BindingTemplate> bindingByVersion = UDDIClerk.getBindingByVersion("1.2.0.0", serviceDetail.getBusinessService().get(i).getBindingTemplates().getBindingTemplate());
                    Iterator<BindingTemplate> iterator = bindingByVersion.iterator();
                    while (iterator.hasNext()) {
                        BindingTemplate next = iterator.next();
                        System.out.println("SUCCESS! Found the right version on key " + next.getBindingKey());
                        //TODO so now that you've found the right version of the right service
View Full Code Here

                        for (int k = 0; k < businessInfos.getBusinessInfo().get(i).getServiceInfos().getServiceInfo().size(); k++) {
                                gsd.getServiceKey().add(businessInfos.getBusinessInfo().get(i).getServiceInfos().getServiceInfo().get(k).getServiceKey());
                        }
                        gsd.setAuthInfo(token);
                        System.out.println("Fetching data for business " + businessInfos.getBusinessInfo().get(i).getBusinessKey());
                        ServiceDetail serviceDetail = inquiry.getServiceDetail(gsd);
                        for (int k = 0; k < serviceDetail.getBusinessService().size(); k++) {
                                PrintServiceDetail(serviceDetail.getBusinessService().get(k));
                        }
                        System.out.println("................");

                }
        }
View Full Code Here

        // Store deleted keys in the results
        if (missingKeyBag.getServiceKey() != null && missingKeyBag.getServiceKey().size() > 0)
          result.getKeyBag().add(missingKeyBag);
 
        KeyBag resultsKeyBag = new KeyBag();
        ServiceDetail serviceDetail = new ServiceDetail();
       
        // 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.BusinessService modelBusinessService = existingList.get(currentIndex);
           
          if (startPointDate.after(modelBusinessService.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (endPointDate.before(modelBusinessService.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (modelSubscription.isBrief()) {
            resultsKeyBag.getServiceKey().add(modelBusinessService.getEntityKey());
          }
          else {
            org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService();
            MappingModelToApi.mapBusinessService(modelBusinessService, apiBusinessService);
            serviceDetail.getBusinessService().add(apiBusinessService);
           
            returnedRowCount++;
          }
 
          // If the returned rows equals the max allowed, we can end the loop.
View Full Code Here

      tx.begin();
 
      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());
     
      ServiceDetail result = new ServiceDetail();
 
      List<String> serviceKeyList = body.getServiceKey();
      for (String serviceKey : serviceKeyList) {
       
        org.apache.juddi.model.BusinessService modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
        if (modelBusinessService == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", serviceKey));
       
        org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService();
       
        MappingModelToApi.mapBusinessService(modelBusinessService, apiBusinessService);
       
        result.getBusinessService().add(apiBusinessService);
      }
 
      tx.commit();
      return result;
     
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSaveService(em, body);
     
      ServiceDetail result = new ServiceDetail();
 
      List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = body.getBusinessService();
      for (org.uddi.api_v3.BusinessService apiBusinessService : apiBusinessServiceList) {
       
        org.apache.juddi.model.BusinessService modelBusinessService = new org.apache.juddi.model.BusinessService();
        org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();
        modelBusinessEntity.setEntityKey(apiBusinessService.getBusinessKey());
       
        MappingApiToModel.mapBusinessService(apiBusinessService, modelBusinessService, modelBusinessEntity);
 
        setOperationalInfo(em, modelBusinessService, publisher, false);
 
        em.persist(modelBusinessService);
       
        result.getBusinessService().add(apiBusinessService);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidatePublish(publisher).validateSaveService(em, body, null);
     
      ServiceDetail result = new ServiceDetail();
 
      List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = body.getBusinessService();
      for (org.uddi.api_v3.BusinessService apiBusinessService : apiBusinessServiceList) {
       
        org.apache.juddi.model.BusinessService modelBusinessService = new org.apache.juddi.model.BusinessService();
        org.apache.juddi.model.BusinessEntity modelBusinessEntity = new org.apache.juddi.model.BusinessEntity();
        modelBusinessEntity.setEntityKey(apiBusinessService.getBusinessKey());
       
        MappingApiToModel.mapBusinessService(apiBusinessService, modelBusinessService, modelBusinessEntity);
 
        setOperationalInfo(em, modelBusinessService, publisher, false);
 
        em.persist(modelBusinessService);
       
        result.getBusinessService().add(apiBusinessService);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

      tx.begin();
 
      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());
     
      ServiceDetail result = new ServiceDetail();
 
      List<String> serviceKeyList = body.getServiceKey();
      for (String serviceKey : serviceKeyList) {
       
        org.apache.juddi.model.BusinessService modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
        if (modelBusinessService == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", serviceKey));
       
        org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService();
       
        MappingModelToApi.mapBusinessService(modelBusinessService, apiBusinessService);
       
        result.getBusinessService().add(apiBusinessService);
      }
 
      tx.commit();
      return result;
     
View Full Code Here

        // Store deleted keys in the results
        if (missingKeyBag.getServiceKey() != null && missingKeyBag.getServiceKey().size() > 0)
          result.getKeyBag().add(missingKeyBag);
 
        KeyBag resultsKeyBag = new KeyBag();
        ServiceDetail serviceDetail = new ServiceDetail();
       
        // 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.BusinessService modelBusinessService = existingList.get(currentIndex);
           
          if (startPointDate.after(modelBusinessService.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (endPointDate.before(modelBusinessService.getModifiedIncludingChildren())) {
            currentIndex++;
            continue;
          }
         
          if (modelSubscription.isBrief()) {
            resultsKeyBag.getServiceKey().add(modelBusinessService.getEntityKey());
          }
          else {
            org.uddi.api_v3.BusinessService apiBusinessService = new org.uddi.api_v3.BusinessService();
            MappingModelToApi.mapBusinessService(modelBusinessService, apiBusinessService);
            serviceDetail.getBusinessService().add(apiBusinessService);
           
            returnedRowCount++;
          }
 
          // If the returned rows equals the max allowed, we can end the loop.
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.ServiceDetail

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.