Package javax.xml.rpc.handler

Examples of javax.xml.rpc.handler.HandlerInfo


        }
    }

    public void addNewHandler(String className, Map config) {
        try {
            HandlerInfo handlerInfo = new HandlerInfo(ClassUtils.forName(className),
                    config,
                    null);
            handlerInfos.add(handlerInfo);
            add(newHandler(handlerInfo));
        } catch (Exception ex) {
View Full Code Here


    if (runJAXRPCHandler) {
      HandlerRegistry hr = service.getHandlerRegistry();
      java.util.List lhi = new java.util.Vector();
      test.wsdl.jaxrpchandler.ClientHandler mh = new test.wsdl.jaxrpchandler.ClientHandler();
      Class myhandler = mh.getClass();
      HandlerInfo hi = new HandlerInfo(myhandler,null,null);
      lhi.add(hi);
      hr.setHandlerChain(new QName("","jaxrpchandler"),lhi);
    }

    float res;
View Full Code Here

            add(newHandler(getHandlerInfo(i)));
    }

    public void addNewHandler(String className, Map config) {
        try {
            HandlerInfo handlerInfo = new HandlerInfo(ClassUtils.forName(className),
                                                      config,
                                                      null);
            handlerInfos.add(handlerInfo);
            add(newHandler(handlerInfo));
        } catch (Exception ex) {
View Full Code Here

            for (int j = 0; j < soapHeaderQNames.length; j++) {
                XsdQNameType soapHeaderQName = soapHeaderQNames[j];
                headers[j] = soapHeaderQName.getQNameValue();
            }

            list.add(new HandlerInfo(handlerClass, config, headers));
        }
        return list;
    }
View Full Code Here

        List handlerInfos = new ArrayList();
        for (Iterator iterator = handlerInfoInfos.iterator(); iterator.hasNext();) {
            HandlerInfoInfo handlerInfoInfo = (HandlerInfoInfo) iterator.next();
            Set portNames = handlerInfoInfo.getPortNames();
            if (portNames.isEmpty() || portNames.contains(portName)) {
                HandlerInfo handlerInfo = new HandlerInfo(handlerInfoInfo.getHandlerClass(), handlerInfoInfo.getHandlerConfig(), handlerInfoInfo.getSoapHeaders());
                handlerInfos.add(handlerInfo);

                //TODO what about the soap roles??
            }
        }
View Full Code Here

            add(newHandler(getHandlerInfo(i)));
    }

    public void addNewHandler(String className) {
        try {
            HandlerInfo handlerInfo = new HandlerInfo(ClassUtils.forName(className), null, null);
            handlerInfos.add(handlerInfo);
            add(newHandler(handlerInfo));
        } catch (Exception ex) {
            String messageText = JavaUtils.getMessage("NoJAXRPCHandler00", className);
            throw new JAXRPCException(messageText, ex);
View Full Code Here

         QName[] headerArr = new QName[headers.size()];
         headers.toArray(headerArr);

         Class hClass = jaxrpcMetaData.getHandlerClass();
         hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
         HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);

         if (log.isDebugEnabled())
            log.debug("Adding server side handler to service '" + sepMetaData.getPortName() + "': " + info);
         hInfos.add(info);
      }
View Full Code Here

            QName[] headerArr = new QName[headers.size()];
            headers.toArray(headerArr);

            Class hClass = jaxrpcMetaData.getHandlerClass();
            hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
            HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);

            log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
            handlerInfos.add(info);
         }
View Full Code Here

        List handlerInfos = new ArrayList();
        for (Iterator iterator = handlerInfoInfos.iterator(); iterator.hasNext();) {
            HandlerInfoInfo handlerInfoInfo = (HandlerInfoInfo) iterator.next();
            Set portNames = handlerInfoInfo.getPortNames();
            if (portNames.isEmpty() || portNames.contains(portName)) {
                HandlerInfo handlerInfo = new HandlerInfo(handlerInfoInfo.getHandlerClass(), handlerInfoInfo.getHandlerConfig(), handlerInfoInfo.getSoapHeaders());
                handlerInfos.add(handlerInfo);

                //TODO what about the soap roles??
            }
        }
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);
                    handlerInfo.setHeaders(headers.toArray(new QName[headers.size()]));
                    handlerInfo.setHandlerConfig(config);

                    if (!portNames.isEmpty()) {
                        Iterator<String> iter = portNames.iterator();
                        while (iter.hasNext())
                            initHandlerChain(new QName(iter.next()), handlerRegistry,
View Full Code Here

TOP

Related Classes of javax.xml.rpc.handler.HandlerInfo

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.