Package com.woorea.openstack.keystone.v3.model

Examples of com.woorea.openstack.keystone.v3.model.Token$Service$Endpoint


        List allServices = new Vector();
       
        //declared services
        for(Iterator i=fServiceElements.iterator(); i.hasNext(); )
        {
            Service service = (Service)i.next();
            if(!containsComponent(service, allServices)) {
                ((ServiceImpl)service).setDescriptionComponent(this);
                allServices.add(service);
            }
        }
       
        //nested services
        List nestedDescs = new Vector(getNestedDescriptions());
        for(Iterator i=nestedDescs.iterator(); i.hasNext(); )
        {
            DescriptionElement desc = (DescriptionElement)i.next();
            ServiceElement[] services = desc.getServiceElements();
            for(int j=0; j<services.length; j++)
            {
                Service service = (Service)services[j];
                if(!containsComponent(service, allServices)) {
                    ((ServiceImpl)service).setDescriptionComponent(this);
                    allServices.add(service);
                }
            }
View Full Code Here


    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.Description#getService(javax.xml.namespace.QName)
     */
    public Service getService(QName name)
    {
        Service service = null;
       
        if(name != null)
        {
            Service[] services = getServices();
           
View Full Code Here

    /*
     * (non-Javadoc)
     * @see org.apache.woden.wsdl20.WSDLComponent#getFragmentIdentifier()
     */
    public FragmentIdentifier getFragmentIdentifier() {
        Service serviceComp = (Service)getParent();
       
        NCName service = new NCName(serviceComp.getName().getLocalPart());
       
        return new FragmentIdentifier(new EndpointPart(service ,fName));
    }
View Full Code Here

                wsdlURL);
       
        Description descComp = reader.readWSDL(wsdlURL.toString());
        assertNotNull("The reader did not return a WSDL description.", descComp);
       
        Service service = descComp.getServices()[0];
        assertNotNull("The Description should contain 1 Service component.",
                service);
       
        fEndpoints = service.getEndpoints();
        assertEquals("The Service contained unexpected number of Endpoint components.", 3, fEndpoints.length);
    }
View Full Code Here

                Interface itf = desc.getInterfaces()[0];
                QName interfaceName = itf.getName();
                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                serviceEndpoint.addInterface(interfaceName);
            } else {
                Service service = desc.getService(serviceEndpoint.getServiceName());
                if (service == null) {
                    LOGGER.info("Endpoint {} has a service description, but no matching service found in {}",
                                    serviceEndpoint, desc.getServices());
                    return;
                }
                Endpoint endpoint = service.getEndpoint(new NCName(serviceEndpoint.getEndpointName()));
                if (endpoint == null) {
                    LOGGER.info("Endpoint {} has a service description, but no matching endpoint found in {}",
                                    serviceEndpoint, service.getEndpoints());
                    return;
                }
                if (endpoint.getBinding() == null) {
                    LOGGER.info("Endpoint {} has a service description, but no binding found", serviceEndpoint);
                    return;
View Full Code Here

                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                this.axisService = new AxisService();
                    AxisService retAxisService = populateService();
                    if (retAxisService != null) {
                        axisServices.add(retAxisService);
                    } // end if axisService was returned
View Full Code Here

                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                this.axisService = new AxisService();
                    AxisService retAxisService = populateService();
                    if (retAxisService != null) {
                        axisServices.add(retAxisService);
                    } // end if axisService was returned
View Full Code Here

                if (LOG.isDebugEnabled()) {
                    LOG.debug("Endpoint " + serviceEndpoint + " implements interface " + interfaceName);
                }
                serviceEndpoint.addInterface(interfaceName);
            } else {
                Service service = desc.getService(serviceEndpoint.getServiceName());
                if (service == null) {
                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no matching service found in "
                                    + desc.getServices());
                    return;
                }
                Endpoint endpoint = service.getEndpoint(new NCName(serviceEndpoint.getEndpointName()));
                if (endpoint == null) {
                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no matching endpoint found in "
                                    + service.getEndpoints());
                    return;
                }
                if (endpoint.getBinding() == null) {
                    LOG.info("Endpoint " + serviceEndpoint + " has a service description, but no binding found");
                    return;
View Full Code Here

        }
    }

    private Binding findBinding(Description discription) throws AxisFault {
        Service[] services = discription.getServices();
        Service service = null;
        Endpoint endpoint = null;
        Binding binding = null;

        if (services.length == 0) {
            throw new AxisFault("No service found in the WSDL");
        }

        if (serviceName != null) {
            for (int i = 0; i < services.length; i++) {
                if (serviceName.equals(services[i].getName())) {
                    service = services[i];
                    break// found it. Stop looking.
                }
            }
            if (service == null) {
                throw new AxisFault("Service not found the WSDL "
                        + serviceName.getLocalPart());
            }
        } else {
            // If no particular service is mentioned select the first one.
            service = services[0];
        }
        // FIXME @author Chathura get the policy stuff to be copied
        // copyExtensibleElements(service.getExtensibilityElements(), dif,
        // axisService, SERVICE);
        Endpoint[] endpoints = service.getEndpoints();
        if (this.interfaceName != null) {

            if (endpoints.length == 0) {
                throw new AxisFault("No Endpoints/Ports found in the service:"
                        + service.getName().getLocalPart());
            }

            for (int i = 0; i < endpoints.length; ++i) {
                if (this.interfaceName.equals(endpoints[i].getName().toString())) {
                    endpoint = endpoints[i];
                    break// found it.  Stop looking
                }
            }
            if (endpoint == null) {
                throw new AxisFault("No port found for the given name :"
                        + this.interfaceName);
            }
        } else {
            // if no particular endpoint is specified use the first one.
            endpoint = endpoints[0];

        }
        axisService.setName(service.getName().getLocalPart());
        if (endpoint != null) {
            // FIXME @author Chathura copy in the policy stuff
            // copyExtensibleElements(port.getExtensibilityElements(), dif,
            // axisService, PORT);
            axisService.setEndpoint(endpoint.getAddress().toString());
View Full Code Here

                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                Endpoint[] endpoints = service.getEndpoints();
                for (int j = 0; j < endpoints.length; j++) {
                    interfaceName = endpoints[j].getName().toString();
                    // start with a fresh axisService
                    this.axisService = new AxisService();
                    // now that serviceName and interfaceName are set, call up to the
View Full Code Here

TOP

Related Classes of com.woorea.openstack.keystone.v3.model.Token$Service$Endpoint

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.