Package org.apache.naming

Examples of org.apache.naming.HandlerRef


        // Adding the additional parameters, if any
        Iterator<String> handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = handlers.next();
            ContextHandler handler = service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator<String> localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = localParts.next();
                String namespaceURI = handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator<String> params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here


        // Adding the additional parameters, if any
        Iterator<String> handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = handlers.next();
            ContextHandler handler = service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator<String> localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = localParts.next();
                String namespaceURI = handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator<String> params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

        // Adding the additional parameters, if any
        Iterator handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = (String) handlers.next();
            ContextHandler handler = (ContextHandler) service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = (String) localParts.next();
                String namespaceURI = (String) handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = (String) params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

        // Adding the additional parameters, if any
        Iterator<String> handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = handlers.next();
            ContextHandler handler = service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator<String> localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = localParts.next();
                String namespaceURI = handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator<String> params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

        // Adding the additional parameters, if any
        Iterator handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = (String) handlers.next();
            ContextHandler handler = (ContextHandler) service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = (String) localParts.next();
                String namespaceURI = (String) handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = (String) params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

        // Adding the additional parameters, if any
        Iterator handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = (String) handlers.next();
            ContextHandler handler = (ContextHandler) service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = (String) localParts.next();
                String namespaceURI = (String) handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = (String) params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

                HandlerRegistry handlerRegistry = service.getHandlerRegistry();
                ArrayList<String> soaproles = new ArrayList<String>();

                while (((ServiceRef) ref).getHandlersSize() > 0) {
                    HandlerRef handlerRef = ((ServiceRef) ref).getHandler();
                    HandlerInfo handlerInfo = new HandlerInfo();

                    // Loading handler Class
                    tmp = handlerRef.get(HandlerRef.HANDLER_CLASS);
                    if ((tmp == null) || (tmp.getContent() == null))
                        break;
                    Class<?> handlerClass = null;
                    try {
                        handlerClass = tcl.loadClass((String) tmp.getContent());
                    } catch(ClassNotFoundException e) {
                        break;
                    }

                    // Load all datas relative to the handler : SOAPHeaders, config init element,
                    // portNames to be set on
                    ArrayList<QName> headers = new ArrayList<QName>();
                    Hashtable<String,String> config = new Hashtable<String,String>();
                    ArrayList<String> portNames = new ArrayList<String>();
                    for (int i = 0; i < handlerRef.size(); i++)
                        if (HandlerRef.HANDLER_LOCALPART.equals(handlerRef.get(i).getType())) {
                            String localpart = "";
                            String namespace = "";
                            localpart = (String) handlerRef.get(i).getContent();
                            if (HandlerRef.HANDLER_NAMESPACE.equals(handlerRef.get(i + 1).getType())) {
                                i++;
                                namespace = (String) handlerRef.get(i).getContent();
                            }
                            QName header = new QName(namespace, localpart);
                            headers.add(header);
                        } else if (HandlerRef.HANDLER_PARAMNAME.equals(handlerRef.get(i).getType())) {
                            String paramName = "";
                            String paramValue = "";
                            paramName = (String) handlerRef.get(i).getContent();
                            if (HandlerRef.HANDLER_PARAMVALUE.equals(handlerRef.get(i + 1).getType())) {
                                i++;
                                paramValue = (String) handlerRef.get(i).getContent();
                            }
                            config.put(paramName, paramValue);
                        } else if (HandlerRef.HANDLER_SOAPROLE.equals(handlerRef.get(i).getType())) {
                            String soaprole = "";
                            soaprole = (String) handlerRef.get(i).getContent();
                            soaproles.add(soaprole);
                        } else if (HandlerRef.HANDLER_PORTNAME.equals(handlerRef.get(i).getType())) {
                            String portName = "";
                            portName = (String) handlerRef.get(i).getContent();
                            portNames.add(portName);
                        }

                    // Set the handlers informations
                    handlerInfo.setHandlerClass(handlerClass);
View Full Code Here

        // Adding the additional parameters, if any
        Iterator<String> handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = handlers.next();
            ContextHandler handler = service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator<String> localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = localParts.next();
                String namespaceURI = handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator<String> params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

        // Adding the additional parameters, if any
        Iterator handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = (String) handlers.next();
            ContextHandler handler = (ContextHandler) service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = (String) localParts.next();
                String namespaceURI = (String) handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = (String) params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

        // Adding the additional parameters, if any
        Iterator handlers = service.getHandlers();
        while (handlers.hasNext()) {
            String handlername = (String) handlers.next();
            ContextHandler handler = (ContextHandler) service.getHandler(handlername);
            HandlerRef handlerRef = new HandlerRef(handlername, handler.getHandlerclass());
            Iterator localParts = handler.getLocalparts();
            while (localParts.hasNext()) {
                String localPart = (String) localParts.next();
                String namespaceURI = (String) handler.getNamespaceuri(localPart);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_LOCALPART, localPart));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_NAMESPACE, namespaceURI));
            }
            Iterator params = handler.listProperties();
            while (params.hasNext()) {
                String paramName = (String) params.next();
                String paramValue = (String) handler.getProperty(paramName);
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMNAME, paramName));
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PARAMVALUE, paramValue));
            }
            for (int i = 0; i < handler.getSoapRolesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_SOAPROLE, handler.getSoapRole(i)));
            }
            for (int i = 0; i < handler.getPortNamesSize(); i++) {
                handlerRef.add(new StringRefAddr(HandlerRef.HANDLER_PORTNAME, handler.getPortName(i)));
            }
            ((ServiceRef) ref).addHandler(handlerRef);
        }

        try {
View Full Code Here

TOP

Related Classes of org.apache.naming.HandlerRef

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.