Examples of PortInfo


Examples of org.apache.geronimo.jaxws.PortInfo

                Class<?> ejbClass = bundle.loadClass(bean.ejbClass);
                if (JAXWSUtils.isWebService(ejbClass)) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Found EJB Web Service: " + bean.ejbName);
                    }
                    PortInfo portInfo = new PortInfo();
                    String location = correctedPortLocations.get(bean.ejbName);
                    if (location == null) {
                        // set default location, i.e. /@WebService.serviceName/@WebService.name
                        location = "/" + JAXWSUtils.getServiceName(ejbClass) + "/" + JAXWSUtils.getName(ejbClass);
                    }
                    portInfo.setLocation(location);
                    portInfo.setWsdlService(JAXWSUtils.getServiceQName(ejbClass));
                    portInfo.setWsdlPort(JAXWSUtils.getPortQName(ejbClass));
                    map.put(bean.ejbName, portInfo);
                    ejbWebServiceClassNames.add(bean.ejbClass);
                }
            } catch (Exception e) {
                throw new DeploymentException("Failed to load ejb class "
View Full Code Here

Examples of org.apache.geronimo.jaxws.PortInfo

                ServletMapping servletMapping = new ServletMapping();
                servletMapping.setServletName(service.getName());
                servletMapping.getUrlPattern().add(location);

                // map service
                PortInfo portInfo = new PortInfo();
                portInfo.setLocation(contextRoot + location);
                servletNamePortInfoMap.put(service.getName(), portInfo);
            }
        } else {
            // web.xml present, examine servlet classes and check for web
            // services
            for (Servlet servletType : servletTypes) {
                String servletName = servletType.getServletName().trim();
                if (servletType.getServletClass() != null) {
                    String servletClassName = servletType.getServletClass().trim();
                    try {
                        Class<?> servletClass = bundle.loadClass(servletClassName);
                        if (JAXWSUtils.isWebService(servletClass)) {
                            if (LOG.isDebugEnabled()) {
                                LOG.debug("Found POJO Web Service: " + servletName);
                            }
                            PortInfo portInfo = new PortInfo();
                            servletNamePortInfoMap.put(servletName, portInfo);
                        }
                    } catch (Exception e) {
                        throw new DeploymentException("Failed to load servlet class " + servletClassName + " from bundle " + bundle, e);
                    }
                }
            }

            // update web service locations
            for (Map.Entry<String, PortInfo> entry : servletNamePortInfoMap.entrySet()) {
                String servletName = entry.getKey();
                PortInfo portInfo = entry.getValue();

                String location = correctedPortLocations.get(servletName);
                if (location != null) {
                    portInfo.setLocation(location);
                }
            }
        }

        return servletNamePortInfoMap;
View Full Code Here

