Package org.uddi.api_v2

Examples of org.uddi.api_v2.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


        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

        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

     * @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

     *
     * @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

      wsdl2UDDI.registerBusinessServices(wsdlDefinition);
      //done
     
      String portTypeName = "StockQuotePortType";
      String namespace    = "http://example.com/stockquote/";
      FindTModel findTModelForPortType = WSDL2UDDI.createFindPortTypeTModelForPortType(portTypeName, namespace);
      System.out.println(new PrintUDDI<FindTModel>().print(findTModelForPortType));
     
      wsdl2UDDI.unRegisterBusinessServices(wsdlDefinition);
    } finally {
      tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
View Full Code Here

      clerk.registerWsdls();
     
     
      String portTypeName = "StockQuotePortType";
      String namespace    = "http://example.com/stockquote/";
      FindTModel findTModelForPortType = WSDL2UDDI.createFindPortTypeTModelForPortType(portTypeName, namespace);
      System.out.println(new PrintUDDI<FindTModel>().print(findTModelForPortType));
     
      clerk.unRegisterWsdls();
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

                        sub = new Subscription();
                        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(1000));
                        sub.setBindingKey(base + "binding");
                        sub.setSubscriptionKey(base + "sub-ft");
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindTModel(new FindTModel());
                        sub.getSubscriptionFilter().getFindTModel().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindTModel().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindTModel().setName(new Name(UDDIConstants.WILDCARD, null));

                        Subscription subscriptionTM = clerk.register(sub, clerk.getUDDINode().getApiNode());
View Full Code Here

            resultsKeyBag.getTModelKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindTModel ft = subscriptionFilter.getFindTModel();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(ft.getFindQualifiers());
 
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          ft.setListHead(null);
          ft.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          // If more results are to be had, chunkData will come out with a value and a new token will be generated below.  Otherwise, it will
          // be null and no token will be generated.
View Full Code Here

            resultsKeyBag.getTModelKey().add(key);
         
          result.getKeyBag().add(resultsKeyBag);
        }
        else {
          FindTModel ft = subscriptionFilter.getFindTModel();
          org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
          findQualifiers.mapApiFindQualifiers(ft.getFindQualifiers());
 
          // To do subscription "chunking", the listHead and maxRows are nulled which will set them to system default.  User settings for
          // these values don't make sense with the "chunking" feature.
          ft.setListHead(null);
          ft.setMaxRows(null);
          // Setting the start index to the chunkData
          Holder<Integer> subscriptionStartIndex = new Holder<Integer>(chunkData);
         
          // If more results are to be had, chunkData will come out with a value and a new token will be generated below.  Otherwise, it will
          // be null and no token will be generated.
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.FindTModel

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.