Allow features that implement CXF's feature interface

Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/40c24494
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40c24494
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40c24494

Branch: refs/heads/3.0.x-fixes
Commit: 40c2449428409e01188948206fdf7a1a78ce63a1
Parents: 0ec1534
Author: Daniel Kulp <[email protected]>
Authored: Wed Apr 8 09:56:14 2015 -0400
Committer: Daniel Kulp <[email protected]>
Committed: Mon Apr 13 15:28:52 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/40c24494/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
index 01cdfb9..bc890fa 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
@@ -51,6 +51,7 @@ import org.apache.cxf.BusFactory;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.feature.Feature;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.jaxws.EndpointUtils;
@@ -104,7 +105,8 @@ public class ProviderImpl extends javax.xml.ws.spi.Provider 
{
                                                  @SuppressWarnings("rawtypes") 
Class serviceClass,
                                                  WebServiceFeature ... 
features) {
         for (WebServiceFeature f : features) {
-            if (!f.getClass().getName().startsWith("javax.xml.ws")) {
+            if (!f.getClass().getName().startsWith("javax.xml.ws")
+                && !(f instanceof Feature)) {
                 throw new WebServiceException("Unknown feature error: " + 
f.getClass().getName());
             }
         }

Reply via email to