From 80f46ba4bc17a2f12f2cf8b6d6d2b66671c23298 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 8 Jul 2010 22:22:34 +0000 Subject: [PATCH] Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48297 Use the HandlerInfo to initialise the HandlerChain, rather than adding to it which clearly isn't correct. From looking at the javadoc, I believe this is the fix required but I don't have a test case. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@961963 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/naming/factory/webservices/ServiceRefFactory.java | 7 ++++++- webapps/docs/changelog.xml | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/java/org/apache/naming/factory/webservices/ServiceRefFactory.java b/java/org/apache/naming/factory/webservices/ServiceRefFactory.java index e28cb1e29..526c1049c 100644 --- a/java/org/apache/naming/factory/webservices/ServiceRefFactory.java +++ b/java/org/apache/naming/factory/webservices/ServiceRefFactory.java @@ -45,6 +45,7 @@ import javax.wsdl.factory.WSDLFactory; import javax.wsdl.xml.WSDLReader; import javax.xml.namespace.QName; +import javax.xml.rpc.handler.Handler; import javax.xml.rpc.handler.HandlerChain; import javax.xml.rpc.handler.HandlerInfo; import javax.xml.rpc.handler.HandlerRegistry; @@ -355,7 +356,11 @@ public class ServiceRefFactory private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry, HandlerInfo handlerInfo, ArrayList soaprolesToAdd) { HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName); - handlerChain.add(handlerInfo); + Iterator 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; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 120317370..944305665 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -56,6 +56,10 @@ Add entryPoint support to the CSRF prevention filter. (markt) + 48297: Correctly initialise handler chain for web services + resources. (markt) + + 49030: When initializing/starting/stopping connectors and one of them fails, do not ignore the others. (markt/kkolinko) -- 2.11.0