Package org.uddi.api_v3

Examples of org.uddi.api_v3.BindingTemplate


                return r;
        }

        private static BindingTemplates getBindingTemplates() {
                BindingTemplates bt = new BindingTemplates();
                BindingTemplate t = new BindingTemplate();
                t.setAccessPoint(new AccessPoint("http://localhost", AccessPointType.END_POINT.toString()));
                t.setBindingKey(domainprefix+"binding");
//                t.setCategoryBag(getCatbag());
                t.getDescription().addAll(getDescriptions());
                t.setHostingRedirector(null);
                t.setServiceKey(domainprefix+"servicekey");
               
                t.setTModelInstanceDetails(getTID());
               
                bt.getBindingTemplate().add(t);
                return bt;
        }
View Full Code Here


                        businessService = createBusinessService(serviceQName, wsdlDefinition);
                        // Register this Service
                        clerk.register(businessService);
                }
                //Add the BindingTemplate to this Service
                BindingTemplate binding = createWSDLBinding(serviceQName, portName, serviceUrl, wsdlDefinition);
                // Register BindingTemplate
                if (binding.getAccessPoint() != null) {
                        clerk.register(binding);
                        if (businessService.getBindingTemplates() == null) {
                                businessService.setBindingTemplates(new BindingTemplates());
                        }
                        businessService.getBindingTemplates().getBindingTemplate().add(binding);
                        response.setBindingKey(binding.getBindingKey());
                }
                response.setBusinessService(businessService);
                return response;
        }
View Full Code Here

                        //add the bindingTemplates
                        URL serviceUrl = null;
                        if (service.getPorts() != null && service.getPorts().size() > 0) {
                                businessService.setBindingTemplates(new BindingTemplates());
                                for (Object portName : service.getPorts().keySet()) {
                                        BindingTemplate bindingTemplate = createWSDLBinding(serviceQName, (String) portName, serviceUrl, wsdlDefinition);
                                        businessService.getBindingTemplates().getBindingTemplate().add(bindingTemplate);
                                }
                        }
                        businessServices.getBusinessService().add(businessService);
                }
View Full Code Here

                return service;
        }

        protected BindingTemplate createWSDLBinding(QName serviceQName, String portName, URL serviceUrl, Definition wsdlDefinition) throws MalformedURLException {

                BindingTemplate bindingTemplate = new BindingTemplate();
                // Set BusinessService Key
                bindingTemplate.setServiceKey(UDDIKeyConvention.getServiceKey(properties, serviceQName.getLocalPart()));

                if (serviceUrl != null) {
                        // Set AccessPoint
                        AccessPoint accessPoint = new AccessPoint();
                        accessPoint.setUseType(AccessPointType.END_POINT.toString());
                        accessPoint.setValue(urlLocalizer.rewrite(serviceUrl));
                        bindingTemplate.setAccessPoint(accessPoint);
                        // Set Binding Key
                        String bindingKey = UDDIKeyConvention.getBindingKey(properties, serviceQName, portName, serviceUrl);
                        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);
                        }
                } else {
                        log.error("Could not find Service with serviceName: " + serviceQName.getLocalPart());
View Full Code Here

        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(null);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
        bs.getBindingTemplates().getBindingTemplate().add(bt);
        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bs = ds.signUddiEntity(bs);
View Full Code Here

        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
        bs.getBindingTemplates().getBindingTemplate().add(bt);
        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bs = ds.signUddiEntity(bs);
View Full Code Here

        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
        bt.setServiceKey(null);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
        bs.getBindingTemplates().getBindingTemplate().add(bt);
        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bs = ds.signUddiEntity(bs);
View Full Code Here

        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
        bt.setServiceKey(null);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bt = ds.signUddiEntity(bt);
        bs.getBindingTemplates().getBindingTemplate().add(bt);
View Full Code Here

        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(null);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bt = ds.signUddiEntity(bt);
        bs.getBindingTemplates().getBindingTemplate().add(bt);
View Full Code Here

        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bt = ds.signUddiEntity(bt);
        bs.getBindingTemplates().getBindingTemplate().add(bt);
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.BindingTemplate

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.