Package org.jboss.remoting3

Examples of org.jboss.remoting3.Endpoint


        if (service.endpoints == null) {
            service.endpoints = Lists.newArrayList();
        }

        for (String interfaceName : new String[] { "public", "internal", "admin" }) {
            Endpoint endpoint = new Endpoint();
            service.endpoints.add(endpoint);

            endpoint.id = service.id + "-" + interfaceName;
            endpoint.name = service.name;
            endpoint.interfaceName = interfaceName;
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

            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

            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(
                        "Could 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 (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

     *
     * 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

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

        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

   *
   * @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

TOP

Related Classes of org.jboss.remoting3.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.