Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.Endpoint


           
            // Add each endpoint to the Client class
            Collection endpoints = service.getEndpoints();
            for (Iterator eitr = endpoints.iterator(); eitr.hasNext(); )
            {
              Endpoint enp = (Endpoint) eitr.next();
             
                generate(context, servCls, service, serviceVar, enp);
            }
        }
    }
View Full Code Here


            _endpointName = findFirstSoapEndpoint(serviceModel.getEndpoints());
        }
       
        if (_endpointName != null)
        {
            Endpoint ep = serviceModel.getEndpoint(_endpointName);
            if (ep == null)
                throw new IllegalStateException("Could not find endpoint with name " + _endpointName + " on service.");
           
            return new XFireProxyFactory().create(ep);
        }
View Full Code Here

    private QName findFirstSoapEndpoint(Collection endpoints)
    {
        for (Iterator itr = endpoints.iterator(); itr.hasNext();)
        {
            Endpoint ep = (Endpoint) itr.next();
           
            if (ep.getBinding() instanceof AbstractSoapBinding)
                return ep.getName();
        }
        return null;
    }
View Full Code Here

                addedLocal = true;
            }
           
            for (Iterator itr = service.getEndpoints().iterator(); itr.hasNext();)
            {
                Endpoint endpoint = (Endpoint) itr.next();
   
                JInvocation newQN = JExpr._new(qnameType);
                newQN.arg(endpoint.getName().getNamespaceURI());
                newQN.arg(endpoint.getName().getLocalPart());
               
                JInvocation bindingQN = JExpr._new(qnameType);
                bindingQN.arg(endpoint.getBinding().getName().getNamespaceURI());
                bindingQN.arg(endpoint.getBinding().getName().getLocalPart());

                // Add a getFooEndpointMethod
                JMethod getFooEndpoint = servCls.method(JMod.PUBLIC, serviceIntf, javify("get" + endpoint.getName().getLocalPart()));
                JBlock geBody = getFooEndpoint.body();
   
                geBody._return(JExpr.cast(serviceIntf, JExpr.direct("this").invoke("getPort").arg(newQN).arg(intfClass)));
               
                JAnnotationUse weAnn = getFooEndpoint.annotate(WebEndpoint.class);
                weAnn.param("name", endpoint.getName().getLocalPart());
               
                staticBlock.add(portsVar.invoke("put").arg(newQN).arg(intfClass));
            }
        }
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    public <T> T getPort(QName portName, Class<T> clazz)
    {
        Endpoint endpoint = getService(clazz).getEndpoint(portName);
       
        if (endpoint == null) throw new WebServiceException("Invalid port name " + portName);
       
        return (T) createPort(endpoint);
    }
View Full Code Here

            if (service == null)
            {
                throw new IllegalStateException("Could not find port " + port);
            }
           
            Endpoint ep = service.getEndpoint(port);
            transport = jaxWsHelper.getTransportManager().getTransport(ep.getBinding().getBindingId());
            address = ep.getUrl();
        }
       
        Client client = new Client(transport,
                                   jaxWsHelper.getSourceService(),
                                   address);
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.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.