cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [1/2] cxf git commit: [CXF-7183] Adjust CXF namespace handlers to aries-blueprint-core 1.7.x
Date Thu, 15 Dec 2016 13:29:30 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 00e39a593 -> cd83ad9d1


[CXF-7183] Adjust CXF namespace handlers to aries-blueprint-core 1.7.x


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

Branch: refs/heads/3.0.x-fixes
Commit: df83183e5278887b2e74cf243667e357e128e9bd
Parents: 00e39a5
Author: Grzegorz Grzybek <gr.grzybek@gmail.com>
Authored: Thu Dec 15 09:33:15 2016 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Thu Dec 15 11:14:55 2016 +0100

----------------------------------------------------------------------
 .../cxf/helpers/BaseNamespaceHandler.java       | 42 ++++++++++++++++++++
 .../blueprint/ColocBPNamespaceHandler.java      |  7 +++-
 .../blueprint/ObjectBindingBPHandler.java       |  7 +++-
 .../soap/blueprint/SoapBindingBPHandler.java    | 10 +++--
 .../blueprint/ClusteringBPNamespaceHandler.java | 10 +++--
 .../blueprint/JAXRSBPNamespaceHandler.java      |  9 +++--
 .../blueprint/JAXWSBPNamespaceHandler.java      |  9 +++--
 .../blueprint/SimpleBPNamespaceHandler.java     |  9 +++--
 .../blueprint/JAXRSBPNamespaceHandler.java      |  8 +++-
 .../HTTPJettyTransportNamespaceHandler.java     |  6 +--
 .../HttpNettyTransportNamespaceHandler.java     |  6 +--
 .../transport/http/blueprint/HttpBPHandler.java |  6 +--
 .../ws/addressing/blueprint/WsBPHandler.java    |  7 +++-
 .../ws/policy/blueprint/PolicyBPHandler.java    |  7 ++--
 .../apache/cxf/ws/rm/blueprint/RMBPHandler.java |  7 ++--
 15 files changed, 115 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/core/src/main/java/org/apache/cxf/helpers/BaseNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/helpers/BaseNamespaceHandler.java b/core/src/main/java/org/apache/cxf/helpers/BaseNamespaceHandler.java
