Author: jim.ma
Date: 2010-03-28 08:55:20 -0400 (Sun, 28 Mar 2010)
New Revision: 11876
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
Log:
[JBWS-2976]:throw WebserviceException when add incompatiable handler
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28
10:26:00 UTC (rev 11875)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28
12:55:20 UTC (rev 11876)
@@ -26,7 +26,9 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.LogicalHandler;
import javax.xml.ws.http.HTTPBinding;
import org.jboss.logging.Logger;
@@ -139,6 +141,13 @@
public void setHandlerChain(List<Handler> handlerChain)
{
+ for (Handler handler : handlerChain)
+ {
+ if (!(handler instanceof LogicalHandler))
+ {
+ throw new WebServiceException("The adding handler in HTTPBinding is
incompatiable " + handler.getClass());
+ }
+ }
delegate.setHandlerChain(handlerChain);
}
Show replies by date