Package org.uddi.api_v3

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


      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

    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

      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

        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

                //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

      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

      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

  public void addPublisherAssertion(String authInfo, String pubassertXML) {
    try {
      AddPublisherAssertions ap = new AddPublisherAssertions();
      ap.setAuthInfo(authInfo);

      PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(pubassertXML, "org.uddi.api_v3");
      ap.getPublisherAssertion().add(paIn);
      publication.addPublisherAssertions(ap);
 
      // Now get the entity and check the values
      List<PublisherAssertion> paOutList = publication.getPublisherAssertions(authInfo);
      if (paOutList.size()==1) {
        PublisherAssertion paOut = paOutList.get(0);
 
        assertEquals(paIn.getFromKey(), paOut.getFromKey());
        assertEquals(paIn.getToKey(), paOut.getToKey());
       
        KeyedReference keyRefIn = paIn.getKeyedReference();
        KeyedReference keyRefOut = paOut.getKeyedReference();
       
        assertEquals(keyRefIn.getTModelKey(), keyRefOut.getTModelKey());
        assertEquals(keyRefIn.getKeyName(), keyRefOut.getKeyName());
        assertEquals(keyRefIn.getKeyValue(), keyRefOut.getKeyValue());
      }
View Full Code Here

    try {
      // Delete the entity and make sure it is removed
      DeletePublisherAssertions dp = new DeletePublisherAssertions();
      dp.setAuthInfo(authInfo);
     
      PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(pubassertXML, "org.uddi.api_v3");
      dp.getPublisherAssertion().add(paIn);
     
      publication.deletePublisherAssertions(dp);
    }
    catch(Exception e) {
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.OperationalInfos

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.