Package org.uddi.api_v2

Examples of org.uddi.api_v2.ServiceDetail


      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 = null;
        try {
          modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
        } catch (ClassCastException e){}
        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


    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);
      if (log.isDebugEnabled()) log.debug("Registering service " + service.getName().get(0).getValue() + " completed.");
    } catch (Exception e) {
      log.error("Unable to register service " + service.getName().get(0).getValue()
          + " ." + e.getMessage(),e);
    } catch (Throwable t) {
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

                        int returnedcount = findService.getServiceInfos().getServiceInfo().size();
                        do {
                                for (int i = 0; i < findService.getServiceInfos().getServiceInfo().size(); i++) {
                                        GetServiceDetail gsd = new GetServiceDetail();
                                        gsd.getServiceKey().add(findService.getServiceInfos().getServiceInfo().get(i).getServiceKey());
                                        ServiceDetail serviceDetail = inquiry.getServiceDetail(gsd);
                                        if (serviceDetail.getBusinessService().get(0).getBindingTemplates() != null
                                                && !serviceDetail.getBusinessService().get(0).getBindingTemplates().getBindingTemplate().isEmpty()) {
                                                return serviceDetail.getBusinessService().get(0).getBindingTemplates().getBindingTemplate().get(0);
                                        }

                                }
                                offset = fetch;
                                fetch = fetch + 10;
View Full Code Here

        public static ServiceDetail MapServiceDetail(org.uddi.api_v2.ServiceDetail serviceDetail) {
                if (serviceDetail == null) {
                        return null;
                }
                ServiceDetail r = new ServiceDetail();
                for (int i = 0; i < serviceDetail.getBusinessService().size(); i++) {
                        r.getBusinessService().add(MapService(serviceDetail.getBusinessService().get(i)));
                }
                r.setTruncated(serviceDetail.getTruncated() == Truncated.TRUE);
                return r;
        }
View Full Code Here

                be.setBusinessServices(new BusinessServices());
                be.getBusinessServices().getBusinessService().add(bs);

                sb.getBusinessEntity().add(be);
                ServiceDetail saveService = null;
                ss.getBusinessService().add(bs);
                try {
                        saveService = publicationJoe.saveService(ss);
                } catch (Exception ex) {
                        //logger.error("unExpected failure: ",ex);
                        Assert.fail("unexpected failure " + ex.getMessage() + ex.toString());
                }

                bs = saveService.getBusinessService().get(0);
                bs.setBindingTemplates(new BindingTemplates());
                BindingTemplate bt = new BindingTemplate();
                bt.setBindingKey(null);
                bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
View Full Code Here

        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);


        sb.getBusinessEntity().add(be);
        ServiceDetail saveService = null;
        ss.getBusinessService().add(bs);
        try {
            saveService = publication.saveService(ss);
        } catch (Exception ex) {
            //logger.error("unExpected failure: ",ex);
            Assert.fail("unexpected failure " + ex.getMessage() + ex.toString());
        }


        bs = saveService.getBusinessService().get(0);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
View Full Code Here

                GetServiceDetail gsd = new GetServiceDetail();
                gsd.setAuthInfo(token);
                gsd.getServiceKey().add(serviceKey);
                String bizkey = null;
                try {
                        ServiceDetail serviceDetail = uddiInquiryService.getServiceDetail(gsd);
                        if (serviceDetail != null) {
                                if (!serviceDetail.getBusinessService().isEmpty()) {
                                        bizkey = serviceDetail.getBusinessService().get(0).getBusinessKey();
                                        if (!serviceDetail.getBusinessService().get(0).getSignature().isEmpty()) {
                                                log.info("the service with key=" + serviceKey + " exists and is digitally signed");
                                                return true;
                                        }
                                }
                        }
View Full Code Here

                        + " with key " + service.getServiceKey());
                try {
                        SaveService saveService = new SaveService();
                        saveService.setAuthInfo(getAuthToken(node.getSecurityUrl()));
                        saveService.getBusinessService().add(service);
                        ServiceDetail serviceDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveService(saveService);
                        businessService = serviceDetail.getBusinessService().get(0);
                        if (log.isDebugEnabled()) {
                                log.debug("Registering service " + service.getName().get(0).getValue() + " completed.");
                        }
                } catch (Exception e) {
                        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) {
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.