Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModelInstanceDetails


    }

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


    }

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

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNulls7() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare nulls7");
        TModelInstanceDetails lhs = new TModelInstanceDetails();

        TModelInstanceDetails rhs = new TModelInstanceDetails();
        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

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

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNotFound() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare notfound");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("asd");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("asd");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToNoData() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNoData");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToLHSNull() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToLHSNull");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        //lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("xyz");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("xyz");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToRHSNull() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToRHSNull");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("xyz");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        //rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("xyz");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here

                bt.getBindingTemplate().add(t);
                return bt;
        }

        private static TModelInstanceDetails getTID() {
                TModelInstanceDetails r = new TModelInstanceDetails();
                TModelInstanceInfo x = new TModelInstanceInfo();
                x.getDescription().addAll(getDescriptions());
                x.setTModelKey(domainprefix+"tid");
                x.setInstanceDetails(new InstanceDetails());
                x.getInstanceDetails().getDescription().addAll(getDescriptions());
                x.getInstanceDetails().setInstanceParms("asdasdasdasdasd");
                OverviewDoc o = new OverviewDoc();
  //              o.getDescription().addAll(getDescriptions());
                o.setOverviewURL(new OverviewURL("http://localhost", "overview"));
                x.getInstanceDetails().getOverviewDoc().add(o);
                r.getTModelInstanceInfo().add(x);
                return r;
        }
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 = urlLocalizer.rewrite(new URL(address.getLocationURI()));
                                                } else if (element instanceof HTTPAddress) {
                                                        HTTPAddress address = (HTTPAddress) element;
                                                        urlLocalizer.rewrite(new URL(location = address.getLocationURI()));
                                                } else if (element instanceof SOAP12Address) {
                                                        SOAP12Address address = (SOAP12Address) element;
                                                        location = urlLocalizer.rewrite(new URL(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();
                                }

                                bindingTemplate.getDescription().addAll(Common2UDDI.mapDescription(bindingDescription, lang));

                                // reference wsdl:binding tModel
                                TModelInstanceInfo tModelInstanceInfoBinding = new TModelInstanceInfo();
                                tModelInstanceInfoBinding.setTModelKey(keyDomainURI + binding.getQName().getLocalPart());
                                InstanceDetails instanceDetails = new InstanceDetails();
                                instanceDetails.setInstanceParms(portName);
                                tModelInstanceInfoBinding.setInstanceDetails(instanceDetails);

                                tModelInstanceInfoBinding.getDescription().addAll(Common2UDDI.mapDescription("The wsdl:binding that this wsdl:port implements. " + bindingDescription
                                        + " The instanceParms specifies the port local name.", lang));
                                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();
                                }

                                tModelInstanceInfoPortType.getDescription().addAll(Common2UDDI.mapDescription("The wsdl:portType that this wsdl:port implements." + portTypeDescription, lang));
                                tModelInstanceDetails.getTModelInstanceInfo().add(tModelInstanceInfoPortType);

                                bindingTemplate.setTModelInstanceDetails(tModelInstanceDetails);
                        } else {
                                log.error("Could not find Port with portName: " + portName);
                        }
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.