Examples of FindTModel


Examples of org.uddi.api_v3.FindTModel

            HandleException(ex);
            Assert.fail("unexpected failure");
        }

        int found1 = 0;
        FindTModel fb = new FindTModel();
        fb.setAuthInfo(authInfoJoe);
        n = new Name();
        n.setValue("%JUDDI_571_Part3_Test%");
        fb.setName(n);
        fb.setFindQualifiers(new FindQualifiers());
        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
        try {
            TModelList findTModel = inquiry.findTModel(fb);
            if (findTModel.getTModelInfos() != null) {
                for (int i = 0; i < findTModel.getTModelInfos().getTModelInfo().size(); i++) {
                    if (businesskeysToDelete.contains(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey())) {
                        found1++;
                    }
                }
            }
        } catch (Exception ex) {
            HandleException(ex);
            Assert.fail("unexpected failure");
        }
        if (found1 != 2) {
            failuremsg += "No lang defined, " + found1 + " records found instead of 2";
        }



        found1 = 0;
        fb = new FindTModel();
        fb.setAuthInfo(authInfoJoe);
        n = new Name();
        n.setLang("en");
        n.setValue("%JUDDI_571_Part3_Test%");
        fb.setName(n);
        fb.setFindQualifiers(new FindQualifiers());
        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
        try {
            TModelList findTModel = inquiry.findTModel(fb);
            if (findTModel.getTModelInfos() != null) {
                for (int i = 0; i < findTModel.getTModelInfos().getTModelInfo().size(); i++) {
                    if (businesskeysToDelete.contains(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey())) {
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

        } catch (Exception ex) {
            HandleException(ex);
            Assert.fail("unexpected failure");
        }
        int found1 = 0;
        FindTModel fb = new FindTModel();
        fb.setAuthInfo(authInfoJoe);
        n = new Name();
        n.setValue("JUDDI_574");
        fb.setName(n);
        fb.setFindQualifiers(new FindQualifiers());
        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
        try {
            TModelList findTModel = inquiry.findTModel(fb);
            if (findTModel.getTModelInfos() != null) {
                for (int i = 0; i < findTModel.getTModelInfos().getTModelInfo().size(); i++) {
                    if (businesskeysToDelete.contains(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey())) {
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findService(fb);
        }

        private void findtmodel(String fq) throws Exception {
                FindTModel fb = new FindTModel();
                fb.setAuthInfo(authInfoJoe);
                fb.setFindQualifiers(new FindQualifiers());
                fb.getFindQualifiers().getFindQualifier().add(fq);
                fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                fb.setName(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findTModel(fb);
        }
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

                fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findService(fb);
        }

        private void findtmodel(String[] fq) throws Exception {
                FindTModel fb = new FindTModel();
                fb.setAuthInfo(authInfoJoe);
                fb.setFindQualifiers(new FindQualifiers());
                fb.getFindQualifiers().getFindQualifier().addAll(Arrays.asList(fq));
                fb.setName(new Name(UDDIConstants.WILDCARD, null));
                inquiry.findTModel(fb);
        }
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

         * @param namespace
         * @return tModel info
         */
        public static FindTModel createFindBindingTModelForPortType(String portType, String namespace) {

                FindTModel findTModel = new FindTModel();
                CategoryBag categoryBag = new CategoryBag();

                if (namespace != null && namespace.length() != 0) {
                        KeyedReference namespaceReference = newKeyedReference(
                                "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
                        categoryBag.getKeyedReference().add(namespaceReference);
                }
                KeyedReference bindingReference = newKeyedReference(
                        "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "binding");
                categoryBag.getKeyedReference().add(bindingReference);

                KeyedReference portTypeReference = newKeyedReference(
                        "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portType);
                categoryBag.getKeyedReference().add(portTypeReference);

                findTModel.setCategoryBag(categoryBag);

                if (log.isDebugEnabled()) {
                        log.debug(new PrintUDDI<FindTModel>().print(findTModel));
                }
                return findTModel;
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

         * @param namespace
         * @return tModel info
         */
        public static FindTModel createFindPortTypeTModelForPortType(String portTypeName, String namespace) {

                FindTModel findTModel = new FindTModel();
                Name name = new Name();
                name.setLang("en");
                name.setValue(portTypeName);
                findTModel.setName(name);

                CategoryBag categoryBag = new CategoryBag();
                if (namespace != null && namespace.length() != 0) {
                        KeyedReference namespaceReference = newKeyedReference(
                                "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
                        categoryBag.getKeyedReference().add(namespaceReference);
                }
                KeyedReference bindingReference = newKeyedReference(
                        "uddi:uddi.org:wsdl:types", "uddi-org:wsdl:types", "portType");
                categoryBag.getKeyedReference().add(bindingReference);

                findTModel.setCategoryBag(categoryBag);

                if (log.isDebugEnabled()) {
                        log.debug(new PrintUDDI<FindTModel>().print(findTModel));
                }
                return findTModel;
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

        public static FindTModel MapFindTModel(org.uddi.api_v2.FindTModel body) {
                if (body == null) {
                        return null;
                }
                FindTModel r = new FindTModel();
                r.setCategoryBag(MapCategoryBag(body.getCategoryBag()));
                r.setFindQualifiers(MapFindQualifiers(body.getFindQualifiers()));
                r.setMaxRows(body.getMaxRows());
                if (body.getName() != null) {
                        r.setName(new Name(body.getName().getValue(), body.getName().getLang()));
                }
                if (ContainsWildCardSingle(r.getName())) {
                        r.setFindQualifiers(AddApproximateMatch(r.getFindQualifiers()));
                }
                return r;
        }
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

        clerk.unRegisterBinding(bindingKey);
        //if this is the last binding for this service, and
        if (service.getBindingTemplates().getBindingTemplate().size()==1 && isRemoveServiceIfNoTemplates) {
          clerk.unRegisterService(serviceKey);
         
          FindTModel findTmodelForProcessName = createFindTModelForProcessName(serviceName);
          TModelList tModelList = clerk.findTModel(findTmodelForProcessName);
          if (tModelList!=null && tModelList.getTModelInfos()!=null && tModelList.getTModelInfos().getTModelInfo()!=null) {
            TModelInfo tModelInfo = tModelList.getTModelInfos().getTModelInfo().get(0);
            String bpel4WSTModelKey = tModelInfo.getTModelKey();
            clerk.unRegisterTModel(bpel4WSTModelKey);
            // now use this key to find the portType TModels
            GetTModelDetail findAllPortTypesForProcess = createFindAllPortTypesForProcess_1(bpel4WSTModelKey);
            TModelDetail tModelDetail = clerk.getTModelDetail(findAllPortTypesForProcess);
            if (tModelDetail!=null) {
              List<TModel> tModelPortTypeList = tModelDetail.getTModel();
              if (tModelPortTypeList!=null && tModelPortTypeList.size()>0) {
                TModel bpel4WSTModel = tModelPortTypeList.get(0);
                CategoryBag categoryBag = bpel4WSTModel.getCategoryBag();
                if (categoryBag!=null && categoryBag.getKeyedReference()!=null) {
                  List<KeyedReference> portTypeTModelKeys = new ArrayList<KeyedReference>();
                  KeyedReference namespaceRef = null;
                  for (KeyedReference keyedReference : categoryBag.getKeyedReference()) {
                    if ("uddi:uddi.org:wsdl:porttypereference".equals(keyedReference.getTModelKey()) ) {
                      portTypeTModelKeys.add(keyedReference);
                    }
                    if ("uddi:uddi.org:xml:namespace".equals(keyedReference.getTModelKey()) ) {
                      namespaceRef = keyedReference;
                    }
                  }
                  String namespace = null;
                  if (namespaceRef!=null) namespace = namespaceRef.getKeyValue();
                  //find the bindingTModel
                  for (KeyedReference keyedReference : portTypeTModelKeys) {
                    FindTModel findBindingTModel = WSDL2UDDI.createFindBindingTModelForPortType(keyedReference.getKeyValue(), namespace);
                    TModelList bindingTmodels = clerk.findTModel(findBindingTModel);
                    if (bindingTmodels!=null && bindingTmodels.getTModelInfos()!=null && bindingTmodels.getTModelInfos().getTModelInfo()!=null) {
                      for (TModelInfo bindingTModelInfo : bindingTmodels.getTModelInfos().getTModelInfo()) {
                        //delete the Binding TModel
                        clerk.unRegisterTModel(bindingTModelInfo.getTModelKey());
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

     * @param serviceName
     * @return a tModel if found
     */
    public FindTModel createFindTModelForProcessName (QName serviceName) {
     
      FindTModel findTModel = new FindTModel();
      Name name = new Name();
      //name.setLang(lang);
      name.setValue(serviceName.getLocalPart());
      findTModel.setName(name);
      CategoryBag categoryBag = new CategoryBag();
     
      String namespace = serviceName.getNamespaceURI();
      if (namespace!=null && namespace.length()!=0) {
        KeyedReference namespaceReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:xml:namespace", "uddi-org:xml:namespace", namespace);
        categoryBag.getKeyedReference().add(namespaceReference);
      }
      KeyedReference typesReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process");
      categoryBag.getKeyedReference().add(typesReference);
      findTModel.setCategoryBag(categoryBag);
     
      if (log.isDebugEnabled()) {
        log.debug(new PrintUDDI<FindTModel>().print(findTModel));
      }
      return findTModel;
View Full Code Here

Examples of org.uddi.api_v3.FindTModel

     *
     * @param portTypeKey
     * @return tmodel info
     */
    public FindTModel createFindProcessesForPortTypes(String portTypeKey) {
      FindTModel findTModel = new FindTModel();
      CategoryBag categoryBag = new CategoryBag();
     
      KeyedReference typesReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:bpel:types", "uddi-org:bpel:types", "process");
      categoryBag.getKeyedReference().add(typesReference);
     
      KeyedReference portTypeReference = WSDL2UDDI.newKeyedReference(
          "uddi:uddi.org:wsdl:porttypereference", "uddi-org:wsdl:portTypeReference", portTypeKey);
      categoryBag.getKeyedReference().add(portTypeReference);
     
      findTModel.setCategoryBag(categoryBag);
     
      return findTModel;
    }
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.