Examples of TModelInstanceDetails


Examples of org.uddi.api_v3.TModelInstanceDetails

    bindingTemplate.setAccessPoint(accessPoint);
   
    Service service =  wsdlDefinition.getService(serviceName);
   
    if (service!=null) {
      TModelInstanceDetails tModelInstanceDetails = new TModelInstanceDetails();
     
      Port port = service.getPort(portName);
      if (port!=null) {
        Binding binding = port.getBinding();
        // Set the Binding Description
        String bindingDescription = properties.getProperty(Property.BINDING_DESCRIPTION, Property.DEFAULT_BINDING_DESCRIPTION);
        // Override with the service description from the WSDL if present
        Element docElement = binding.getDocumentationElement();
        if (docElement!=null && docElement.getTextContent()!=null) {
          bindingDescription = docElement.getTextContent();
        }
        Description description = new Description();
        description.setLang(lang);
        description.setValue(bindingDescription);
        bindingTemplate.getDescription().add(description);
       
        // reference wsdl:binding tModel
        TModelInstanceInfo tModelInstanceInfoBinding = new TModelInstanceInfo();
        tModelInstanceInfoBinding.setTModelKey(keyDomainURI + binding.getQName().getLocalPart());
        InstanceDetails instanceDetails = new InstanceDetails();
        instanceDetails.setInstanceParms(portName)
        tModelInstanceInfoBinding.setInstanceDetails(instanceDetails);
        Description descriptionB = new Description();
        descriptionB.setLang(lang);
        descriptionB.setValue("The wsdl:binding that this wsdl:port implements. " + bindingDescription +
            " The instanceParms specifies the port local name.");
        tModelInstanceInfoBinding.getDescription().add(descriptionB);
        tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoBinding);
       
        // reference wsdl:portType tModel
        PortType portType = binding.getPortType();
        TModelInstanceInfo tModelInstanceInfoPortType = new TModelInstanceInfo();
        tModelInstanceInfoPortType.setTModelKey(keyDomainURI + portType.getQName().getLocalPart());
        String portTypeDescription = "";
        docElement = portType.getDocumentationElement();
        if (docElement!=null && docElement.getTextContent()!=null) {
          portTypeDescription = docElement.getTextContent();
        }
        Description descriptionPT = new Description();
        descriptionPT.setLang(lang);
        descriptionPT.setValue("The wsdl:portType that this wsdl:port implements." + portTypeDescription );
        tModelInstanceInfoPortType.getDescription().add(descriptionPT);
        tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoPortType);
       
        //reference bpel:process tModel
        TModelInstanceInfo tModelInstanceInfoBPEL = new TModelInstanceInfo();
        tModelInstanceInfoBPEL.setTModelKey(keyDomainURI + service.getQName().getLocalPart() + "Process");
        Description descriptionBPEL = new Description();
        // Description
        String serviceDescription = properties.getProperty(Property.SERVICE_DESCRIPTION, Property.DEFAULT_SERVICE_DESCRIPTION);
        // Override with the service description from the WSDL if present
        docElement = wsdlDefinition.getService(serviceName).getDocumentationElement();
        if (docElement!=null && docElement.getTextContent()!=null) {
          serviceDescription = docElement.getTextContent();
        }
        descriptionBPEL.setLang(lang);
        descriptionBPEL.setValue("The bpel:process this wsdl:port supports." + serviceDescription);
        tModelInstanceInfoBPEL.getDescription().add(descriptionBPEL);
        tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoBPEL);
       
        bindingTemplate.setTModelInstanceDetails(tModelInstanceDetails);
      } else {
        log.error("Could not find Port with portName: " + portName);
      }
View Full Code Here

Examples of org.uddi.api_v3.TModelInstanceDetails

        private static TModelInstanceDetails MapTModelInstanceDetails(org.uddi.api_v2.TModelInstanceDetails tModelInstanceDetails) {
                if (tModelInstanceDetails == null | tModelInstanceDetails.getTModelInstanceInfo().isEmpty()) {
                        return null;
                }
                TModelInstanceDetails r = new TModelInstanceDetails();
                r.getTModelInstanceInfo().addAll(MapTModelInstanceInfo(tModelInstanceDetails.getTModelInstanceInfo()));
                return r;
        }
View Full Code Here

Examples of org.uddi.api_v3.TModelInstanceDetails

                bt.setAccessPoint(new AccessPoint());
                bt.getAccessPoint().setValue(callback);
                bt.getAccessPoint().setUseType("endPoint");
                TModelInstanceInfo instanceInfo = new TModelInstanceInfo();
                instanceInfo.setTModelKey("uddi:uddi.org:transport:http");
                bt.setTModelInstanceDetails(new TModelInstanceDetails());
                bt.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);
                bt.setServiceKey(serviceKey);
                if (keydomain.endsWith(":")) {
                        bt.setBindingKey(keydomain + GetHostname() + "_subscription_callback");
                } else {
View Full Code Here

Examples of org.uddi4j.datatype.binding.TModelInstanceDetails

    Name name = new Name(ANIMAL_BUSINESS_SERVICE);
    busService.setDefaultName(name);
    CategoryBag catBag = _createCategoryBag();
    busService.setCategoryBag(catBag);
    BindingTemplate bindingTemplate = new BindingTemplate();
    TModelInstanceDetails tModelInstanceDetails = new TModelInstanceDetails();
    TModelInstanceInfo tModelInstanceInfo = new TModelInstanceInfo();
    tModelInstanceInfo.setTModelKey(((TModel)_animalProtocol_tModelDetail.getTModelVector().elementAt(0)).getTModelKey());
    tModelInstanceInfo.setDefaultDescriptionString("Animal Protocol tModel Instance");
    tModelInstanceDetails.add(tModelInstanceInfo);

    tModelInstanceInfo = new TModelInstanceInfo();
    tModelInstanceInfo.setTModelKey(((TModel)_animalProtocol_tModelDetail.getTModelVector().elementAt(0)).getTModelKey());

    /**
     * This creates the unique, well-defined tModel representing the service's WSDL
     */
    TModelDetail tmodelDetail = null;
    try {
      tmodelDetail = _publishWSDL_tModel();
    }
    catch (TransportException ex) {
      /**
       * @todo cleanup ??
       */
      return  ret;
    }
    catch (UDDIException ex) {
      /**
       * @todo cleanup ??
       */
      return ret;
    }
    tModelInstanceInfo = new TModelInstanceInfo();
    tModelInstanceInfo.setTModelKey(((TModel)tmodelDetail.getTModelVector().elementAt(0)).getTModelKey());
    tModelInstanceInfo.setDefaultDescriptionString("Animal Service tModel instance");
    tModelInstanceDetails.add(tModelInstanceInfo);

    /**
     * Associate the set of tModels with the Service's BindingTemplate
     */
    bindingTemplate.setTModelInstanceDetails(tModelInstanceDetails);
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.