Examples of OperationalInfos


Examples of org.uddi.api_v3.OperationalInfos

      tx.begin();

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

      OperationalInfos result = new OperationalInfos();

      List<String> entityKeyList = body.getEntityKey();
      for (String entityKey : entityKeyList) {

        org.apache.juddi.model.UddiEntity modelUddiEntity = em.find(org.apache.juddi.model.UddiEntity.class, entityKey);
        if (modelUddiEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.EntityNotFound", entityKey));

        org.uddi.api_v3.OperationalInfo apiOperationalInfo = new org.uddi.api_v3.OperationalInfo();

        MappingModelToApi.mapOperationalInfo(modelUddiEntity, apiOperationalInfo);

        result.getOperationalInfo().add(apiOperationalInfo);
      }

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

Examples of org.uddi.api_v3.OperationalInfos

      tx.begin();
 
      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());
     
      OperationalInfos result = new OperationalInfos();
     
      List<String> entityKeyList = body.getEntityKey();
      for (String entityKey : entityKeyList) {
       
        org.apache.juddi.model.UddiEntity modelUddiEntity = em.find(org.apache.juddi.model.UddiEntity.class, entityKey);
        if (modelUddiEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.EntityNotFound", entityKey));
       
        org.uddi.api_v3.OperationalInfo apiOperationalInfo = new org.uddi.api_v3.OperationalInfo();
       
        MappingModelToApi.mapOperationalInfo(modelUddiEntity, apiOperationalInfo);
       
        result.getOperationalInfo().add(apiOperationalInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

Examples of org.uddi.api_v3.OperationalInfos

      tx.begin();

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

      OperationalInfos result = new OperationalInfos();

      List<String> entityKeyList = body.getEntityKey();
      for (String entityKey : entityKeyList) {
        org.apache.juddi.model.UddiEntity modelUddiEntity = null;
        try {
          modelUddiEntity = em.find(org.apache.juddi.model.UddiEntity.class, entityKey);
        } catch (ClassCastException e) {}
        if (modelUddiEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.EntityNotFound", entityKey));

        org.uddi.api_v3.OperationalInfo apiOperationalInfo = new org.uddi.api_v3.OperationalInfo();

        MappingModelToApi.mapOperationalInfo(modelUddiEntity, apiOperationalInfo);

        result.getOperationalInfo().add(apiOperationalInfo);
      }

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

Examples of org.uddi.api_v3.OperationalInfos

    public static String GetOwner(String key, String token, UDDIInquiryPortType inquiry) {
        GetOperationalInfo goi = new GetOperationalInfo();
        goi.setAuthInfo(token);
        goi.getEntityKey().add(key);
        OperationalInfos operationalInfo = null;
        try {
            operationalInfo = inquiry.getOperationalInfo(goi);
            if (operationalInfo!=null && operationalInfo.getOperationalInfo()!=null &&
                    !operationalInfo.getOperationalInfo().isEmpty())
            return operationalInfo.getOperationalInfo().get(0).getAuthorizedName();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }
View Full Code Here

Examples of org.uddi.api_v3.OperationalInfos

      tx.begin();

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

      OperationalInfos result = new OperationalInfos();

      List<String> entityKeyList = body.getEntityKey();
      for (String entityKey : entityKeyList) {
        org.apache.juddi.model.UddiEntity modelUddiEntity = null;
        try {
          modelUddiEntity = em.find(org.apache.juddi.model.UddiEntity.class, entityKey);
        } catch (ClassCastException e) {}
        if (modelUddiEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.EntityNotFound", entityKey));

        org.uddi.api_v3.OperationalInfo apiOperationalInfo = new org.uddi.api_v3.OperationalInfo();

        MappingModelToApi.mapOperationalInfo(modelUddiEntity, apiOperationalInfo);

        result.getOperationalInfo().add(apiOperationalInfo);
      }

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

Examples of org.uddi.api_v3.OperationalInfos

        public static final String VERSION = "2.0";

        @Override
        public OperationalInfos getOperationalInfo(GetOperationalInfo body) throws DispositionReportFaultMessage, RemoteException {
                OperationalInfos ret = new OperationalInfos();

                for (int i = 0; i < body.getEntityKey().size(); i++) {
                        OperationalInfo oi = new OperationalInfo();
                        oi.setEntityKey(body.getEntityKey().get(i));
                        try {
                                org.uddi.api_v2.GetBusinessDetail businessDetail = new org.uddi.api_v2.GetBusinessDetail();
                                businessDetail.setGeneric(VERSION);
                                businessDetail.getBusinessKey().add(body.getEntityKey().get(i));
                                org.uddi.api_v2.BusinessDetail z = inquiryService.getBusinessDetail(businessDetail);
                                oi.setNodeID(z.getOperator());
                                oi.setAuthorizedName(z.getBusinessEntity().get(0).getAuthorizedName());
                        } catch (Exception ex) {
                        }
                        if (oi.getAuthorizedName() != null) {
                                continue;
                        }
                        try {
                                org.uddi.api_v2.GetTModelDetail tModelDetail = new org.uddi.api_v2.GetTModelDetail();
                                tModelDetail.setGeneric(VERSION);
                                tModelDetail.getTModelKey().add(body.getEntityKey().get(i));
                                org.uddi.api_v2.TModelDetail z = inquiryService.getTModelDetail(tModelDetail);
                                oi.setNodeID(z.getOperator());
                                oi.setAuthorizedName(z.getTModel().get(0).getAuthorizedName());
                        } catch (Exception ex) {
                        }
                        if (oi.getAuthorizedName() != null) {
                                continue;
                        }
                        try {
                                //get the service
                                org.uddi.api_v2.GetServiceDetail serviceDetail = new org.uddi.api_v2.GetServiceDetail();
                                serviceDetail.setGeneric(VERSION);
                                serviceDetail.getServiceKey().add(body.getEntityKey().get(i));
                                org.uddi.api_v2.ServiceDetail z = inquiryService.getServiceDetail(serviceDetail);
                                oi.setNodeID(z.getOperator());

                                org.uddi.api_v2.GetBusinessDetail businessDetail = new org.uddi.api_v2.GetBusinessDetail();
                                businessDetail.setGeneric(VERSION);
                                //its owning business
                                businessDetail.getBusinessKey().add(z.getBusinessService().get(0).getBusinessKey());
                                org.uddi.api_v2.BusinessDetail z2 = inquiryService.getBusinessDetail(businessDetail);
                                oi.setNodeID(z.getOperator());
                                oi.setAuthorizedName(z2.getBusinessEntity().get(0).getAuthorizedName());
                        } catch (Exception ex) {
                        }
                        ret.getOperationalInfo().add(oi);
                        ret.setTruncated(false);
                }
                return ret;
        }
View Full Code Here

Examples of org.uddi.api_v3.OperationalInfos

                //confirm the transfer
                GetOperationalInfo go = new GetOperationalInfo();
                go.setAuthInfo(authInfoSam);
                go.getEntityKey().add(keySamBiz);
                go.getEntityKey().add(keyJoeBiz);
                OperationalInfos operationalInfo = inquirySam.getOperationalInfo(go);

                for (int i = 0; i < operationalInfo.getOperationalInfo().size(); i++) {
                        if (operationalInfo.getOperationalInfo().get(i).getEntityKey().equalsIgnoreCase(keyJoeBiz)) {
                                Assert.assertEquals(operationalInfo.getOperationalInfo().get(i).getAuthorizedName(), (TckPublisher.getSamPublisherId()));

                        }
                }
                System.out.println("Business Entity transfered successfull");
View Full Code Here

Examples of org.uddi.api_v3.OperationalInfos

      tx.begin();
 
      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());
     
      OperationalInfos result = new OperationalInfos();
     
      List<String> entityKeyList = body.getEntityKey();
      for (String entityKey : entityKeyList) {
       
        org.apache.juddi.model.UddiEntity modelUddiEntity = em.find(org.apache.juddi.model.UddiEntity.class, entityKey);
        if (modelUddiEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.EntityNotFound", entityKey));
       
        org.uddi.api_v3.OperationalInfo apiOperationalInfo = new org.uddi.api_v3.OperationalInfo();
       
        MappingModelToApi.mapOperationalInfo(modelUddiEntity, apiOperationalInfo);
       
        result.getOperationalInfo().add(apiOperationalInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

Examples of org.uddi.api_v3.OperationalInfos

      tx.begin();
 
      if (isAuthenticated())
        this.getEntityPublisher(em, body.getAuthInfo());
     
      OperationalInfos result = new OperationalInfos();
     
      List<String> entityKeyList = body.getEntityKey();
      for (String entityKey : entityKeyList) {
       
        org.apache.juddi.model.UddiEntity modelUddiEntity = em.find(org.apache.juddi.model.UddiEntity.class, entityKey);
        if (modelUddiEntity == null)
          throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.EntityNotFound", entityKey));
       
        org.uddi.api_v3.OperationalInfo apiOperationalInfo = new org.uddi.api_v3.OperationalInfo();
       
        MappingModelToApi.mapOperationalInfo(modelUddiEntity, apiOperationalInfo);
       
        result.getOperationalInfo().add(apiOperationalInfo);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.