Examples of IWebServiceMarker


Examples of org.ow2.util.ee.metadata.ws.api.struct.IWebServiceMarker

     */
    protected IWebServiceInfo createWebServiceInfo(final EasyBeansEjbJarClassMetadata sessionBean,
                                                 final String beanName) {

        // Get the WS marker
        IWebServiceMarker marker = sessionBean.getWebServiceMarker();
        String name = marker.getName();

        // Use info from webservices.xml if available
        IWebservices webservicesDD = this.deployment.getEjbJarArchiveMetadata().getWebservices12();
        IPortComponent portComponent = null;
        if (webservicesDD != null) {
            // Resolve the port-component associated with this endpoint
            portComponent = webservicesDD.findPortComponent(beanName);

            if ((portComponent != null) && (name == null)) {
                // Find the port name
                name = portComponent.getName();
            }
        }

        // Use info from easybeans.xml if available
        WebserviceEndpoint endpoint = null;
        EasyBeansDD easybeansDD = this.deployment.getEjbJarArchiveMetadata().getEasyBeansDD();
        if (easybeansDD != null) {

            // Iterates on additional datas
            EasyBeansWebservices webservices = easybeansDD.getWebservices();
            if ((webservices != null) && (webservices.getWebserviceEndpoints() != null)) {

                Iterator<WebserviceEndpoint> i = webservices.getWebserviceEndpoints().iterator();
                for (; i.hasNext() && (endpoint == null);) {
                    WebserviceEndpoint browsed = i.next();

                    if (browsed.getPortComponentName().equals(name)) {
                        endpoint = browsed;
                    }
                }
            }

            // Fill the Info structure
            WebServiceInfo info = new WebServiceInfo();

            // Read name
            info.setPortComponentName(name);

            if (portComponent != null) {

                // Read wsdl-location from the webservice-description parent element
                info.setWsdlLocation(portComponent.getParent().getWsdlFile());

                // Read service QName
                info.setServiceName(portComponent.getWsdlService());

                // Read port QName
                info.setPortName(portComponent.getWsdlPort());

                // Read protocol-binding
                info.setProtocolBinding(portComponent.getProtocolBinding());

                // Read enable-mtom
                info.setMTOMEnabled(portComponent.isMTOMEnabled());

                // Read service-endpoint-interface
                if  (!marker.isWebServiceProvider()) {
                    info.setServiceEndpointInterface(portComponent.getServiceEndpointInterface());
                }

                // Read HandlerChains
                info.setHandlerChains(portComponent.getHandlerChains());
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.