Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.WebServiceHandler


            // 109 and JAXRPC.  JAXRPC only defines roles at the handler chain
            // level, whereas 109 descriptors put roles at the handler level.
            Collection soapRoles = new HashSet();           

            for(Iterator hIter = handlerChain.iterator(); hIter.hasNext();) {
                WebServiceHandler nextHandler =
                    (WebServiceHandler) hIter.next();
                HandlerInfo handlerInfo = createHandlerInfo(nextHandler);
                handlerInfoList.add(handlerInfo);
                soapRoles.addAll(nextHandler.getSoapRoles());
            }

            // Insert a container handler as the last element in the chain.
            HandlerInfo postHandler = rpcFactory.createHandlerInfo();
            handlerClassName = nextEndpoint.implementedByEjbComponent() ?
View Full Code Here


            List handlerChain = registry.getHandlerChain(nextPort);
            Collection soapRoles = new HashSet();

            for(Iterator iter = serviceRef.getHandlers().iterator();
                iter.hasNext();) {
                WebServiceHandler nextHandler = (WebServiceHandler) iter.next();
                Collection portNames = nextHandler.getPortNames();
                if( portNames.isEmpty() ||
                    portNames.contains(nextPort.getLocalPart()) ) {
                    soapRoles.addAll(nextHandler.getSoapRoles());
                    HandlerInfo handlerInfo =
                        createHandlerInfo(nextHandler, loader);
                    handlerChain.add(handlerInfo);
                }
            }
View Full Code Here

        for(Iterator<WebServiceHandlerChain> hc = ep.getHandlerChain().iterator();
                                hc.hasNext();) {
            WebServiceHandlerChain thisHc = hc.next();
            for(Iterator<WebServiceHandler> h = thisHc.getHandlers().iterator();
                                    h.hasNext();) {
                WebServiceHandler thisHandler = h.next();
                try {
                    Class handlerClass = Class.forName(thisHandler.getHandlerClass(),
                                            true, loader);
                    invokeServiceMethod(javax.annotation.PreDestroy.class, handlerClass,
                            handlerClass.newInstance());
                } catch (Throwable ex) {
                    logger.log(Level.SEVERE, "Handler class " + thisHandler.getHandlerClass() +
                                    "not found during PreDestroy processing", ex);
                }
            }
        }       
    }
View Full Code Here

     * @param element the xml element
     * @param value it's associated value
     */
    public void setElementValue(XMLElement element, String value) {
        String qname = element.getQName();
        WebServiceHandler handler = (WebServiceHandler) getDescriptor();
        if (WebServicesTagNames.INIT_PARAM_NAME.equals(qname)) {
            initParam = new NameValuePairDescriptor();
            initParam.setName(value);
        } else if (WebServicesTagNames.INIT_PARAM_VALUE.equals(qname)) {
            initParam.setValue(value);
            handler.addInitParam(initParam);
        } else if (TagNames.DESCRIPTION.equals(qname)) {
            if( initParam != null ) {
                // description for the init-param
                initParam.setDescription(value);
                initParam = null;
            } else {
                // must be the description element of the handler itself.
                super.setElementValue(element, value);
            }
        } else if (WebServicesTagNames.SOAP_HEADER.equals(qname) ) {
            String prefix = getPrefixFromQName(value);
            String localPart = getLocalPartFromQName(value);
            String namespaceUri = resolvePrefix(element, prefix);

            if( namespaceUri == null) {
                DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
                    new Object[] {prefix , handler.getHandlerName()});
            } else {
                QName soapHeader = new QName(namespaceUri, localPart);
                handler.addSoapHeader(soapHeader);
            }

        } else super.setElementValue(element, value);
    }
View Full Code Here

        return wshNode;
    }   

    public void writeWebServiceHandlers(Node parent, List handlerChain) {
        for(Iterator iter = handlerChain.iterator(); iter.hasNext();) {
            WebServiceHandler next = (WebServiceHandler) iter.next();
            writeDescriptor(parent, WebServicesTagNames.HANDLER, next);
        }
    }
View Full Code Here

            // 109 and JAXRPC.  JAXRPC only defines roles at the handler chain
            // level, whereas 109 descriptors put roles at the handler level.
            Collection soapRoles = new HashSet();           

            for(Iterator hIter = handlerChain.iterator(); hIter.hasNext();) {
                WebServiceHandler nextHandler =
                    (WebServiceHandler) hIter.next();
                HandlerInfo handlerInfo = createHandlerInfo(nextHandler);
                handlerInfoList.add(handlerInfo);
                soapRoles.addAll(nextHandler.getSoapRoles());
            }

            // Insert a container handler as the last element in the chain.
            HandlerInfo postHandler = rpcFactory.createHandlerInfo();
            handlerClassName = nextEndpoint.implementedByEjbComponent() ?
View Full Code Here

        table.put(WebServicesTagNames.HANDLER_PORT_NAME, "addPortName");
        return table;
    }

    protected WebServiceHandler createDescriptor() {
       return new WebServiceHandler();
   }
View Full Code Here

     * @param element the xml element
     * @param value it's associated value
     */
    public void setElementValue(XMLElement element, String value) {
        String qname = element.getQName();
        WebServiceHandler handler = (WebServiceHandler) getDescriptor();
        if (WebServicesTagNames.INIT_PARAM_NAME.equals(qname)) {
            initParam = new NameValuePairDescriptor();
            initParam.setName(value);
        } else if (WebServicesTagNames.INIT_PARAM_VALUE.equals(qname)) {
            initParam.setValue(value);
            handler.addInitParam(initParam);
        } else if (TagNames.DESCRIPTION.equals(qname)) {
            if( initParam != null ) {
                // description for the init-param
                initParam.setDescription(value);
                initParam = null;
            } else {
                // must be the description element of the handler itself.
                super.setElementValue(element, value);
            }
        } else if (WebServicesTagNames.SOAP_HEADER.equals(qname) ) {
            String prefix = getPrefixFromQName(value);
            String localPart = getLocalPartFromQName(value);
            String namespaceUri = resolvePrefix(element, prefix);

            if( namespaceUri == null) {
                DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.invalidDescriptorMappingFailure",
                    new Object[] {prefix , handler.getHandlerName()});
            } else {
                QName soapHeader = new QName(namespaceUri, localPart);
                handler.addSoapHeader(soapHeader);
            }

        } else super.setElementValue(element, value);
    }
View Full Code Here

        return wshNode;
    }   

    public void writeWebServiceHandlers(Node parent, List handlerChain) {
        for(Iterator iter = handlerChain.iterator(); iter.hasNext();) {
            WebServiceHandler next = (WebServiceHandler) iter.next();
            writeDescriptor(parent, WebServicesTagNames.HANDLER, next);
        }
    }
View Full Code Here

        table.put(WebServicesTagNames.HANDLER_PORT_NAME, "addPortName");
        return table;
    }

    protected WebServiceHandler createDescriptor() {
       return new WebServiceHandler();
   }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.WebServiceHandler

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.