Examples of HandlerType


Examples of com.iisigroup.cap.annotation.HandlerType

  protected String getOperationName(IRequest params) {
    String methodId = params.get(FORM_ACTION);
    Method method = CapCommonUtil.findMethod(this.getClass(), methodId,
        (Class<?>) null);
    if (method != null) {
      HandlerType type = method.getAnnotation(HandlerType.class);
      if (type != null) {
        String op = type.name();
        if (op == null || "".equals(op)) {
          op = type.value().name();
        }
        return handlerOp.getValue(op, SIMPLE_OPERATION);
      }
    }
    return SIMPLE_OPERATION;
View Full Code Here

Examples of com.iisigroup.cap.annotation.HandlerType

      boolean hasMethod = false;
      try {
        Method method = CapCommonUtil.findMethod(
            executeHandler.getClass(), methodId, (Class<?>) null);
        if (method != null) {
          HandlerType type = method.getAnnotation(HandlerType.class);
          if (type != null
              && HandlerTypeEnum.GRID.equals(type.value())) {
            rtn = getGridData(method, params);
          } else {
            rtn = (IResult) method.invoke(executeHandler, params);
          }
          hasMethod = true;
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 = null;
                   
                //  instantiate portHandler class
                try {
                    handler = createHandlerInstance(loadClass(portHandler));
View Full Code Here

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

            HandlerChainType handlerChain = new HandlerChainType();
            handlerChain.setPortNamePattern(handlerChainInfo.portNamePattern);
            handlerChain.setServiceNamePattern(handlerChainInfo.serviceNamePattern);
            handlerChain.getProtocolBindings().addAll(handlerChainInfo.protocolBindings);
            for (HandlerInfo handlerInfo : handlerChainInfo.handlers) {
                HandlerType handler = new HandlerType();
                FullyQualifiedClassType classType = new FullyQualifiedClassType();
                classType.setValue(handlerInfo.handlerClass);
                handler.setHandlerClass(classType);
                org.apache.axis2.jaxws.description.xml.handler.String nameType = new org.apache.axis2.jaxws.description.xml.handler.String();
                nameType.setValue(handlerInfo.handlerName);
                handler.setHandlerName(nameType);
                handlerChain.getHandler().add(handler);
            }
            handlerChains.getHandlerChain().add(handlerChain);
        }
        return handlerChains;
View Full Code Here

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

            HandlerChainType handlerChain = new HandlerChainType();
            handlerChain.setPortNamePattern(handlerChainInfo.portNamePattern);
            handlerChain.setServiceNamePattern(handlerChainInfo.serviceNamePattern);
            handlerChain.getProtocolBindings().addAll(handlerChainInfo.protocolBindings);
            for (HandlerInfo handlerInfo : handlerChainInfo.handlers) {
                HandlerType handler = new HandlerType();
                FullyQualifiedClassType classType = new FullyQualifiedClassType();
                classType.setValue(handlerInfo.handlerClass);
                handler.setHandlerClass(classType);
                org.apache.axis2.jaxws.description.xml.handler.String nameType = new org.apache.axis2.jaxws.description.xml.handler.String();
                nameType.setValue(handlerInfo.handlerName);
                handler.setHandlerName(nameType);
                handlerChain.getHandler().add(handler);
            }
            handlerChains.getHandlerChain().add(handlerChain);
        }
        return handlerChains;
View Full Code Here

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

        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

           
            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;
                // Create temporary MessageContext to pass information to HandlerLifecycleManager
                MessageContext ctx = new MessageContext();
                ctx.setEndpointDescription(ed);
               
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.