new file mode 100644
index 0000000..751adee
--- /dev/null
+++ b/core/src/main/java/org/apache/cxf/helpers/BaseNamespaceHandler.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.helpers;
+
+import java.net.URL;
+
+import org.apache.aries.blueprint.NamespaceHandler;
+import org.apache.cxf.internal.CXFAPINamespaceHandler;
+
+public abstract class BaseNamespaceHandler implements NamespaceHandler {
+
+    private NamespaceHandler cxfApiNamespaceHandler = new CXFAPINamespaceHandler();
+
+    /**
+     * If namespace handler's schema imports other schemas from cxf-core bundle, this method
+     * may be used to delegate to <code>CXFAPINamespaceHandler</code> to resolve
imported schema.
+     * @param namespace
+     * @return if namespace may be resolved by CXFAPINamespaceHandler valid URL is returned.
Otherwise
+     * returns <code>null</code>
+     */
+    protected URL findCoreSchemaLocation(String namespace) {
+        return cxfApiNamespaceHandler.getSchemaLocation(namespace);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
index 4593de9..94dd984 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/blueprint/ColocBPNamespaceHandler.java
@@ -20,6 +20,7 @@ package org.apache.cxf.binding.coloc.blueprint;
 
 import java.net.URL;
 import java.util.Set;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
@@ -33,7 +34,11 @@ import org.osgi.service.blueprint.reflect.Metadata;
 public class ColocBPNamespaceHandler implements NamespaceHandler {
 
     public URL getSchemaLocation(String s) {
-        return getClass().getClassLoader().getResource("schemas/coloc-feature.xsd");
+        if ("http://cxf.apache.org/binding/coloc".equals(s)) {
+            return getClass().getClassLoader().getResource("schemas/coloc-feature.xsd");
+        }
+        // no imported XSDs, so we don't have to delegate to cxf-core namespace handler
+        return null;
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
index 12f79ce..2864c2a 100644
--- a/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
+++ b/rt/bindings/object/src/main/java/org/apache/cxf/binding/object/blueprint/ObjectBindingBPHandler.java
@@ -20,6 +20,7 @@ package org.apache.cxf.binding.object.blueprint;
 
 import java.net.URL;
 import java.util.Set;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
@@ -33,7 +34,11 @@ import org.osgi.service.blueprint.reflect.Metadata;
 public class ObjectBindingBPHandler implements NamespaceHandler {
 
     public URL getSchemaLocation(String s) {
-        return getClass().getClassLoader().getResource("schemas/bindings/blueprint/object.xsd");
+        if ("http://cxf.apache.org/blueprint/binding/object".equals(s)) {
+            return getClass().getClassLoader().getResource("schemas/bindings/blueprint/object.xsd");
+        }
+        // no imported XSDs, so we don't have to delegate to cxf-core namespace handler
+        return null;
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/blueprint/SoapBindingBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/blueprint/SoapBindingBPHandler.java
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/blueprint/SoapBindingBPHandler.java
index 28feaa2..7533da3 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/blueprint/SoapBindingBPHandler.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/blueprint/SoapBindingBPHandler.java
@@ -21,18 +21,22 @@ package org.apache.cxf.binding.soap.blueprint;
 
 import java.net.URL;
 import java.util.Set;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
-public class SoapBindingBPHandler implements NamespaceHandler {
+public class SoapBindingBPHandler extends BaseNamespaceHandler {
 
     public URL getSchemaLocation(String s) {
-        return getClass().getClassLoader().getResource("schemas/configuration/blueprint/soap.xsd");
+        if ("http://cxf.apache.org/blueprint/bindings/soap".equals(s)) {
+            return getClass().getClassLoader().getResource("schemas/configuration/blueprint/soap.xsd");
+        }
+        return super.findCoreSchemaLocation(s);
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/features/clustering/src/main/java/org/apache/cxf/clustering/blueprint/ClusteringBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/features/clustering/src/main/java/org/apache/cxf/clustering/blueprint/ClusteringBPNamespaceHandler.java
b/rt/features/clustering/src/main/java/org/apache/cxf/clustering/blueprint/ClusteringBPNamespaceHandler.java
index 336d0ff..f495f56 100644
--- a/rt/features/clustering/src/main/java/org/apache/cxf/clustering/blueprint/ClusteringBPNamespaceHandler.java
+++ b/rt/features/clustering/src/main/java/org/apache/cxf/clustering/blueprint/ClusteringBPNamespaceHandler.java
@@ -24,17 +24,17 @@ import java.util.Set;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
 import org.apache.cxf.clustering.FailoverFeature;
 import org.apache.cxf.clustering.LoadDistributorFeature;
 import org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/clustering")
-public class ClusteringBPNamespaceHandler implements NamespaceHandler {
+public class ClusteringBPNamespaceHandler extends BaseNamespaceHandler {
     public ComponentMetadata decorate(Node node, ComponentMetadata component, ParserContext
context) {
         return null;
     }
@@ -55,7 +55,11 @@ public class ClusteringBPNamespaceHandler implements NamespaceHandler {
     }
 
     public URL getSchemaLocation(String namespace) {
-        return getClass().getClassLoader().getResource("schemas/clustering.xsd");
+        if ("http://cxf.apache.org/clustering".equals(namespace)) {
+            return getClass().getClassLoader().getResource("schemas/clustering.xsd");
+        }
+        // delegate to cxf-core
+        return super.findCoreSchemaLocation(namespace);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
index c61ca4c..2c7aa13 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSBPNamespaceHandler.java
@@ -29,9 +29,9 @@ import javax.xml.stream.XMLStreamException;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
 import org.apache.cxf.staxutils.transform.OutTransformWriter;
@@ -40,14 +40,17 @@ import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/blueprint/jaxrs")
-public class JAXRSBPNamespaceHandler implements NamespaceHandler {
+public class JAXRSBPNamespaceHandler extends BaseNamespaceHandler {
     private BlueprintContainer blueprintContainer;
     
     public JAXRSBPNamespaceHandler() {
     }
     
     public URL getSchemaLocation(String namespace) {
-        return getClass().getClassLoader().getResource("schemas/blueprint/jaxrs.xsd");
+        if ("http://cxf.apache.org/blueprint/jaxrs".equals(namespace)) {
+            return getClass().getClassLoader().getResource("schemas/blueprint/jaxrs.xsd");
+        }
+        return super.findCoreSchemaLocation(namespace);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/blueprint/JAXWSBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/blueprint/JAXWSBPNamespaceHandler.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/blueprint/JAXWSBPNamespaceHandler.java
index 5233899..2b4c1cd 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/blueprint/JAXWSBPNamespaceHandler.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/blueprint/JAXWSBPNamespaceHandler.java
@@ -25,11 +25,11 @@ import java.util.Set;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
 import org.apache.cxf.frontend.blueprint.ClientProxyFactoryBeanDefinitionParser;
 import org.apache.cxf.frontend.blueprint.ServerFactoryBeanDefinitionParser;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.osgi.service.blueprint.container.BlueprintContainer;
@@ -37,14 +37,17 @@ import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/blueprint/jaxws")
-public class JAXWSBPNamespaceHandler implements NamespaceHandler {
+public class JAXWSBPNamespaceHandler extends BaseNamespaceHandler {
     private BlueprintContainer blueprintContainer;
     
     public JAXWSBPNamespaceHandler() {
     }
     
     public URL getSchemaLocation(String namespace) {
-        return getClass().getClassLoader().getResource("schemas/blueprint/jaxws.xsd");
+        if ("http://cxf.apache.org/blueprint/jaxws".equals(namespace)) {
+            return getClass().getClassLoader().getResource("schemas/blueprint/jaxws.xsd");
+        }
+        return super.findCoreSchemaLocation(namespace);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/blueprint/SimpleBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/blueprint/SimpleBPNamespaceHandler.java
b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/blueprint/SimpleBPNamespaceHandler.java
index 0986896..acc0961 100644
--- a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/blueprint/SimpleBPNamespaceHandler.java
+++ b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/blueprint/SimpleBPNamespaceHandler.java
@@ -25,22 +25,25 @@ import java.util.Set;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.container.BlueprintContainer;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/blueprint/simple")
-public class SimpleBPNamespaceHandler implements NamespaceHandler {
+public class SimpleBPNamespaceHandler extends BaseNamespaceHandler {
     private BlueprintContainer blueprintContainer;
     
     public SimpleBPNamespaceHandler() {
     }
     
     public URL getSchemaLocation(String namespace) {
-        return getClass().getClassLoader().getResource("schemas/blueprint/simple.xsd");
+        if ("http://cxf.apache.org/blueprint/simple".equals(namespace)) {
+            return getClass().getClassLoader().getResource("schemas/blueprint/simple.xsd");
+        }
+        return super.findCoreSchemaLocation(namespace);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/blueprint/JAXRSBPNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/blueprint/JAXRSBPNamespaceHandler.java
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/blueprint/JAXRSBPNamespaceHandler.java
index d32fbe1..6a49418 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/blueprint/JAXRSBPNamespaceHandler.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/blueprint/JAXRSBPNamespaceHandler.java
@@ -35,12 +35,16 @@ import org.osgi.service.blueprint.reflect.Metadata;
 @Namespaces("http://cxf.apache.org/blueprint/jaxrs-client")
 public class JAXRSBPNamespaceHandler implements NamespaceHandler {
     private BlueprintContainer blueprintContainer;
-    
+    private JAXRSBPNamespaceHandler jaxRSBPNamespaceHandler = new JAXRSBPNamespaceHandler();
+
     public JAXRSBPNamespaceHandler() {
     }
     
     public URL getSchemaLocation(String namespace) {
-        return getClass().getClassLoader().getResource("schemas/blueprint/jaxrs-client.xsd");
+        if ("http://cxf.apache.org/blueprint/jaxrs-client".equals(namespace)) {
+            return getClass().getClassLoader().getResource("schemas/blueprint/jaxrs-client.xsd");
+        }
+        return jaxRSBPNamespaceHandler.getSchemaLocation(namespace);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
index 852aebf..4750b91 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/HTTPJettyTransportNamespaceHandler.java
@@ -26,15 +26,15 @@ import java.util.logging.Logger;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/transports/http-jetty/configuration")
-public class HTTPJettyTransportNamespaceHandler implements NamespaceHandler {
+public class HTTPJettyTransportNamespaceHandler extends BaseNamespaceHandler {
 
     public static final String JETTY_TRANSPORT = "http://cxf.apache.org/transports/http-jetty/configuration";
 
@@ -49,7 +49,7 @@ public class HTTPJettyTransportNamespaceHandler implements NamespaceHandler
{
             return getClass().getClassLoader().
                 getResource("schemas/configuration/http-jetty.xsd");
         } else {
-            return null;
+            return super.findCoreSchemaLocation(s);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
index 0790375..6db1b3f 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/HttpNettyTransportNamespaceHandler.java
@@ -26,15 +26,15 @@ import java.util.logging.Logger;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/transports/http-netty-server/configuration")
-public class HttpNettyTransportNamespaceHandler implements NamespaceHandler {
+public class HttpNettyTransportNamespaceHandler extends BaseNamespaceHandler {
 
     public static final String NETTY_SERVER_TRANSPORT = 
         "http://cxf.apache.org/transports/http-netty-server/configuration";
@@ -48,7 +48,7 @@ public class HttpNettyTransportNamespaceHandler implements NamespaceHandler
{
             return getClass().getClassLoader().
                 getResource("schemas/configuration/http-netty-server.xsd");
         } else {
-            return null;
+            return super.findCoreSchemaLocation(s);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpBPHandler.java
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpBPHandler.java
index 2cfe3fd..1ea0367 100755
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpBPHandler.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HttpBPHandler.java
@@ -25,14 +25,14 @@ import java.util.Set;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.Namespaces;
 import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
 @Namespaces("http://cxf.apache.org/transports/http/configuration")
-public class HttpBPHandler implements NamespaceHandler {
+public class HttpBPHandler extends BaseNamespaceHandler {
     
     public HttpBPHandler() {
     }
@@ -42,7 +42,7 @@ public class HttpBPHandler implements NamespaceHandler {
             return getClass().getClassLoader().
                 getResource("schemas/configuration/http-conf.xsd");
         }
-        return null;
+        return super.findCoreSchemaLocation(s);
     }
 
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
index 7ea58ef..a137264 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
@@ -20,6 +20,7 @@ package org.apache.cxf.ws.addressing.blueprint;
 
 import java.net.URL;
 import java.util.Set;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
@@ -33,7 +34,11 @@ import org.osgi.service.blueprint.reflect.Metadata;
 public class WsBPHandler implements NamespaceHandler {
 
     public URL getSchemaLocation(String s) {
-        return getClass().getClassLoader().getResource("schemas/ws-addr-conf.xsd");
+        if ("http://cxf.apache.org/ws/addressing".equals(s)) {
+            return getClass().getClassLoader().getResource("schemas/ws-addr-conf.xsd");
+        }
+        // no imported XSDs, so we don't have to delegate to cxf-core namespace handler
+        return null;
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/blueprint/PolicyBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/blueprint/PolicyBPHandler.java
b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/blueprint/PolicyBPHandler.java
index 8a42adb..cfed222 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/blueprint/PolicyBPHandler.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/blueprint/PolicyBPHandler.java
@@ -21,15 +21,16 @@ package org.apache.cxf.ws.policy.blueprint;
 
 import java.net.URL;
 import java.util.Set;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
-public class PolicyBPHandler implements NamespaceHandler {
+public class PolicyBPHandler extends BaseNamespaceHandler {
 
     public URL getSchemaLocation(String s) {
         //Say yes to various schemas.
@@ -54,7 +55,7 @@ public class PolicyBPHandler implements NamespaceHandler {
         if (location != null) {
             return getClass().getClassLoader().getResource(location);
         }
-        return null;
+        return super.findCoreSchemaLocation(s);
     }
 
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/df83183e/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/blueprint/RMBPHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/blueprint/RMBPHandler.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/blueprint/RMBPHandler.java
index 0aabf17..6b9a186 100755
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/blueprint/RMBPHandler.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/blueprint/RMBPHandler.java
@@ -20,17 +20,18 @@ package org.apache.cxf.ws.rm.blueprint;
 
 import java.net.URL;
 import java.util.Set;
+
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.aries.blueprint.NamespaceHandler;
 import org.apache.aries.blueprint.ParserContext;
+import org.apache.cxf.helpers.BaseNamespaceHandler;
 import org.apache.cxf.ws.rm.RMManager;
 import org.apache.cxf.ws.rm.feature.RMFeature;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
-public class RMBPHandler implements NamespaceHandler {
+public class RMBPHandler extends BaseNamespaceHandler {
 
     public URL getSchemaLocation(String s) {
         if ("http://cxf.apache.org/ws/rm/manager".equals(s)) {
@@ -43,7 +44,7 @@ public class RMBPHandler implements NamespaceHandler {
             return getClass().getClassLoader().
                 getResource("schemas/configuration/wsrmp-1.1-schema-200702.xsd");
         }
-        return null;
+        return super.findCoreSchemaLocation(s);
     }
 
     @SuppressWarnings("rawtypes")


Mime
View raw message