Examples of HandlerInfoChainFactory


Examples of org.apache.axis.handlers.HandlerInfoChainFactory

        return ss;
    }

    protected HandlerInfoChainFactory getJaxRPCHandlerChainFactory(
            BeehiveWsTypeMetadata wsm) throws ClassNotFoundException {
        HandlerInfoChainFactory res = null;
        List< ? extends BeehiveWsSOAPMessageHandlerInfo> handlers = wsm
                .getSoapHandlers();
        if (handlers.size() > 0) { // there are handlers to install
            ArrayList<HandlerInfo> infoList = new ArrayList<HandlerInfo>();
            HashSet<String> roles = new HashSet<String>();

            for (BeehiveWsSOAPMessageHandlerInfo handler : handlers) {
                Class handlerClass = ClassUtils.forName(handler.getClassName());
                QName[] handlerHeaders = handler.getHeaders().toArray(
                        new QName[0]);
                infoList.add(new HandlerInfo(handlerClass, (Map) handler
                        .getParameterMap(), handlerHeaders));
                roles.addAll(handler.getRoles());
            }
            res = new HandlerInfoChainFactory(infoList);
            String[] roleArray = roles.toArray(new String[0]);
            res.setRoles(roleArray);
        }
        return res;
    }
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

        this.serviceImpl = serviceImpl;
        final Class serviceEndpointBaseClass = classLoader.loadClass(serviceEndpointClassName);
        serviceEndpointClass = enhanceServiceEndpointInterface(serviceEndpointBaseClass, classLoader);
        final Class[] constructorTypes = new Class[]{classLoader.loadClass(GenericServiceEndpoint.class.getName())};
        this.constructor = FastClass.create(serviceEndpointClass).getConstructor(constructorTypes);
        this.handlerInfoChainFactory = new HandlerInfoChainFactory(handlerInfos);
        sortedOperationInfos = new OperationInfo[FastClass.create(serviceEndpointClass).getMaxIndex() + 1];
        String encodingStyle = "";
        for (int i = 0; i < operationInfos.length; i++) {
            final OperationInfo operationInfo = operationInfos[i];
            final Signature signature = operationInfo.getSignature();
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

        }
    }

    protected void invokeJAXRPCHandlers(MessageContext context){
        java.util.List chain = null;
        HandlerInfoChainFactory hiChainFactory = null;
        boolean clientSpecified = false;

        Service service
                = (Service)context.getProperty(Call.WSDL_SERVICE);
        if(service == null) {
            return;
        }

        QName portName = (QName) context.getProperty(Call.WSDL_PORT_NAME);
        if(portName == null) {
            return;
        }

        javax.xml.rpc.handler.HandlerRegistry registry;
        registry = service.getHandlerRegistry();
        if(registry != null) {
            chain = registry.getHandlerChain(portName);
            if ((chain != null) && (!chain.isEmpty())) {
                hiChainFactory = new HandlerInfoChainFactory(chain);
                clientSpecified = true;
            }
        }

        // Otherwise, use the container support
        if (!clientSpecified) {
            SOAPService soapService = context.getService();
            if (soapService != null) {
                // A client configuration exists for this service.  Check
                // to see if there is a HandlerInfoChain configured on it.
                hiChainFactory = (HandlerInfoChainFactory)
                        soapService.getOption(Constants.ATTR_HANDLERINFOCHAIN);
            }
        }

        if (hiChainFactory == null) {
            return;
        }

        HandlerChainImpl impl =
                (HandlerChainImpl) hiChainFactory.createHandlerChain();

        if(!context.getPastPivot()) {
            impl.handleRequest(context);
        }
        else {
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

                        new HandlerInfo(handlerClass, handlerMap, headers);
                    infoList.add(hi);
                }
            }
        }
        _hiChainFactory = new HandlerInfoChainFactory(infoList);
       
        elements = getChildElements(e,  ELEM_WSDD_JAXRPC_ROLE);
        if (elements.length != 0) {
            ArrayList roleList = new ArrayList();
            for (int i = 0; i < elements.length; i++) {
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

            service.setOption(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
        }

  // Set handlerInfoChain
  if (_wsddHIchain != null) {
            HandlerInfoChainFactory hiChainFactory = _wsddHIchain.getHandlerChainFactory();

      service.setOption(Constants.ATTR_HANDLERINFOCHAIN, hiChainFactory);
  }

        AxisEngine.normaliseOptions(service);
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

    public void setSendType(int sendType) {
        this.sendType = sendType;
    }

    public void invoke(MessageContext msgContext) throws AxisFault {
        HandlerInfoChainFactory handlerFactory = (HandlerInfoChainFactory) this.getOption(Constants.ATTR_HANDLERINFOCHAIN);
        HandlerChainImpl handlerImpl = null;
        if (handlerFactory != null) handlerImpl = (HandlerChainImpl) handlerFactory.createHandlerChain();
        boolean result = true;
       
        try {
            if (handlerImpl != null) {
                result = handlerImpl.handleRequest(msgContext);
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

    public void setSendType(int sendType) {
        this.sendType = sendType;
    }

  public void invoke(MessageContext msgContext) throws AxisFault {
    HandlerInfoChainFactory handlerFactory = (HandlerInfoChainFactory) this.getOption(Constants.ATTR_HANDLERINFOCHAIN);
    HandlerChainImpl handlerImpl = null;
    if (handlerFactory != null) handlerImpl = (HandlerChainImpl) handlerFactory.createHandlerChain();
    if (handlerImpl != null) handlerImpl.handleRequest(msgContext);

    super.invoke(msgContext);

    if ( handlerImpl != null) {
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

        this.serviceImpl = serviceImpl;
        Class serviceEndpointBaseClass = classLoader.loadClass(serviceEndpointClassName);
        serviceEndpointClass = enhanceServiceEndpointInterface(serviceEndpointBaseClass, classLoader);
        Class[] constructorTypes = new Class[]{classLoader.loadClass(GenericServiceEndpoint.class.getName())};
        this.constructor = FastClass.create(serviceEndpointClass).getConstructor(constructorTypes);
        this.handlerInfoChainFactory = new HandlerInfoChainFactory(handlerInfos);
        sortedOperationInfos = new OperationInfo[FastClass.create(serviceEndpointClass).getMaxIndex() + 1];
        String encodingStyle = "";
        for (int i = 0; i < operationInfos.length; i++) {
            OperationInfo operationInfo = operationInfos[i];
            Signature signature = operationInfo.getSignature();
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

        SOAPService service = new SOAPService(null, provider, null);
        service.setServiceDescription(serviceDesc);
        service.setOption("className", seiClassName);

        HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(serviceInfo.getHandlerInfos());
        service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);

        URI location;
        try {
            location = new URI(serviceDesc.getEndpointURL());
View Full Code Here

Examples of org.apache.axis.handlers.HandlerInfoChainFactory

            service.setOption(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
        }

        // Set handlerInfoChain
        if (_wsddHIchain != null) {
            HandlerInfoChainFactory hiChainFactory = _wsddHIchain.getHandlerChainFactory();

            service.setOption(Constants.ATTR_HANDLERINFOCHAIN, hiChainFactory);
        }

        AxisEngine.normaliseOptions(service);
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.