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;
}
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);
}
Aggregations