Search in sources :

Example 1 with HandlerChain

use of javax.xml.rpc.handler.HandlerChain in project tomee by apache.

the class AxisClientImpl method getJAXRPChandlerChain.

protected HandlerChain getJAXRPChandlerChain(MessageContext context) {
    QName portQName = (QName) context.getProperty(Call.WSDL_PORT_NAME);
    if (portQName == null) {
        return null;
    }
    String portName = portQName.getLocalPart();
    SeiFactory seiFactory = (SeiFactory) portNameToSEIFactoryMap.get(portName);
    if (seiFactory == null) {
        return null;
    }
    HandlerChain handlerChain = seiFactory.createHandlerChain();
    return handlerChain;
}
Also used : HandlerChain(javax.xml.rpc.handler.HandlerChain) QName(javax.xml.namespace.QName)

Example 2 with HandlerChain

use of javax.xml.rpc.handler.HandlerChain in project tomcat by apache.

the class ServiceRefFactory method initHandlerChain.

private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry, HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String[] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0; i < soaprolesRegistered.length; i++) soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++) soaproles[i + j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
Also used : HandlerChain(javax.xml.rpc.handler.HandlerChain) Handler(javax.xml.rpc.handler.Handler)

Aggregations

HandlerChain (javax.xml.rpc.handler.HandlerChain)2 QName (javax.xml.namespace.QName)1 Handler (javax.xml.rpc.handler.Handler)1