You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/07/09 00:22:35 UTC
svn commit: r961963 - in /tomcat/trunk:
java/org/apache/naming/factory/webservices/ServiceRefFactory.java
webapps/docs/changelog.xml
Author: markt
Date: Thu Jul 8 22:22:34 2010
New Revision: 961963
URL: http://svn.apache.org/viewvc?rev=961963&view=rev
Log:
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.
Modified:
tomcat/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java?rev=961963&r1=961962&r2=961963&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java (original)
+++ tomcat/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java Thu Jul 8 22:22:34 2010
@@ -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<String> soaprolesToAdd) {
HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
- handlerChain.add(handlerInfo);
+ 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;
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=961963&r1=961962&r2=961963&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jul 8 22:22:34 2010
@@ -56,6 +56,10 @@
Add entryPoint support to the CSRF prevention filter. (markt)
</add>
<fix>
+ <bug>48297</bug>: Correctly initialise handler chain for web services
+ resources. (markt)
+ </fix>
+ <fix>
<bug>49030</bug>: When initializing/starting/stopping connectors and
one of them fails, do not ignore the others. (markt/kkolinko)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org