Package org.apache.shindig.gadgets.spec

Examples of org.apache.shindig.gadgets.spec.OAuthService$EndPoint


                Service service = desc.getService(serviceEndpoint.getServiceName());
                if (service == null) {
                    logger.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) {
                    logger.info("Endpoint " + serviceEndpoint + " has a service description, but no matching endpoint found in " + service.getEndpoints());
                    return;
                }
                if (endpoint.getBinding() == null) {
                    logger.info("Endpoint " + serviceEndpoint + " has a service description, but no binding found");
                    return;
                }
                if (endpoint.getBinding().getInterface() == null) {
                    logger.info("Endpoint " + serviceEndpoint + " has a service description, but no port type found");
                    return;
                }
                QName interfaceName = endpoint.getBinding().getInterface().getName();
                if (logger.isDebugEnabled()) {
                    logger.debug("Endpoint " + serviceEndpoint + " implements interface " + interfaceName);
                }
                serviceEndpoint.addInterface(interfaceName);
            }
View Full Code Here


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

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

        // If the interface name is not null thats means that this is a call from the codegen engine
        // and we need to populate a single endpoint. Hence find the endpoint and populate it.
        // If that was not the case then we need to check whether the call is from the codegen
        // engine with thw allports check false. If its so no need to populate all endpoints, we
        // select an enspoint accrding to the following criteria.
        // 1. Find the first SOAP 1.2 endpoint
        // 2. Find the first SOAP 1.1 endpoint
        // 3. Use the first endpoint
        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 if (this.isCodegen && !this.isAllPorts) {
            Endpoint soap11Endpoint = null;
            for (int i = 0; i < endpoints.length; ++i) {
                Binding binding = endpoints[i].getBinding();
                if (WSDL2Constants.URI_WSDL2_SOAP.equals(binding.getType().toString())) {
                    SOAPBindingExtensions soapBindingExtensions;
                    try {
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

     *
     * TODO add a testcase for this method
     */
    public Endpoint getEndpoint(NCName name)
    {
        Endpoint endpoint = null;
        if(name != null)
        {
            String nameString = name.toString();
            for(Iterator i=fEndpoints.iterator(); i.hasNext(); )
            {
                Endpoint tmpEP = (Endpoint)i.next();
                String tmpStr = tmpEP.getName() != null ? tmpEP.getName().toString() : null;
                if(nameString.equals(tmpStr))
                {
                    endpoint = tmpEP;
                    break;
                }
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));
        } else {
            for (int i = 0; i < endpoints.length; i++) {
                axisService
                        .addEndpoint(endpoints[i].getName().toString(),
                                     processEndpoint(endpoints[i]));
            }
        }

        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

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.END_POINT: {
            EndPoint endPoint = (EndPoint) theEObject;
            T result = caseEndPoint(endPoint);
            if (result == null)
                result = caseRootElement(endPoint);
            if (result == null)
                result = caseBaseElement(endPoint);
View Full Code Here

        this.optionMap = optionMap;
    }

    /** {@inheritDoc} */
    public synchronized void start(final StartContext context) throws StartException {
        final Endpoint endpoint;
        try {
            boolean ok = false;
            endpoint = Remoting.createEndpoint(endpointName, optionMap);
            try {
                endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.EMPTY);
                ok = true;
            } finally {
                if (! ok) {
                    endpoint.closeAsync();
                }
            }
        } catch (IOException e) {
            throw new StartException("Failed to start service", e);
        }
View Full Code Here

        }
    }

    /** {@inheritDoc} */
    public synchronized Endpoint getValue() throws IllegalStateException {
        final Endpoint endpoint = this.endpoint;
        if (endpoint == null) throw new IllegalStateException();
        return endpoint;
    }
View Full Code Here

    }

    protected ContextSelector<EJBClientContext> setupEJBClientContextSelector(String username, String password) throws IOException {
        // create the endpoint
        final Endpoint endpoint = Remoting.createEndpoint("remoting-test", OptionMap.create(Options.THREAD_DAEMON, true));
        endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.create(Options.SSL_ENABLED, false));
        final URI connectionURI = managementClient.getRemoteEjbURL();

        OptionMap.Builder builder = OptionMap.builder().set(Options.SASL_POLICY_NOANONYMOUS, true);
        builder.set(Options.SASL_POLICY_NOPLAINTEXT, false);
        if (password != null) {
            builder.set(Options.SASL_DISALLOWED_MECHANISMS, Sequence.of("JBOSS-LOCAL-USER"));
        } else {
            builder.set(Options.SASL_MECHANISMS, Sequence.of("JBOSS-LOCAL-USER"));
        }

        final IoFuture<Connection> futureConnection = endpoint.connect(connectionURI, builder.getMap(), new AuthenticationCallbackHandler(username, password));
        // wait for the connection to be established
        final Connection connection = IoFutureHelper.get(futureConnection, 5000, TimeUnit.MILLISECONDS);
        // create a remoting EJB receiver for this connection
        final EJBReceiver receiver = new RemotingConnectionEJBReceiver(connection);
        // associate it with the client context
View Full Code Here

        if (configuration == null) {
            throw MESSAGES.nullVar("configuration");
        }
        configuration.validate();

        final Endpoint endpoint = configuration.getEndpoint();
        return new ProtocolChannelClient(endpoint, configuration);
    }
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.spec.OAuthService$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.