cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r608261 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
Date Wed, 02 Jan 2008 22:24:03 GMT
Author: dkulp
Date: Wed Jan  2 14:24:02 2008
New Revision: 608261

URL: http://svn.apache.org/viewvc?rev=608261&view=rev
Log:
Merged revisions 606832 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r606832 | mmao | 2007-12-25 21:54:15 -0500 (Tue, 25 Dec 2007) | 4 lines
  
  CXF-1336
    throw a WebServiceException when adding an incompatible handler in HttpBinding
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java?rev=608261&r1=608260&r2=608261&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/binding/http/HTTPBindingImpl.java
Wed Jan  2 14:24:02 2008
@@ -19,6 +19,11 @@
 
 package org.apache.cxf.jaxws.binding.http;
 
+import java.util.List;
+
+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.apache.cxf.jaxws.binding.AbstractBindingImpl;
@@ -33,5 +38,19 @@
         //REVISIT: JIRA CXF-613
         return "http://cxf.apache.org/bindings/xformat";
     }
+    
+    @Override
+    public void setHandlerChain(List<Handler> hc) {
+        super.setHandlerChain(hc);
+        validate();
+    }
 
+    private void validate() {
+        for (Handler handler : this.getHandlerChain()) {
+            if (!(handler instanceof LogicalHandler)) {
+                throw new WebServiceException("Adding an incompatible handler in javax.xml.ws.http.HTTPBinding:
" 
+                        + handler.getClass());
+            }
+        }        
+    }    
 }



Mime
View raw message