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

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


   *
   * @see org.apache.woden.wsdl20.extensions.soap.SOAPEndpointExtensions#getHttpAuthenticationRealm()
   */
  public String getHttpAuthenticationRealm() {

        Endpoint endpoint = (Endpoint) getParent();
        Binding binding = endpoint.getBinding();
        if(binding == null) {
            return null; //the wsdl is invalid TODO - remove this check? (extensions require valid wsdl?)
        }
       
        SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding
View Full Code Here


  protected void  validateEndpoints(Endpoint[] endpoints, Description desc, ErrorReporter errorReporter) throws WSDLException
  {
    int numEndpoints = endpoints.length;
    for(int i = 0; i < numEndpoints; i++)
    {
      Endpoint endpoint = endpoints[i];
      testAssertionEndpoint1061(endpoint, errorReporter);
      testAssertionEndpoint1062(endpoint, errorReporter);
    }
  }
View Full Code Here

     * from the WSDL.
     */
    public void testGetHttpAuthenticationScheme() {
       
        //test "basic" parsed from WSDL
        Endpoint endpoint = fEndpoints[0];
        HTTPEndpointExtensions httpEndpointExts =
            (HTTPEndpointExtensions) endpoint
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        HTTPAuthenticationScheme actual = httpEndpointExts.getHttpAuthenticationScheme();
        assertEquals("Unexpected value for http authentication scheme.",
                HTTPAuthenticationScheme.BASIC,
                actual);
       
        //test "digest" parsed from WSDL
        Endpoint endpoint2 = fEndpoints[1];
        HTTPEndpointExtensions httpEndpointExts2 =
            (HTTPEndpointExtensions) endpoint2
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        HTTPAuthenticationScheme actual2 = httpEndpointExts2.getHttpAuthenticationScheme();
        assertEquals("Unexpected value for http authentication scheme.",
                HTTPAuthenticationScheme.DIGEST,
                actual2);
       
        //test default to null
        Endpoint endpoint3 = fEndpoints[2];
        HTTPEndpointExtensions httpEndpointExts3 =
            (HTTPEndpointExtensions) endpoint3
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        HTTPAuthenticationScheme actual3 = httpEndpointExts3.getHttpAuthenticationScheme();
        assertNull("Http authentication scheme did not default to null.",
View Full Code Here

     * attribute parsed from the WSDL contains "abc".
     */
    public void testGetHttpAuthenticationRealm() {
       
        //test "abc" parsed from WSDL
        Endpoint endpoint = fEndpoints[0];
        HTTPEndpointExtensions httpEndpointExts =
            (HTTPEndpointExtensions) endpoint
                .getComponentExtensionContext(
                        HTTPConstants.NS_URI_HTTP);
       
        String actual = httpEndpointExts.getHttpAuthenticationRealm();
        assertEquals("Unexpected value for http authentication realm.",
View Full Code Here

            svc = desc.getServices()[0];
            setService(svc.getName());
        } else {
            throw new DeploymentException("If service is not set, the WSDL must contain a single service definition");
        }
        Endpoint endpoint;
        if (getEndpoint() != null) {
            endpoint = svc.getEndpoint(new NCName(getEndpoint()));
            if (endpoint == null) {
                throw new DeploymentException("Cound not find endpoint '" + getEndpoint() + "' in wsdl for service '" + getService() + "'");
            }
        } else if (svc.getEndpoints().length == 1) {
            endpoint = svc.getEndpoints()[0];
            setEndpoint(endpoint.getName().toString());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() + "' "
                                             + "must contain a single port definition");
        }
        marshaler.setBinding(BindingFactory.createBinding(endpoint));
View Full Code Here

                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;
                }
                if (endpoint.getBinding().getInterface() == null) {
                    LOGGER.info("Endpoint {} has a service description, but no port type found", serviceEndpoint);
                    return;
                }
                QName interfaceName = endpoint.getBinding().getInterface().getName();
                LOGGER.debug("Endpoint {} implements interface {}", serviceEndpoint, interfaceName);
                serviceEndpoint.addInterface(interfaceName);
            }
        } catch (Exception e) {
            LOGGER.warn("Error retrieving interfaces from service description: {}", e.getMessage());
View Full Code Here

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

        processedBindings = new HashMap();
        Endpoint endpoint = null;

        if (this.interfaceName != null) {
            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 endpoint found for the given name :"
                        + this.interfaceName);
            }

            axisService
                    .addEndpoint(endpoint.getName().toString(), processEndpoint(endpoint, serviceInterface));
        } else {
            for (int i = 0; i < endpoints.length; i++) {
                axisService
                        .addEndpoint(endpoints[i].getName().toString(),
                                     processEndpoint(endpoints[i], serviceInterface));
            }
        }

        if (endpoint == null && endpoints.length > 0) {
            endpoint = endpoints[0];
        }

        axisService.setEndpointName(endpoint.getName().toString());
        axisService.setBindingName(endpoint.getBinding().getName().getLocalPart());
        axisService.setEndpointURL(endpoint.getAddress().toString());

    }
View Full Code Here

            setService(svc.getName());
        } else {
            throw new DeploymentException(
                            "If service is not set, the WSDL must contain a single service definition");
        }
        Endpoint endpoint;
        if (getEndpoint() != null) {
            endpoint = svc.getEndpoint(new NCName(getEndpoint()));
            if (endpoint == null) {
                throw new DeploymentException("Cound not find endpoint '" + getEndpoint()
                                + "' in wsdl for service '" + getService() + "'");
            }
        } else if (svc.getEndpoints().length == 1) {
            endpoint = svc.getEndpoints()[0];
            setEndpoint(endpoint.getName().toString());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService()
                            + "' must contain a single port definition");
        }
        marshaler.setBinding(BindingFactory.createBinding(endpoint));
View Full Code Here

            svc = desc.getServices()[0];
            setService(svc.getName());
        } else {
            throw new DeploymentException("If service is not set, the WSDL must contain a single service definition");
        }
        Endpoint endpoint;
        if (getEndpoint() != null) {
            endpoint = svc.getEndpoint(new NCName(getEndpoint()));
            if (endpoint == null) {
                throw new DeploymentException("Cound not find endpoint '" + getEndpoint() + "' in wsdl for service '" + getService() + "'");
            }
        } else if (svc.getEndpoints().length == 1) {
            endpoint = svc.getEndpoints()[0];
            setEndpoint(endpoint.getName().toString());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() + "' "
                                             + "must contain a single port definition");
        }
        marshaler.setBinding(BindingFactory.createBinding(endpoint));
View Full Code Here

        try {
            String url = PersonHttpTest.class.getResource(wsdlResource).toString();
            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            DescriptionElement descElement = reader.readWSDL(url);
            Description desc = descElement.toComponent();
            Endpoint endpoint = desc.getServices()[0].getEndpoints()[0];
            Binding<?> binding = BindingFactory.createBinding(endpoint);
            assertNotNull(binding);
            return binding;
        } catch (WSDLException e) {
            throw new RuntimeException(e);
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.