Examples of TModel


Examples of org.uddi.api_v3.TModel

      if (!seedAlways && alreadyInstalled(config))
        new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
      String nodeId = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
     
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      log.info("Loading the root Publisher from file " + fileRootPublisher);
      rootPublisher = installPublisher(em, fileRootPublisher, config);
     
      installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);

      rootBusinessEntity.setBusinessKey(nodeId);
      installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config);
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
View Full Code Here

Examples of org.uddi.api_v3.TModel

         * @return null, or a TModel object
         * @throws ValueNotAllowedException
         * @since 3.3
         */
        private TModel verifyTModelKeyExists(String tmodelKey) throws ValueNotAllowedException, DispositionReportFaultMessage {
                TModel api = null;
                EntityManager em = PersistenceManager.getEntityManager();
                boolean found = false;
                if (em == null) {
                        log.warn(new ErrorMessage("errors.tmodel.ReferentialIntegrityNullEM"));
                } else {
                        Tmodel modelTModel = null;
                        {
                                EntityTransaction tx = em.getTransaction();
                                try {

                                        tx.begin();
                                        modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);


                                        if (modelTModel != null) {
                                                found = true;
                                                api = new TModel();
                                                MappingModelToApi.mapTModel(modelTModel, api);
                                        }
                                        tx.commit();

                                } finally {
View Full Code Here

Examples of org.uddi.api_v3.TModel

                return ret;
        }

        private List<String> GetBindingKeysCheckedTModelKeyedReference(Map<String, TModel> cache, KeyedReference get) {
                List<String> ret = new ArrayList<String>();
                TModel ref = null;
                if (cache.containsKey(get.getTModelKey())) {
                        ref = cache.get(get.getTModelKey());
                }
                if (ref == null) {
                        try {
View Full Code Here

Examples of org.uddi.api_v3.TModel

      List<TModelInfo> tiList = tInfos.getTModelInfo();
      if (tiList == null || tiList.size() == 0)
        Assert.fail("No result from find tModel operation");
      TModelInfo tiOut = tiList.get(0);
     
      TModel tmIn = (TModel)EntityCreator.buildFromDoc(TckTModel.JOE_PUBLISHER_TMODEL_XML, "org.uddi.api_v3");
     
      assertEquals(tmIn.getTModelKey(), tiOut.getTModelKey());
      assertEquals(tmIn.getName().getLang(), tiOut.getName().getLang());
      assertEquals(tmIn.getName().getValue(), tiOut.getName().getValue());

      TckValidator.checkDescriptions(tmIn.getDescription(), tiOut.getDescription());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown.");
    }
View Full Code Here

Examples of org.uddi.api_v3.TModel

        throw new FatalErrorException(new ErrorMessage("errors.install.AlreadyInstalled"));
     
     
      String rootPublisherStr = config.getString(Property.JUDDI_ROOT_PUBLISHER);
      String fileRootTModelKeygen = rootPublisherStr + FILE_TMODELKEYGEN;
      TModel rootTModelKeyGen = (TModel)buildInstallEntity(fileRootTModelKeygen, "org.uddi.api_v3", config);
      String fileRootBusinessEntity = rootPublisherStr + FILE_BUSINESSENTITY;
      org.uddi.api_v3.BusinessEntity rootBusinessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, "org.uddi.api_v3",config);
     
      String rootPartition = getRootPartition(rootTModelKeyGen);
                        //JUDDI-645
      String nodeId = config.getString(Property.JUDDI_NODE_ID,getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition) );
                                //getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
      String rootbizkey = getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
      String fileRootPublisher = rootPublisherStr + FILE_PUBLISHER;
      if (!alreadyInstalled) {
        log.info("Loading the root Publisher from file " + fileRootPublisher);
     
        rootPublisher = installPublisher(em, fileRootPublisher, config);
        installRootPublisherKeyGen(em, rootTModelKeyGen, rootPartition, rootPublisher, nodeId);
        rootBusinessEntity.setBusinessKey(rootbizkey);
        installBusinessEntity(true, em, rootBusinessEntity, rootPublisher, rootPartition, config,nodeId);
      } else {
        log.debug("juddi.seed.always reapplies all seed files except for the root data.");
      }
     
      List<String> juddiPublishers = getPublishers(config);
      for (String publisherStr : juddiPublishers) {
        String filePublisher = publisherStr + FILE_PUBLISHER;
        String fileTModelKeygen = publisherStr + FILE_TMODELKEYGEN;
        TModel tModelKeyGen = (TModel)buildInstallEntity(fileTModelKeygen, "org.uddi.api_v3", config);
        String fileBusinessEntity = publisherStr + FILE_BUSINESSENTITY;
        org.uddi.api_v3.BusinessEntity businessEntity = (org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileBusinessEntity, "org.uddi.api_v3",config);
        UddiEntityPublisher publisher = installPublisher(em, filePublisher, config);
        if (publisher==null) {
          throw new ConfigurationException("File " + filePublisher + " not found.");
View Full Code Here

Examples of org.uddi4j.datatype.tmodel.TModel

      WSDLDocument wsdlDoc = null;
      try {
          UDDIProxy uddiProxy = new UDDIProxy();
          UDDIReference uddiReference = getAnalyzerConfig().getUDDIReference();
          uddiProxy.setInquiryURL(uddiReference.getInquiryURL());
          TModel tModel = null;

          if (uddiReference.getKeyType().equals(UDDIReference.BINDING_KEY)) {
              BindingDetail bindingDetail = uddiProxy.get_bindingDetail(
                      uddiReference.getKey());
              BindingTemplate bindingTemplate = (BindingTemplate) bindingDetail.
View Full Code Here

Examples of org.uddi4j.datatype.tmodel.TModel

   * @throws UDDIException if the return value of a UDDI API cannot indicate
   *         an error condition.
   */
  public static TModel getTModelByKey(UDDIProxy proxy, String key)
  {
    TModel result = null;

    try
    {
      TModelDetail bd = proxy.get_tModelDetail(key);

View Full Code Here

Examples of org.uddi4j.datatype.tmodel.TModel

    UDDIProxy uddiProxy,
    BindingTemplate bindingTemplate,
    boolean verboseOption)
    throws WSIException
  {
    TModel tModel = null;

    // Get the list of tModel references associated with this bindingTemplate
    Iterator iterator =
      bindingTemplate
        .getTModelInstanceDetails()
        .getTModelInstanceInfoVector()
        .iterator();

    // Process each tModel reference
    Vector tModelKeyList = new Vector();
    while (iterator.hasNext())
    {
      // Get tModelInstanceInfo
      TModelInstanceInfo tModelInstanceInfo =
        (TModelInstanceInfo) iterator.next();

      // Add key to list
      tModelKeyList.add(tModelInstanceInfo.getTModelKey());
    }

    // Get the tModels associated with the bindingTemplate
    if (tModelKeyList.size() > 0)
    {
      try
      {
        // Get the tModel details
        TModelDetail tModelDetail = uddiProxy.get_tModelDetail(tModelKeyList);

        // Get the list of tModels
        Iterator tModelIterator = tModelDetail.getTModelVector().iterator();

        //boolean tModelFound = false;
        TModel nextTModel = null;

        // Go through the list of tModels
        while ((tModelIterator.hasNext()) && (tModel == null))
        {
          // Get next tModel in list
View Full Code Here

Examples of org.uddi4j.datatype.tmodel.TModel

    result = AssertionResult.RESULT_PASSED;

    Binding binding = null;

    // Get the tModel from the entryContext
    TModel tModel = (TModel) entryContext.getEntry().getEntryDetail();

    // If the tModel does not exist, then fail
    if (tModel == null)
    {
      result = AssertionResult.RESULT_FAILED;
      failureDetailMessage = "Could not locate a tModel.";
      return validator.createAssertionResult(
        testAssertion,
        result,
        failureDetailMessage);
    }

    String key = tModel.getTModelKey();

    OverviewDoc doc = tModel.getOverviewDoc();
    if (doc != null)
    {
      String urlText = doc.getOverviewURLString();

      // Try to resolve the URL & check the WSDL
View Full Code Here

Examples of org.uddi4j.datatype.tmodel.TModel

    EntryContext entryContext)
    throws WSIException
  {
    result = AssertionResult.RESULT_FAILED;

    TModel tModel =
      UDDIUtils.getTModelByKey(
        this.validator.uddiProxy,
        UDDIUtils.getWSIConformanceTModelKey(this.validator.uddiProxy));

    // If the tModel does not exist, then fail
    if (tModel == null)
    {
      result = AssertionResult.RESULT_FAILED;
      failureDetailMessage = "Could not locate a tModel.";
    }
    else
    {
      boolean validURL =
        tModel.getOverviewDoc() != null
          && "http://ws-i.org/schemas/conformanceClaim/".equals(
            tModel.getOverviewDoc().getOverviewURLString());
      boolean validCategory = checkCategoryBag(tModel.getCategoryBag());

      if (validURL && validCategory)
      {
        result = AssertionResult.RESULT_PASSED;
      }
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.