Examples of org.apache.geronimo.jaxws.PortInfo

                    String serviceName = desc.getWebserviceDescriptionName().getStringValue();

                    for (PortComponentType port : desc.getPortComponentArray()) {

                        PortInfo portInfo = new PortInfo();
                        String serviceLink = null;
                        ServiceImplBeanType beanType = port.getServiceImplBean();
                        if (beanType.getEjbLink() != null) {
                            serviceLink = beanType.getEjbLink().getStringValue();
                        } else if (beanType.getServletLink().getStringValue() != null) {
                            serviceLink = beanType.getServletLink().getStringValue();
                        }
                        portInfo.setServiceLink(serviceLink);

                        if (port.getServiceEndpointInterface() != null) {
                            String sei = port.getServiceEndpointInterface().getStringValue();
                            portInfo.setServiceEndpointInterfaceName(sei);
                        }

                        String portName = port.getPortComponentName().getStringValue();
                        portInfo.setPortName(portName);

                        portInfo.setProtocolBinding(port.getProtocolBinding());
                        portInfo.setServiceName(serviceName);
                        portInfo.setWsdlFile(wsdlFile);

                        if (port.getEnableMtom() != null) {
                            portInfo.setEnableMTOM(port.getEnableMtom().getBooleanValue());
                        }

                        if (port.getHandlerChains() != null) {
                            StringBuffer chains = new StringBuffer("<handler-chains xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
                            chains.append(port.getHandlerChains().xmlText());
                            chains.append("</handler-chains>");
                            portInfo.setHandlersAsXML(chains.toString());
                        }

                        if (port.getWsdlPort() != null) {
                            portInfo.setWsdlPort(port.getWsdlPort().getQNameValue());
                        }

                        if (port.getWsdlService() != null) {
                            portInfo.setWsdlService(port.getWsdlService().getQNameValue());
                        }

                        String location = (String) correctedPortLocations.get(serviceLink);
                        portInfo.setLocation(location);

                        if (map == null) {
                            map = new HashMap<String, PortInfo>();
                        }
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

    }

    public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String servletClassName, DeploymentContext context) throws DeploymentException {
        Map sharedContext = ((WebModule) module).getSharedContext();
        Map portInfoMap = (Map) sharedContext.get(KEY);
        PortInfo portInfo = (PortInfo) portInfoMap.get(servletName);
        if (portInfo == null) {
            //not ours
            return false;
        }
       
        ClassLoader cl = context.getClassLoader();
        Class serviceClass = loadClass(servletClassName, cl);       
        if (isJAXWSWebService(serviceClass)) {
            if (DescriptorVersion.J2EE.equals(portInfo.getDescriptorVersion())) {
                // This is a JAX-WS web service in J2EE descriptor so throw an exception
                throw new DeploymentException("JAX-WS web service '" + portInfo.getPortComponentName()
                                              + "' cannot be specified in J2EE webservices.xml descriptor.");
            } else {
                // This is a JAX-WS web service in JAVAEE descriptor so ignore
                return false;
            }
        }
       
        portInfo.initialize(module.getModuleFile());
       
        LOG.debug("Publishing JAX-RPC '" + portInfo.getPortComponentName()
                  + "' service at " + portInfo.getContextURI());
       
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, cl);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();

        targetGBean.setAttribute("pojoClassName", servletClassName);
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

        return true;
    }

    public boolean configureEJB(GBeanData targetGBean, String ejbName, Module module, Map sharedContext, ClassLoader classLoader) throws DeploymentException {
        Map portInfoMap = (Map) sharedContext.get(KEY);
        PortInfo portInfo = (PortInfo) portInfoMap.get(ejbName);
        if (portInfo == null) {
            //not ours
            return false;
        }
       
        String beanClassName = (String)targetGBean.getAttribute("ejbClass");
        Class serviceClass = loadClass(beanClassName, classLoader);
        if (isJAXWSWebService(serviceClass)) {
            if (DescriptorVersion.J2EE.equals(portInfo.getDescriptorVersion())) {
                // This is a JAX-WS web service in J2EE descriptor so throw an exception
                throw new DeploymentException("JAX-WS web service '" + portInfo.getPortComponentName()
                                              + "' cannot be specified in J2EE webservices.xml descriptor.");
            } else {
                // This is a JAX-WS web service in JAVAEE descriptor so ignore
                return false;
            }
        }
       
        portInfo.initialize(module.getModuleFile());
       
        LOG.debug("Publishing EJB JAX-RPC '" + portInfo.getPortComponentName()
                  + "' service at " + portInfo.getContextURI());
       
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
        targetGBean.setAttribute("serviceInfo", serviceInfo);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
        URI location = portInfo.getContextURI();
        targetGBean.setAttribute("location", location);
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

    public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String seiClassName, DeploymentContext context) throws DeploymentException {
        ClassLoader cl = context.getClassLoader();
        Map sharedContext = ((WebModule) module).getSharedContext();
        Map portInfoMap = (Map) sharedContext.get(KEY);
        PortInfo portInfo = (PortInfo) portInfoMap.get(servletName);
        if (portInfo == null) {
            //not ours
            return false;
        }
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, cl);
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

        return true;
    }

    public boolean configureEJB(GBeanData targetGBean, String ejbName, JarFile moduleFile, Map sharedContext, ClassLoader classLoader) throws DeploymentException {
        Map portInfoMap = (Map) sharedContext.get(KEY);
        PortInfo portInfo = (PortInfo) portInfoMap.get(ejbName);
        if (portInfo == null) {
            //not ours
            return false;
        }
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
        targetGBean.setAttribute("serviceInfo", serviceInfo);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
        URI location = portInfo.getContextURI();
        targetGBean.setAttribute("location", location);
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

    }

    public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module, String servletClassName, DeploymentContext context) throws DeploymentException {
        Map sharedContext = ((WebModule) module).getSharedContext();
        Map portInfoMap = (Map) sharedContext.get(KEY);
        PortInfo portInfo = (PortInfo) portInfoMap.get(servletName);
        if (portInfo == null) {
            //not ours
            return false;
        }
       
        ClassLoader cl = context.getClassLoader();
        Class serviceClass = loadClass(servletClassName, cl);       
        if (isJAXWSWebService(serviceClass)) {
            if (DescriptorVersion.J2EE.equals(portInfo.getDescriptorVersion())) {
                // This is a JAX-WS web service in J2EE descriptor so throw an exception
                throw new DeploymentException("JAX-WS web service '" + portInfo.getPortComponentName()
                                              + "' cannot be specified in J2EE webservices.xml descriptor.");
            } else {
                // This is a JAX-WS web service in JAVAEE descriptor so ignore
                return false;
            }
        }
       
        portInfo.initialize(module.getModuleFile());
       
        LOG.debug("Publishing JAX-RPC '" + portInfo.getPortComponentName()
                  + "' service at " + portInfo.getContextURI());
       
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, cl);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();

        targetGBean.setAttribute("pojoClassName", servletClassName);
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

        return true;
    }

    public boolean configureEJB(GBeanData targetGBean, String ejbName, Module module, Map sharedContext, ClassLoader classLoader) throws DeploymentException {
        Map portInfoMap = (Map) sharedContext.get(KEY);
        PortInfo portInfo = (PortInfo) portInfoMap.get(ejbName);
        if (portInfo == null) {
            //not ours
            return false;
        }
       
        String beanClassName = (String)targetGBean.getAttribute("ejbClass");
        Class serviceClass = loadClass(beanClassName, classLoader);
        if (isJAXWSWebService(serviceClass)) {
            if (DescriptorVersion.J2EE.equals(portInfo.getDescriptorVersion())) {
                // This is a JAX-WS web service in J2EE descriptor so throw an exception
                throw new DeploymentException("JAX-WS web service '" + portInfo.getPortComponentName()
                                              + "' cannot be specified in J2EE webservices.xml descriptor.");
            } else {
                // This is a JAX-WS web service in JAVAEE descriptor so ignore
                return false;
            }
        }
       
        portInfo.initialize(module.getModuleFile());
       
        LOG.debug("Publishing EJB JAX-RPC '" + portInfo.getPortComponentName()
                  + "' service at " + portInfo.getContextURI());
       
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
        targetGBean.setAttribute("serviceInfo", serviceInfo);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
        URI location = portInfo.getContextURI();
        targetGBean.setAttribute("location", location);
        URI wsdlURI;
        try {
            wsdlURI = new URI(serviceDesc.getWSDLFile());
        } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.geronimo.webservices.builder.PortInfo

        Map<String, PortInfo> portInfoMap = (Map<String, PortInfo>) sharedContext.get(KEY);

        if(portInfoMap == null) {
            return false;
        }
        PortInfo portInfo = portInfoMap.get(servletName);
        if (portInfo == null) {
            //not ours
            return false;
        }

        Bundle bundle = context.getDeploymentBundle();
        Class<?> serviceClass = loadClass(servletClassName, bundle);
        if (isJAXWSWebService(serviceClass)) {
            if (DescriptorVersion.J2EE.equals(portInfo.getDescriptorVersion())) {
                // This is a JAX-WS web service in J2EE descriptor so throw an exception
                throw new DeploymentException("JAX-WS web service '" + portInfo.getPortComponentName()
                                              + "' cannot be specified in J2EE webservices.xml descriptor.");
            } else {
                // This is a JAX-WS web service in JAVAEE descriptor so ignore
                return false;
            }
        }

        portInfo.initialize(module.getModuleFile());

        if (LOG.isDebugEnabled()) {
            LOG.debug("Publishing JAX-RPC '" + portInfo.getPortComponentName() + "' service at " + portInfo.getContextURI());
        }
        ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, bundle);
        JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();

        targetGBean.setAttribute("pojoClassName", servletClassName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.