Author: jim.ma
Date: 2010-03-28 09:50:52 -0400 (Sun, 28 Mar 2010)
New Revision: 11878
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
Log:
[JBWS-2976]:throw WebserviceException when add the incompatiable handler
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28
12:58:09 UTC (rev 11877)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2010-03-28
13:50:52 UTC (rev 11878)
@@ -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;
@@ -141,6 +143,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