Author: dkulp
Date: Tue Apr 5 14:47:53 2011
New Revision: 1089066
URL: http://svn.apache.org/viewvc?rev=1089066&view=rev
Log:
[CXF-3440] Add BP support for ws-addressing feature
Patch from Johan Edstrom applied
Added:
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
(with props)
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
(with props)
Modified:
cxf/trunk/rt/ws/addr/pom.xml
Modified: cxf/trunk/rt/ws/addr/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/pom.xml?rev=1089066&r1=1089065&r2=1089066&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/pom.xml (original)
+++ cxf/trunk/rt/ws/addr/pom.xml Tue Apr 5 14:47:53 2011
@@ -34,6 +34,14 @@
<dependencies>
<dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<optional>true</optional>
Added:
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java?rev=1089066&view=auto
==============================================================================
---
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
(added)
+++
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
Tue Apr 5 14:47:53 2011
@@ -0,0 +1,50 @@
+/**
+ * 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.ws.addressing.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.configuration.blueprint.SimpleBPBeanDefinitionParser;
+import org.apache.cxf.ws.addressing.WSAddressingFeature;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+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");
+ }
+
+ public Set<Class> getManagedClasses() {
+ return null;
+ }
+
+ public Metadata parse(Element element, ParserContext context) {
+ return new
SimpleBPBeanDefinitionParser(WSAddressingFeature.class).parse(element, context);
+ }
+
+ public ComponentMetadata decorate(Node node, ComponentMetadata
componentMetadata, ParserContext context) {
+ return null;
+ }
+}
Propchange:
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/blueprint/WsBPHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml?rev=1089066&view=auto
==============================================================================
---
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
(added)
+++
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
Tue Apr 5 14:47:53 2011
@@ -0,0 +1,31 @@
+<!--
+ 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.
+ -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+ <service interface="org.apache.aries.blueprint.NamespaceHandler">
+ <service-properties>
+ <entry key="osgi.service.blueprint.namespace"
value="http://cxf.apache.org/ws/addressing"/>
+ </service-properties>
+ <bean class="org.apache.cxf.ws.addressing.blueprint.WsBPHandler"/>
+ </service>
+</blueprint>
\ No newline at end of file
Propchange:
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
cxf/trunk/rt/ws/addr/src/main/resources/OSGI-INF/blueprint/ws-addressing.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml