Examples of HandlerType


Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerType

                continue;
           
            List<HandlerType> handlerTypeList = handlerChainType.getHandler();
            Iterator ht = handlerTypeList.iterator();
            while (ht.hasNext()) {
                HandlerType handlerType = (HandlerType) ht.next();
                // TODO must do better job comparing the handlerType with the PortInfo param
                // to see if the current iterator handler is intended for this service.
                // TODO review: need to check for null getHandlerClass() return?
                // or will schema not allow it?
                String portHandler = handlerType.getHandlerClass().getValue();
                Class aClass;
                try {
                    aClass = loadClass(portHandler);
                } catch (Exception e) {
                    // TODO: should we just ignore this problem?
                    throw ExceptionFactory.makeWebServiceException(e);
                }

                // 9.2.1.2 sort them by Logical, then SOAP
                if (LogicalHandler.class.isAssignableFrom(aClass))
                    handlers.add(aClass);
                else if (SOAPHandler.class.isAssignableFrom(aClass))
                    // instanceof ProtocolHandler
                    handlers.add(aClass);
                else if (Handler.class.isAssignableFrom(aClass)) {
                    throw ExceptionFactory.makeWebServiceException(Messages
                            .getMessage("handlerChainErr1", aClass.getName()));
                } else {
                    throw ExceptionFactory.makeWebServiceException(Messages
                            .getMessage("handlerChainErr2", aClass.getName()));
                }
                // If a role was specified, add it to the roles played
                if (handlerRoles != null) {
                    List<org.apache.axis2.jaxws.description.xml.handler.String> soapRolesList =
                        handlerType.getSoapRole();
                    Iterator<org.apache.axis2.jaxws.description.xml.handler.String>
                        soapRolesIterator = soapRolesList.iterator();
                    while (soapRolesIterator.hasNext()) {
                        org.apache.axis2.jaxws.description.xml.handler.String soapRoleElement =
                            soapRolesIterator.next();
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerType

    }
   
    private HandlerType processHandlerElement(Element el) throws Exception {     
        JAXBContext ctx = getContextForHandlerType();
        Unmarshaller unmarshaller = ctx.createUnmarshaller();
        HandlerType handler = unmarshaller.unmarshal(el, HandlerType.class).getValue();
        return handler;
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerType

        assertNotNull(epHandlerChains);
        List<HandlerChainType> epHandlerChain = epHandlerChains.getHandlerChain();
        assertEquals(1, epHandlerChain.size());
        List<HandlerType> epHandler = epHandlerChain.get(0).getHandler();
        assertEquals(1, epHandler.size());
        HandlerType handlerType = epHandler.get(0);
        List<org.apache.axis2.jaxws.description.xml.handler.String> soapRoles =
            handlerType.getSoapRole();
        assertNotNull(soapRoles);
        assertEquals(1, soapRoles.size());
        String addedRole = soapRoles.get(0).getValue();
        assertEquals(roleHandlerAdded, addedRole);
       
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerType

        assertNotNull(epHandlerChains);
        List<HandlerChainType> epHandlerChain = epHandlerChains.getHandlerChain();
        assertEquals(1, epHandlerChain.size());
        List<HandlerType> epHandler = epHandlerChain.get(0).getHandler();
        assertEquals(1, epHandler.size());
        HandlerType handlerType = epHandler.get(0);
        List<org.apache.axis2.jaxws.description.xml.handler.String> soapRoles =
            handlerType.getSoapRole();
        assertNotNull(soapRoles);
        assertEquals(2, soapRoles.size());
        ArrayList<String> checkRoles = new ArrayList<String>();
        checkRoles.add(soapRoles.get(0).getValue());
        checkRoles.add(soapRoles.get(1).getValue());
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerType

    }
   
    private HandlerType processHandlerElement(Element el) throws Exception {     
        JAXBContext ctx = getContextForHandlerType();
        Unmarshaller unmarshaller = ctx.createUnmarshaller();
        HandlerType handler = unmarshaller.unmarshal(el, HandlerType.class).getValue();
        return handler;
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerType

           
            List<HandlerType> handlerTypeList = handlerChainType.getHandler();
            Iterator ht = handlerTypeList.iterator();
            while (ht.hasNext()) {
               
                HandlerType handlerType = (HandlerType)ht.next();
               
                // TODO must do better job comparing the handlerType with the PortInfo param
                // to see if the current iterator handler is intended for this service.

                // TODO review: need to check for null getHandlerClass() return?
                // or will schema not allow it?
                String portHandler = handlerType.getHandlerClass().getValue();
                Handler handler;
                // instantiate portHandler class
                try {
                    // TODO: review: ok to use system classloader?
                    handler = (Handler) loadClass(portHandler).newInstance();
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee6.HandlerType

            }
            if (handlerChain.getProtocolBindings() != null) {
                serviceRefHandlerChain.setProtocolBindings(handlerChain.getProtocolBindings());
            }
            for (PortComponentHandlerType srcHandler : handlerChain.getHandlerArray()) {
                HandlerType serviceRefHandler = serviceRefHandlerChain.addNewHandler();
                serviceRefHandler.setId(srcHandler.getId());
                //Copy HandlerName
                org.apache.geronimo.xbeans.javaee.String srcHandlerName = srcHandler.getHandlerName();
                org.apache.geronimo.xbeans.javaee6.String desHandlerName = serviceRefHandler.addNewHandlerName();
                desHandlerName.setStringValue(srcHandlerName.getStringValue());
                desHandlerName.setId(srcHandlerName.getId());
                //Copy HandlerClass
                org.apache.geronimo.xbeans.javaee.String srcHandlerClass = srcHandler.getHandlerClass();
                org.apache.geronimo.xbeans.javaee6.String desHandlerClass = serviceRefHandler.addNewHandlerClass();
                desHandlerClass.setId(srcHandlerClass.getId());
                desHandlerClass.setStringValue(srcHandlerClass.getStringValue());
                //Copy DescriptionArray
                for (org.apache.geronimo.xbeans.javaee.DescriptionType srcDescription : srcHandler.getDescriptionArray()) {
                    DescriptionType desDescription = serviceRefHandler.addNewDescription();
                    desDescription.setStringValue(srcDescription.getStringValue());
                    desDescription.setId(srcDescription.getId());
                }
                //Copy InitParamArray
                for (org.apache.geronimo.xbeans.javaee.ParamValueType srcParamValue : srcHandler.getInitParamArray()) {
                    ParamValueType desParamValue = serviceRefHandler.addNewInitParam();
                    srcParamValue.setId(desParamValue.getId());
                    desParamValue.addNewParamName().setStringValue(srcParamValue.getParamName().getStringValue());
                    desParamValue.addNewParamValue().setStringValue(srcParamValue.getParamValue().getStringValue());
                    for (org.apache.geronimo.xbeans.javaee.DescriptionType srcDescription : srcParamValue.getDescriptionArray()) {
                        DescriptionType desDescription = desParamValue.addNewDescription();
                        desDescription.setId(srcDescription.getId());
                        desDescription.setStringValue(srcDescription.getStringValue());
                    }
                }
                //Copy SoapHeaderArray
                for (org.apache.geronimo.xbeans.javaee.XsdQNameType srcSOAPHeader : srcHandler.getSoapHeaderArray()) {
                    XsdQNameType desSOAPHeader = serviceRefHandler.addNewSoapHeader();
                    desSOAPHeader.setId(srcSOAPHeader.getId());
                    desSOAPHeader.setQNameValue(srcSOAPHeader.getQNameValue());
                }
                //Copy SoapRoleArray
                for (org.apache.geronimo.xbeans.javaee.String srcSOAPRole : srcHandler.getSoapRoleArray()) {
                    org.apache.geronimo.xbeans.javaee6.String desSOAPRole = serviceRefHandler.addNewSoapRole();
                    desSOAPRole.setId(srcSOAPRole.getId());
                    desSOAPRole.setStringValue(srcSOAPRole.getStringValue());
                }
            }
        }
View Full Code Here

Examples of org.apache.xml.security.configuration.HandlerType

    protected static synchronized void init(SecurityHeaderHandlersType securityHeaderHandlersType,
            Class<?> callingClass) throws Exception {
        List<HandlerType> handlerList = securityHeaderHandlersType.getHandler();
        handlerClassMap = new HashMap<QName, Class<?>>(handlerList.size() + 1);
        for (int i = 0; i < handlerList.size(); i++) {
            HandlerType handlerType = handlerList.get(i);
            QName qName = new QName(handlerType.getURI(), handlerType.getNAME());
            handlerClassMap.put(qName,
                    ClassLoaderUtils.loadClass(handlerType.getJAVACLASS(), callingClass));
        }
    }
View Full Code Here

Examples of org.apache.xml.security.configuration.HandlerType

    protected static synchronized void init(SecurityHeaderHandlersType securityHeaderHandlersType) throws Exception {
        List<HandlerType> handlerList = securityHeaderHandlersType.getHandler();
        handlerClassMap = new HashMap<QName, Class<?>>(handlerList.size() + 1);
        for (int i = 0; i < handlerList.size(); i++) {
            HandlerType handlerType = handlerList.get(i);
            QName qName = new QName(handlerType.getURI(), handlerType.getNAME());
            handlerClassMap.put(qName, XMLSecurityUtils.loadClass(handlerType.getJAVACLASS()));
        }
    }
View Full Code Here

Examples of org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType

         if (infos != null)
         {
            for (HandlerInfo info : infos)
            {
               HandlerWrapper handler = new HandlerWrapper((Handler)info.getHandlerClass().newInstance());
               HandlerType type = (HandlerType)info.getHandlerConfig().get(HandlerType.class.getName());
               handlers.add(new HandlerEntry(handler, info, type));
            }
         }
         if (roleSet != null)
         {
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.