Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModelInstanceDetails


        String[] tModelKeys= uddiServiceBinding.tModelKeys().split(",");
        for (String tModelKey : tModelKeys) {
          TModelInstanceInfo instanceInfo = new TModelInstanceInfo();
          instanceInfo.setTModelKey(tModelKey);
          if (bindingTemplate.getTModelInstanceDetails()==null) {
            bindingTemplate.setTModelInstanceDetails(new TModelInstanceDetails());
          }
          bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);
        }
      }
      //categoryBag on the binding
View Full Code Here


            bindingTemplate.setBindingKey(bindingKey);
        }

        Service service = wsdlDefinition.getService(serviceQName);
        if (service != null) {
            TModelInstanceDetails tModelInstanceDetails = new TModelInstanceDetails();

            Port port = service.getPort(portName);
            if (port != null) {
                if (serviceUrl == null) {
                    for (Object element : port.getExtensibilityElements()) {
                      String location = null;
                        if (element instanceof SOAPAddress) {
                            SOAPAddress address = (SOAPAddress) element;
                            location = address.getLocationURI();
                        }
                        else if (element instanceof HTTPAddress) {
                          HTTPAddress address = (HTTPAddress) element;
                            location = address.getLocationURI();
                        }
                        else if (element instanceof SOAP12Address) {
                          SOAP12Address address = (SOAP12Address) element;
                            location = address.getLocationURI();
                        }
                        if (location != null ) {
                            try {
                              URL locationURI = new URL(location);
                                AccessPoint accessPoint = new AccessPoint();
                                accessPoint.setUseType(AccessPointType.END_POINT.toString());
                                accessPoint.setValue(urlLocalizer.rewrite(locationURI));
                                bindingTemplate.setAccessPoint(accessPoint);
                                // Set Binding Key
                                String bindingKey = UDDIKeyConvention.getBindingKey(properties, serviceQName, portName, locationURI);
                                bindingTemplate.setBindingKey(bindingKey);
                                break;
                            } catch (MalformedURLException e) {
                                log.error(e.getMessage());
                            }
                        }
                    }

                }
                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);

                bindingTemplate.setTModelInstanceDetails(tModelInstanceDetails);
            } else {
                log.error("Could not find Port with portName: " + portName);
            }
View Full Code Here

        String[] tModelKeys= uddiServiceBinding.tModelKeys().split(",");
        for (String tModelKey : tModelKeys) {
          TModelInstanceInfo instanceInfo = new TModelInstanceInfo();
          instanceInfo.setTModelKey(tModelKey);
          if (bindingTemplate.getTModelInstanceDetails()==null) {
            bindingTemplate.setTModelInstanceDetails(new TModelInstanceDetails());
          }
          bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().add(instanceInfo);
        }
      }
      //categoryBag on the binding
View Full Code Here

    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

        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

                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

     * Test of compare method, of class TModelInstanceDetailsComparator.
     */
    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNulls() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare nulls");
        TModelInstanceDetails lhs = null;
        TModelInstanceDetails rhs = null;
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator(null, true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNulls2() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare nulls2");
        TModelInstanceDetails lhs = null;
        TModelInstanceDetails rhs = null;
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, true, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNulls3() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare nulls3");
        TModelInstanceDetails lhs = null;
        TModelInstanceDetails rhs = null;
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, true);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNulls4() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare nulls4");
        TModelInstanceDetails lhs = null;
        TModelInstanceDetails rhs = null;
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, true);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.TModelInstanceDetails

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.