Package org.uddi.api_v2

Examples of org.uddi.api_v2.ServiceDetail


      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
      ServiceDetail sd = inquiry.getServiceDetail(gs);
      List<BusinessService> bsOutList = sd.getBusinessService();
      BusinessService bsOut = bsOutList.get(0);

      assertEquals(bsIn.getServiceKey(), bsOut.getServiceKey());
     
      TckValidator.checkNames(bsIn.getName(), bsOut.getName());
View Full Code Here


     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
      gs.getServiceKey().add(serviceKey2);
      ServiceDetail sd = inquiry.getServiceDetail(gs);
      List<BusinessService> bsOutList = sd.getBusinessService();
      int size = bsOutList.size();

      assertEquals(2, size);
     
     
View Full Code Here

    InquiryResponse response = new InquiryResponse();
    logger.debug("ServiceDetail " + getServiceDetail + " sending serviceDetail request..");
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           UDDIInquiryPortType inquiryService = transport.getUDDIInquiryService();
           ServiceDetail serviceDetail = inquiryService.getServiceDetail(getServiceDetail);
           for (BusinessService businessService : serviceDetail.getBusinessService()) {
             Service service = new Service(
                 businessService.getServiceKey(),
                 EntityForLang.getName(businessService.getName(),lang).getValue(),
                 EntityForLang.getDescription(businessService.getDescription(),lang).getValue());
             for (BindingTemplate bindingTemplate : businessService.getBindingTemplates().getBindingTemplate()) {
View Full Code Here

    try {
      GetServiceDetail getServiceDetail = new GetServiceDetail();
      getServiceDetail.getServiceKey().add(serviceKey);
     
     
      ServiceDetail result = inquiry.getServiceDetail(getServiceDetail);
     
      if (result == null)
        Assert.fail("Null result from find service operation");
     
      BindingTemplates templates = result.getBusinessService().get(0).getBindingTemplates();
      if (templates!=null && templates.getBindingTemplate()!=null) {
        System.out.println(templates.getBindingTemplate().size());
        System.out.println("key=" + templates.getBindingTemplate().get(0).getBindingKey());
      }
//      ServiceInfos sInfos = result.getServiceInfos();
View Full Code Here

    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveService saveService = new SaveService();
      saveService.setAuthInfo(authToken);
      saveService.getBusinessService().add(service);
      ServiceDetail serviceDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveService(saveService);
      businessService = serviceDetail.getBusinessService().get(0);
    } catch (Exception e) {
      log.error("Unable to register service " + service.getName().get(0).getValue()
          + " ." + e.getMessage(),e);
    } catch (Throwable t) {
      log.error("Unable to register service " + service.getName().get(0).getValue()
View Full Code Here

  TransportException, ConfigurationException  {
    GetServiceDetail getServiceDetail = new GetServiceDetail();
    getServiceDetail.getServiceKey().add(serviceKey);
    getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
    try {
      ServiceDetail sd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getServiceDetail);
      List<BusinessService> businessServiceList = sd.getBusinessService();
      if (businessServiceList.size() == 0) throw new ConfigurationException("Could not find Service with key=" + serviceKey);
      return businessServiceList.get(0);
    } catch (DispositionReportFaultMessage dr) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
      checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
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();
                        long procTime = System.nanoTime() - startTime;
                        serviceCounter.update(InquiryQuery.GET_SERVICEDETAIL, QueryStatus.SUCCESS, procTime);                     
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

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.