tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: TOMEE-1443 cxf.jaxws.wsFeatures
Date Tue, 11 Nov 2014 10:05:22 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x bf365a947 -> c187bf686


TOMEE-1443 cxf.jaxws.wsFeatures


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

Branch: refs/heads/tomee-1.7.x
Commit: c187bf686865fc92391c43df35887ea6cd106959
Parents: bf365a9
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Tue Nov 11 11:05:13 2014 +0100
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Tue Nov 11 11:05:13 2014 +0100

----------------------------------------------------------------------
 .../org/apache/openejb/server/cxf/CxfEndpoint.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/c187bf68/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfEndpoint.java
----------------------------------------------------------------------
diff --git a/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfEndpoint.java
b/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfEndpoint.java
index b7bd7a5..21e953d 100644
--- a/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfEndpoint.java
+++ b/server/openejb-cxf/src/main/java/org/apache/openejb/server/cxf/CxfEndpoint.java
@@ -41,9 +41,11 @@ import org.apache.openejb.server.cxf.transport.util.CxfUtil;
 import javax.naming.Context;
 import javax.xml.transform.Source;
 import javax.xml.ws.Binding;
+import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.handler.Handler;
 import javax.xml.ws.http.HTTPBinding;
 import javax.xml.ws.soap.SOAPBinding;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
@@ -294,6 +296,21 @@ public abstract class CxfEndpoint {
             serviceFactory.setDataBinding((DataBinding) instance);
         }
 
+        final String wsFeatures = beanConfig.getProperty(prefix + "wsFeatures");
+        if (wsFeatures != null) {
+            final Collection<Object> instances = ServiceInfos.resolve(availableServices,
wsFeatures.split(" *, *"));
+            if (instances != null && !instances.isEmpty()) {
+                final List<WebServiceFeature> features = new ArrayList<WebServiceFeature>(instances.size());
+                for (final Object i : instances) {
+                    if (!WebServiceFeature.class.isInstance(i)) {
+                        throw new IllegalArgumentException("Not a WebServiceFeature: " +
i);
+                    }
+                    features.add(WebServiceFeature.class.cast(i));
+                }
+                serviceFactory.setWsFeatures(features);
+            }
+        }
+
         return serviceFactory;
     }
 }


Mime
View raw message