Examples of HandlerInfo


Examples of javax.xml.rpc.handler.HandlerInfo

   
    public void invokeService (Map config, int interopNum) throws Exception {
        PingServiceLocator service = new PingServiceLocator();

        List handlerChain = new ArrayList();
        handlerChain.add(new HandlerInfo( WSS4JHandler.class, config, null));

        HandlerRegistry registry = service.getHandlerRegistry();
        registry.setHandlerChain(new QName("Ping" + interopNum), handlerChain);

        service.getHandlerRegistry().getHandlerChain(new QName("http://xmlsoap.org/Ping", "ticketType"));
View Full Code Here

Examples of javax.xml.rpc.handler.HandlerInfo

        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

Examples of javax.xml.rpc.handler.HandlerInfo

            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

Examples of javax.xml.rpc.handler.HandlerInfo

        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

Examples of javax.xml.rpc.handler.HandlerInfo

            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

Examples of javax.xml.rpc.handler.HandlerInfo

                WebServiceHandler nextHandler = (WebServiceHandler) iter.next();
                Collection portNames = nextHandler.getPortNames();
                if( portNames.isEmpty() ||
                    portNames.contains(nextPort.getLocalPart()) ) {
                    soapRoles.addAll(nextHandler.getSoapRoles());
                    HandlerInfo handlerInfo =
                        createHandlerInfo(nextHandler, loader);
                    handlerChain.add(handlerInfo);
                }
            }
        }
View Full Code Here

Examples of javax.xml.rpc.handler.HandlerInfo

  return returnValue;
    }

    public HandlerInfo getMessageSecurityHandlerInfo(QName port) throws Exception
    {
  HandlerInfo rvalue = null;

  MessageSecurityBindingDescriptor binding = null;
  ServiceRefPortInfo portInfo = serviceRef.getPortInfoByPort(port);
  if (portInfo != null) {
      binding = portInfo.getMessageSecurityBinding();
  }

  ClientAuthConfig config = ClientAuthConfig.getConfig
      (com.sun.enterprise.security.jauth.AuthConfig.SOAP,
       binding, null);

  if (config != null) {

      // get understood headers from auth module.
      QName[] headers = config.getMechanisms();
     
      Map properties = new HashMap();
      properties.put(MessageLayerClientHandler.CLIENT_AUTH_CONFIG, config);
            properties.put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE,
                serviceRef.getServiceName());

      rvalue = new HandlerInfo(MessageLayerClientHandler.class,
             properties, headers);
  }

  return rvalue;
    }
View Full Code Here

Examples of javax.xml.rpc.handler.HandlerInfo

      // append security handler to the end of every handler chain
      // ASSUMPTION 1: that registry.getHandlerChain() never returns null.
      // ASSUMPTION 2: that handlers from ServiceRef have already been added

      HandlerInfo handlerInfo = getMessageSecurityHandlerInfo(nextPort);

      if (handlerInfo != null) {
    handlerChain.add(handlerInfo);
      }
        }
View Full Code Here

Examples of javax.xml.rpc.handler.HandlerInfo

        }
    }

    public HandlerInfo getMessageSecurityHandler(MessageSecurityBindingDescriptor binding, QName serviceName) {
        HandlerInfo rvalue = null;
        try {
            ClientAuthConfig config = ClientAuthConfig.getConfig(com.sun.enterprise.security.jauth.AuthConfig.SOAP, binding, null);
            if (config != null) {
                // get understood headers from auth module.
                QName[] headers = config.getMechanisms();
                Map properties = new HashMap();
                properties.put(MessageLayerClientHandler.CLIENT_AUTH_CONFIG, config);
                properties.put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, serviceName);
                rvalue = new HandlerInfo(MessageLayerClientHandler.class, properties, headers);
            }

        } catch (Exception ex) {
            _logger.log(Level.SEVERE, LogUtils.EXCEPTION_THROWN, ex);
            throw new RuntimeException(ex);
View Full Code Here

Examples of javax.xml.rpc.handler.HandlerInfo

        return returnValue;
    }

    public HandlerInfo getMessageSecurityHandlerInfo(QName port) throws Exception
    {
        HandlerInfo rvalue = null;

        MessageSecurityBindingDescriptor binding = null;
        ServiceRefPortInfo portInfo = serviceRef.getPortInfoByPort(port);
        if (portInfo != null) {
            binding = portInfo.getMessageSecurityBinding();
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.