cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1084474 [3/4] - in /cxf/sandbox/cxf-blueprint: ./ core/ core/src/ core/src/main/ core/src/main/java/ core/src/main/java/org/ core/src/main/java/org/apache/ core/src/main/java/org/apache/cxf/ core/src/main/java/org/apache/cxf/blueprint/ cor...
Date Wed, 23 Mar 2011 04:28:43 GMT
Added: cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxRsNameSpaceHandler.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxRsNameSpaceHandler.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxRsNameSpaceHandler.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxRsNameSpaceHandler.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,78 @@
+/*
+ * *
+ *  * 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.blueprint.jaxrs;
+
+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.blueprint.core.CxfBusRegistry;
+import org.apache.cxf.blueprint.core.NSUtils;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JaxRsNameSpaceHandler implements NamespaceHandler {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(JaxRsNameSpaceHandler.class);
+
+    private CxfBusRegistry cxfBusRegistry;
+
+    private BlueprintContainer blueprintContainer;
+
+    @Override
+    public Metadata parse(Element element, ParserContext context) {
+        if (NSUtils.JAXRS_SERVER.equals(element.getNodeName())) {
+            JaxrsServerParser jaxrsServerParser = new JaxrsServerParser();
+            return jaxrsServerParser.serverParser(element, context, cxfBusRegistry);
+        } else {
+            LOG.error("Undefined request for " + element);
+            return null;
+        }
+    }
+
+    @Override
+    public URL getSchemaLocation(String s) {
+        return getClass().getClassLoader().getResource("jaxrs.xsd");
+    }
+
+    @Override
+    public Set<Class> getManagedClasses() {
+        return null;
+    }
+
+    @Override
+    public ComponentMetadata decorate(Node node, ComponentMetadata componentMetadata, ParserContext parserContext) {
+        return null;
+    }
+
+    public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
+        this.blueprintContainer = blueprintContainer;
+    }
+
+    public void setCxfBusRegistry(CxfBusRegistry cxfBusRegistry) {
+        this.cxfBusRegistry = cxfBusRegistry;
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxrsServerParser.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxrsServerParser.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxrsServerParser.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/JaxrsServerParser.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,150 @@
+/*
+ * *
+ *  * 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.blueprint.jaxrs;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+
+import org.apache.aries.blueprint.ParserContext;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.apache.cxf.blueprint.core.BaseCxfParser;
+import org.apache.cxf.blueprint.core.CxfBusRegistry;
+import org.apache.cxf.blueprint.core.NSUtils;
+import org.apache.cxf.common.util.StringUtils;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JaxrsServerParser extends BaseCxfParser {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(JaxrsServerParser.class);
+
+    Metadata serverParser(Element element, ParserContext context, CxfBusRegistry registry) {
+
+        MutableBeanMetadata cxfBean = context.createMetadata(MutableBeanMetadata.class);
+
+        //Add a blueprintContainer ref
+
+        cxfBean.addProperty("blueprintContainer", NSUtils.createRef(context, "blueprintContainer"));
+
+        if (!StringUtils.isEmpty(NSUtils.getIdOrName(element))) {
+            cxfBean.setId(NSUtils.getIdOrName(element));
+        } else {
+            cxfBean.setId("cxf.server." + UUID.randomUUID().toString());
+        }
+        cxfBean.setRuntimeClass(MetaDataBeans.CxfJaxrsServerBean.class);
+
+        boolean setBus = parseAttributes(element, context, cxfBean, registry);
+        if (!setBus && hasBusProperty()) {
+            addBusWiringAttribute(cxfBean);
+        }
+
+        parseChildElements(element, context, cxfBean);
+
+        cxfBean.setInitMethod("init");
+        LOG.debug("The final bean for construction " + cxfBean);
+        return cxfBean;
+    }
+
+    @Override
+    protected void mapAttribute(MutableBeanMetadata bean, Element e, String name, String val, ParserContext context) {
+        if ("beanNames".equals(name)) {
+            String[] values = val.split(" ");
+            List<BlueprintResourceFactory> tempFactories = new ArrayList<BlueprintResourceFactory>(values.length);
+            for (String v : values) {
+                String theValue = v.trim();
+                if (theValue.length() > 0) {
+                    tempFactories.add(new BlueprintResourceFactory(theValue));
+                }
+            }
+
+            //TODO Add list value
+            // bean.addProperty("tempResourceProviders",  tempFactories);
+        } else {
+            if ("serviceName".equals(name)) {
+                QName q = NSUtils.parseQName(e, val);
+                bean.addProperty(name, createValue(context, q));
+            } else {
+                mapToProperty(bean, name, val, context);
+            }
+        }
+    }
+
+    @Override
+    protected void mapElement(ParserContext ctx, MutableBeanMetadata bean, Element el, String name) {
+        if ("properties".equals(name) || "extensionMappings".equals(name) || "languageMappings".equals(name)) {
+            Metadata map = NSUtils.parseMapElement(el, ctx);
+            bean.addProperty(name, map);
+        } else {
+            if ("executor".equals(name)) {
+                setFirstChildAsProperty(el, ctx, bean, "serviceFactory.executor");
+            } else {
+                if ("invoker".equals(name)) {
+                    setFirstChildAsProperty(el, ctx, bean, "serviceFactory.invoker");
+                } else {
+                    if ("binding".equals(name)) {
+                        setFirstChildAsProperty(el, ctx, bean, "bindingConfig");
+                    } else {
+                        if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name) || "outInterceptors".equals(name)
+                            || "outFaultInterceptors".equals(name)) {
+                            MutableBeanMetadata listbean = ctx.createMetadata(MutableBeanMetadata.class);
+                            Metadata list = parseListData(ctx, listbean, el);
+                            LOG.debug("List data parsed as " + list);
+                            bean.addProperty(name, list);
+                        } else {
+                            if ("features".equals(name) || "schemaLocations".equals(name) || "providers".equals(name) || "serviceBeans".equals(name)
+                                || "modelBeans".equals(name)) {
+                                MutableBeanMetadata listbean = ctx.createMetadata(MutableBeanMetadata.class);
+                                Metadata list = parseListData(ctx, listbean, el);
+                                LOG.debug("List data parsed as " + list);
+                                bean.addProperty(name, list);
+                            } else {
+                                if ("serviceFactories".equals(name)) {
+                                    MutableBeanMetadata listbean = ctx.createMetadata(MutableBeanMetadata.class);
+                                    Metadata list = parseListData(ctx, listbean, el);
+                                    LOG.debug("List data parsed as " + list);
+                                    bean.addProperty("resourceProviders", list);
+                                } else {
+                                    if ("model".equals(name)) {
+                                        MutableBeanMetadata listbean = ctx.createMetadata(MutableBeanMetadata.class);
+                                        Metadata list = parseListData(ctx, listbean, el);
+                                        LOG.debug("List data parsed as " + list);
+
+                                        bean.addProperty("modelBeans", list);
+                                    } else {
+                                        setFirstChildAsProperty(el, ctx, bean, name);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    protected boolean hasBusProperty() {
+        return true;
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/MetaDataBeans.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/MetaDataBeans.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/MetaDataBeans.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/main/java/org/apache/cxf/blueprint/jaxrs/MetaDataBeans.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,91 @@
+/*
+ * *
+ *  * 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.blueprint.jaxrs;
+
+import java.util.List;
+
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.message.Message;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+
+public class MetaDataBeans {
+
+    public static class CxfJaxrsServerBean extends JAXRSServerFactoryBean {
+
+        private BlueprintContainer blueprintContainer;
+
+        public CxfJaxrsServerBean() {
+            super();
+        }
+
+        public void init() {
+            super.create();
+        }
+
+        public List getInInterceptors() {
+            return super.getInInterceptors();
+        }
+
+        public void setInInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getInFaultInterceptors() {
+            return super.getInFaultInterceptors();
+        }
+
+        public void setInFaultInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInFaultInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getOutInterceptors() {
+            return super.getOutInterceptors();
+        }
+
+        public void setOutInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getOutInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getOutFaultInterceptors() {
+            return super.getOutFaultInterceptors();
+        }
+
+        public void setOutFaultInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInFaultInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public BlueprintContainer getBlueprintContainer() {
+            return blueprintContainer;
+        }
+
+        public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
+            this.blueprintContainer = blueprintContainer;
+        }
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/OSGI-INF/blueprint/jaxrs.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/OSGI-INF/blueprint/jaxrs.xml?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/OSGI-INF/blueprint/jaxrs.xml (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/OSGI-INF/blueprint/jaxrs.xml Wed Mar 23 04:28:40 2011
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+    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:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <reference id="cxfBusRegistry" interface="org.apache.cxf.blueprint.core.CxfBusRegistry" filter="(simpleBusRegistry=true)"/>
+
+  <service interface="org.apache.aries.blueprint.NamespaceHandler">
+    <service-properties>
+      <entry key="osgi.service.blueprint.namespace" value="http://cxf.apache.org/blueprint/jaxrs"/>
+    </service-properties>
+    <bean class="org.apache.cxf.blueprint.jaxrs.JaxRsNameSpaceHandler" depends-on="cxfBusRegistry">
+      <property name="cxfBusRegistry" ref="cxfBusRegistry"/>
+    </bean>
+  </service>
+
+</blueprint>
\ No newline at end of file

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/jaxrs.xsd
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/jaxrs.xsd?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/jaxrs.xsd (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/main/resources/jaxrs.xsd Wed Mar 23 04:28:40 2011
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<xsd:schema xmlns="http://cxf.apache.org/blueprint/jaxrs"
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            xmlns:cxf-beans="http://cxf.apache.org/configuration/beans"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            targetNamespace="http://cxf.apache.org/blueprint/jaxrs"
+            xmlns:tns="http://cxf.apache.org/blueprint/jaxrs"
+            elementFormDefault="qualified"
+            attributeFormDefault="unqualified">
+
+  <xsd:import namespace="http://cxf.apache.org/configuration/beans" schemaLocation="http://cxf.apache.org/schemas/configuration/cxf-beans.xsd"/>
+
+  <xsd:complexType name="identifiedType" abstract="true">
+    <xsd:attribute name="id" type="xsd:ID">
+    </xsd:attribute>
+  </xsd:complexType>
+
+  <xsd:complexType name="map">
+    <xsd:sequence>
+      <xsd:element name="entry" minOccurs="0"
+                   maxOccurs="unbounded">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="key"/>
+            <xsd:element name="value"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:element name="server">
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="identifiedType">
+          <xsd:all>
+            <xsd:element name="executor" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="features" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="binding" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="dataBinding" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="invoker" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="serviceFactories" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="outFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="properties" type="map" minOccurs="0"/>
+            <xsd:element name="serviceBeans" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="modelBeans" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="model" type="model" minOccurs="0"/>
+            <xsd:element name="providers" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="extensionMappings" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="languageMappings" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="schemaLocations" type="schemasType" minOccurs="0"/>
+            <xsd:element name="resourceComparator" type="xsd:anyType" minOccurs="0"/>
+          </xsd:all>
+          <xsd:attributeGroup ref="cxf-beans:beanAttributes"/>
+          <xsd:attribute name="address" type="xsd:string"/>
+          <xsd:attribute name="bus" type="xsd:string"/>
+          <xsd:attribute name="serviceClass" type="xsd:string"/>
+          <xsd:attribute name="transportId" type="xsd:string"/>
+          <xsd:attribute name="modelRef" type="xsd:string"/>
+          <xsd:attribute name="bindingId" type="xsd:string"/>
+          <xsd:attribute name="staticSubresourceResolution" type="xsd:boolean"/>
+          <xsd:attribute name="beanNames" type="xsd:string"/>
+          <xsd:attribute name="serviceName" type="xsd:QName"/>
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="client">
+    <xsd:complexType>
+      <xsd:complexContent>
+        <xsd:extension base="identifiedType">
+          <xsd:all>
+            <xsd:element name="executor" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="features" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="binding" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="dataBinding" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="outFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="properties" type="map" minOccurs="0"/>
+            <xsd:element name="providers" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="modelBeans" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="model" type="model" minOccurs="0"/>
+            <xsd:element name="headers" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="schemaLocations" type="schemasType" minOccurs="0"/>
+          </xsd:all>
+          <xsd:attributeGroup ref="cxf-beans:beanAttributes"/>
+          <xsd:attribute name="address" type="xsd:string"/>
+          <xsd:attribute name="serviceClass" type="xsd:string"/>
+          <xsd:attribute name="inheritHeaders" type="xsd:boolean"/>
+          <xsd:attribute name="bus" type="xsd:string"/>
+          <xsd:attribute name="transportId" type="xsd:string"/>
+          <xsd:attribute name="bindingId" type="xsd:string"/>
+          <xsd:attribute name="modelRef" type="xsd:string"/>
+          <xsd:attribute name="username" type="xsd:string"/>
+          <xsd:attribute name="password" type="xsd:string"/>
+          <xsd:attribute name="serviceName" type="xsd:QName"/>
+          <xsd:attribute name="threadSafe" type="xsd:boolean"/>
+        </xsd:extension>
+      </xsd:complexContent>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="schemasType">
+    <xsd:sequence>
+      <xsd:element name="schemaLocation" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:element name="model" type="tns:model"/>
+
+  <xsd:complexType name="model">
+    <xsd:sequence>
+      <xsd:element name="resource" minOccurs="0" maxOccurs="unbounded">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:element name="operation" minOccurs="0" maxOccurs="unbounded">
+              <xsd:complexType>
+                <xsd:sequence>
+                  <xsd:element name="param" minOccurs="0" maxOccurs="unbounded">
+                    <xsd:complexType>
+                      <xsd:attribute name="name" type="xsd:string"/>
+                      <xsd:attribute name="type">
+                        <xsd:simpleType>
+                          <xsd:restriction base="xsd:string">
+                            <xsd:enumeration value="PATH"/>
+                            <xsd:enumeration value="QUERY"/>
+                            <xsd:enumeration value="MATRIX"/>
+                            <xsd:enumeration value="HEADER"/>
+                            <xsd:enumeration value="COOKIE"/>
+                            <xsd:enumeration value="FORM"/>
+                            <xsd:enumeration value="CONTEXT"/>
+                            <xsd:enumeration value="REQUEST_BODY"/>
+                          </xsd:restriction>
+                        </xsd:simpleType>
+                      </xsd:attribute>
+                      <xsd:attribute name="defaultValue" type="xsd:string"/>
+                      <xsd:attribute name="encoded" type="xsd:boolean"/>
+                    </xsd:complexType>
+                  </xsd:element>
+                </xsd:sequence>
+                <xsd:attribute name="name" type="xsd:string"/>
+                <xsd:attribute name="path" type="xsd:string"/>
+                <xsd:attribute name="verb" type="xsd:string"/>
+                <xsd:attribute name="consumes" type="xsd:string"/>
+                <xsd:attribute name="produces" type="xsd:string"/>
+              </xsd:complexType>
+            </xsd:element>
+          </xsd:sequence>
+          <xsd:attribute name="name" type="xsd:string"/>
+          <xsd:attribute name="path" type="xsd:string"/>
+          <xsd:attribute name="consumes" type="xsd:string"/>
+          <xsd:attribute name="produces" type="xsd:string"/>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:attribute name="id" type="xsd:string"/>
+  </xsd:complexType>
+
+</xsd:schema>
+

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/BaseNsHandlerSetup.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/BaseNsHandlerSetup.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/BaseNsHandlerSetup.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/BaseNsHandlerSetup.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,99 @@
+/*
+ * *
+ *  * 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.blueprint.jaxrs;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.NamespaceHandler;
+import org.apache.aries.blueprint.container.NamespaceHandlerRegistry;
+import org.apache.aries.blueprint.container.Parser;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.apache.aries.blueprint.namespace.ComponentDefinitionRegistryImpl;
+import org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl;
+import org.apache.aries.blueprint.reflect.PassThroughMetadataImpl;
+import org.apache.aries.mocks.BundleContextMock;
+import org.apache.aries.mocks.BundleMock;
+import org.apache.aries.unittest.mocks.MethodCall;
+import org.apache.aries.unittest.mocks.Skeleton;
+import org.apache.cxf.blueprint.core.CxfBusRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+
+public class BaseNsHandlerSetup {
+
+    protected Bundle b;
+    protected NamespaceHandlerRegistry nhri;
+    protected JaxRsNameSpaceHandler namespaceHandler;
+
+    @Before
+    public void setUp() {
+        b = Skeleton.newMock(new BundleMock("org.apache.cxf.blueprint.jaxrs", new Properties()), Bundle.class);
+
+        BundleContext ctx = b.getBundleContext();
+        nhri = new NamespaceHandlerRegistryImpl(ctx);
+
+        CxfBusRegistry registry = Skeleton.newMock(CxfBusRegistry.class);
+
+        namespaceHandler = new JaxRsNameSpaceHandler();
+        namespaceHandler.setCxfBusRegistry(registry);
+
+        BlueprintContainer container = Skeleton.newMock(BlueprintContainer.class);
+        Skeleton.getSkeleton(container).setReturnValue(new MethodCall(BlueprintContainer.class, "getComponentInstance", "BOB"),
+            MutableBeanMetadata.class);
+        namespaceHandler.setBlueprintContainer(container);
+
+        Properties props = new Properties();
+        props.put("osgi.service.blueprint.namespace", new String[]{"http://cxf.apache.org/blueprint/jaxrs", "http://cxf.apache.org/blueprint/jaxrs"});
+        ctx.registerService(NamespaceHandler.class.getName(), namespaceHandler, props);
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        b = null;
+        nhri = null;
+
+        BundleContextMock.clear();
+    }
+
+    protected ComponentDefinitionRegistry parseCDR(String name) throws Exception {
+        Parser p = new Parser();
+
+        URL bpxml = this.getClass().getClassLoader().getResource(name);
+        p.parse(Arrays.asList(bpxml));
+
+        Set<URI> nsuris = p.getNamespaces();
+        NamespaceHandlerRegistry.NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
+        p.validate(nshandlers.getSchema());
+
+        ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
+        cdr.registerComponentDefinition(new PassThroughMetadataImpl("blueprintBundle", b));
+        p.populate(nshandlers, cdr);
+
+        return cdr;
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/NsHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/NsHandlerTest.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/NsHandlerTest.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/test/java/org/apache/cxf/blueprint/jaxrs/NsHandlerTest.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,59 @@
+/*
+ * *
+ *  * 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.blueprint.jaxrs;
+
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.junit.Test;
+import org.osgi.service.blueprint.reflect.BeanMetadata;
+import org.osgi.service.blueprint.reflect.BeanProperty;
+import org.osgi.service.blueprint.reflect.CollectionMetadata;
+import org.osgi.service.blueprint.reflect.RefMetadata;
+import org.osgi.service.blueprint.reflect.ValueMetadata;
+
+
+import static junit.framework.Assert.assertTrue;
+
+public class NsHandlerTest extends BaseNsHandlerSetup {
+
+    @Test
+    public void testParsingNameSpace() throws Exception {
+        ComponentDefinitionRegistry cdr = parseCDR("org/apache/cxf/blueprint/jaxrs/cxf.xml");
+
+        BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("customerService");
+        BeanProperty bp = (BeanProperty) comp.getProperties().get(1);
+        ValueMetadata anon = (ValueMetadata) bp.getValue();
+
+        assertTrue("http://localhost:9092/crm".equals(anon.getStringValue()));
+    }
+
+    @Test
+    public void testInterceptors() throws Exception {
+        ComponentDefinitionRegistry cdr = parseCDR("org/apache/cxf/blueprint/jaxrs/cxf.xml");
+
+        BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("customerService");
+
+        BeanProperty bp = (BeanProperty) comp.getProperties().get(3);
+        CollectionMetadata anon = (CollectionMetadata) bp.getValue();
+
+        RefMetadata interceptor = (RefMetadata) anon.getValues().get(0);
+
+        assertTrue(interceptor.getComponentId().startsWith(".cxf.supporting.bean."));
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxrs/src/test/resources/org/apache/cxf/blueprint/jaxrs/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/src/test/resources/org/apache/cxf/blueprint/jaxrs/cxf.xml?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/src/test/resources/org/apache/cxf/blueprint/jaxrs/cxf.xml (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/src/test/resources/org/apache/cxf/blueprint/jaxrs/cxf.xml Wed Mar 23 04:28:40 2011
@@ -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.
+  ~  */
+  -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
+           xsi:schemaLocation="
+           http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+           ">
+
+  <jaxrs:server id="customerService" address="http://localhost:9092/crm">
+    <jaxrs:serviceBeans>
+      <ref component-id="customerSvc"/>
+    </jaxrs:serviceBeans>
+    <jaxrs:inInterceptors>
+      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+    </jaxrs:inInterceptors>
+
+    <jaxrs:outInterceptors>
+      <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+    </jaxrs:outInterceptors>
+  </jaxrs:server>
+
+  <bean id="customerSvc" class=" org.apache.servicemix.examples.cxf.jaxrs.CustomerService"/>
+
+</blueprint>

Added: cxf/sandbox/cxf-blueprint/jaxrs/target/cxf-blueprint-jaxrs-2.4.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/target/cxf-blueprint-jaxrs-2.4.0-SNAPSHOT.jar?rev=1084474&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/sandbox/cxf-blueprint/jaxrs/target/cxf-blueprint-jaxrs-2.4.0-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cxf/sandbox/cxf-blueprint/jaxrs/target/cxf.osgi.version.txt
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxrs/target/cxf.osgi.version.txt?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxrs/target/cxf.osgi.version.txt (added)
+++ cxf/sandbox/cxf-blueprint/jaxrs/target/cxf.osgi.version.txt Wed Mar 23 04:28:40 2011
@@ -0,0 +1,2 @@
+cxf.osgi.version.clean = 2.4.0.SNAPSHOT
+                  csc.schema.version = 2.4
\ No newline at end of file

Added: cxf/sandbox/cxf-blueprint/jaxws/cxf-blueprint-jaxws.iml
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/cxf-blueprint-jaxws.iml?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/cxf-blueprint-jaxws.iml (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/cxf-blueprint-jaxws.iml Wed Mar 23 04:28:40 2011
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/target/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/target/surefire" />
+      <excludeFolder url="file://$MODULE_DIR$/target/surefire-reports" />
+      <excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="cxf-blueprint-core" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-bundle:2.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.commons.schema:XmlSchema:1.4.7" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.0.8" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-annotation_1.0_spec:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.6.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
+    <orderEntry type="library" name="Maven: oro:oro:2.0.8" level="project" />
+    <orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.2" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-xjc:2.2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.neethi:neethi:2.0.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-activation_1.1_spec:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.soap:saaj-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:1.0" level="project" />
+    <orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" />
+    <orderEntry type="library" name="Maven: asm:asm:3.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-asm:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.messaging.saaj:saaj-impl:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.antlr:antlr:3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.antlr:antlr-runtime:3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.antlr:stringtemplate:3.2" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-servlet_3.0_spec:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-pool:commons-pool:1.5.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jms:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jra:jra:1.0-alpha-4" level="project" />
+    <orderEntry type="library" name="Maven: rhino:js:1.7R2" level="project" />
+    <orderEntry type="library" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.security:wss4j:1.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.santuario:xmlsec:1.4.4" level="project" />
+    <orderEntry type="library" name="Maven: xalan:xalan:2.7.1" level="project" />
+    <orderEntry type="library" name="Maven: xalan:serializer:2.7.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.bouncycastle:bcprov-jdk15:1.45" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries.blueprint:org.apache.aries.blueprint:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries:org.apache.aries.util:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries.testsupport:org.apache.aries.testsupport.unit:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries.proxy:org.apache.aries.proxy.api:0.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.osgi:org.osgi.core:4.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.osgi:org.osgi.compendium:4.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.5.10" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.14" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8" level="project" />
+  </component>
+</module>
+

Added: cxf/sandbox/cxf-blueprint/jaxws/jaxws.iml
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/jaxws.iml?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/jaxws.iml (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/jaxws.iml Wed Mar 23 04:28:40 2011
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
+      <excludeFolder url="file://$MODULE_DIR$/target/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.apache.cxf:cxf-bundle:2.3.2-fuse-00-00" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.commons.schema:XmlSchema:1.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:woodstox-core-asl:4.0.8" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-annotation_1.0_spec:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.6.4" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
+    <orderEntry type="library" name="Maven: oro:oro:2.0.8" level="project" />
+    <orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.2" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-xjc:2.2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.neethi:neethi:2.0.4" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-activation_1.1_spec:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.7.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.soap:saaj-api:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:1.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:1.0" level="project" />
+    <orderEntry type="library" name="Maven: xml-resolver:xml-resolver:1.2" level="project" />
+    <orderEntry type="library" name="Maven: asm:asm:3.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-asm:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework:spring-aop:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.messaging.saaj:saaj-impl:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.antlr:antlr:3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.antlr:antlr-runtime:3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.antlr:stringtemplate:3.2" level="project" />
+    <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:7.2.2.v20101205" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-servlet_3.0_spec:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: commons-pool:commons-pool:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jms:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:3.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jra:jra:1.0-alpha-4" level="project" />
+    <orderEntry type="library" name="Maven: rhino:js:1.7R2" level="project" />
+    <orderEntry type="library" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.security:wss4j:1.5.8" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.santuario:xmlsec:1.4.4" level="project" />
+    <orderEntry type="library" name="Maven: xalan:xalan:2.7.1" level="project" />
+    <orderEntry type="library" name="Maven: xalan:serializer:2.7.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.bouncycastle:bcprov-jdk15:1.45" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries.blueprint:org.apache.aries.blueprint:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries:org.apache.aries.util:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries.testsupport:org.apache.aries.testsupport.unit:0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.aries.proxy:org.apache.aries.proxy.api:0.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.osgi:org.osgi.core:4.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.osgi:org.osgi.compendium:4.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.5.10" level="project" />
+    <orderEntry type="library" name="Maven: log4j:log4j:1.2.14" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.2" level="project" />
+  </component>
+</module>
+

Added: cxf/sandbox/cxf-blueprint/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/pom.xml?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/pom.xml (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/pom.xml Wed Mar 23 04:28:40 2011
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--
+  ~ /**
+  ~  * 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.
+  ~  */
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <artifactId>cxf-blueprint</artifactId>
+    <groupId>org.apache.cxf.blueprint</groupId>
+    <version>2.4.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>cxf-blueprint-jaxws</artifactId>
+
+  <packaging>bundle</packaging>
+
+  <name>Apache CXF :: Blueprint Jaxws</name>
+
+  <properties>
+    <cxf.osgi.export.pkg>
+      org.apache.cxf.blueprint.jaxws;version="${project.version}"
+    </cxf.osgi.export.pkg>
+    <cxf.osgi.import.pkg>
+      !org.apache.cxf.blueprint.jaxws,
+      org.apache.cxf.blueprint.core,
+      !org.springframework*,
+      org.slf4j;version="[1.5.11,1.5.15)",
+      org.slf4j.* ;version="[1.5.11,1.5.15)",
+      org.apache.aries.blueprint*;version="[0.2,0.3)",
+      org.apache.cxf*;version="[2.3.2,2.4)",
+      *
+    </cxf.osgi.import.pkg>
+    <cxf.osgi.dynamic>*</cxf.osgi.dynamic>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cxf.blueprint</groupId>
+      <artifactId>cxf-blueprint-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-bundle</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.aries.blueprint</groupId>
+      <artifactId>org.apache.aries.blueprint</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.xml.bind</groupId>
+      <artifactId>jaxb-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+    </dependency>
+
+    <!-- for testing -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>

Added: cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/EndpointDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/EndpointDefinitionParser.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/EndpointDefinitionParser.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/EndpointDefinitionParser.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,228 @@
+/*
+ * *
+ *  * 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.blueprint.jaxws;
+
+import java.util.UUID;
+import javax.xml.namespace.QName;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+import org.apache.aries.blueprint.ComponentDefinitionRegistry;
+import org.apache.aries.blueprint.ParserContext;
+import org.apache.aries.blueprint.PassThroughMetadata;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.apache.aries.blueprint.mutable.MutablePassThroughMetadata;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.blueprint.core.BaseCxfParser;
+import org.apache.cxf.blueprint.core.CxfBusRegistry;
+import org.apache.cxf.blueprint.core.NSUtils;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.helpers.DOMUtils;
+import org.osgi.framework.Bundle;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class EndpointDefinitionParser extends BaseCxfParser {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(EndpointDefinitionParser.class);
+    //Endpoint Parser method
+
+    Metadata endPointParser(Element element, ParserContext context, CxfBusRegistry cxfBusRegistry) {
+        //Endpoint definition
+        MutableBeanMetadata cxfBean = context.createMetadata(MutableBeanMetadata.class);
+
+        //Add a blueprintContainer ref
+
+        cxfBean.addProperty("blueprintContainer", NSUtils.createRef(context, "blueprintContainer"));
+        if (!StringUtils.isEmpty(NSUtils.getIdOrName(element))) {
+            cxfBean.setId(NSUtils.getIdOrName(element));
+        } else {
+            cxfBean.setId("cxf.endpoint." + UUID.randomUUID().toString());
+        }
+        cxfBean.setRuntimeClass(MetaDataBeans.CxfBlueprintEndpoint.class);
+
+        boolean isAbstract = false;
+        boolean publish = true;
+        NamedNodeMap atts = element.getAttributes();
+        String bus = element.getAttribute("bus");
+
+        String implementationClass = element.getAttribute("implementorClass");
+
+        if (StringUtils.isEmpty(bus)) {
+
+            if (!StringUtils.isEmpty(implementationClass)) {
+
+                MutableBeanMetadata implClass = context.createMetadata(MutableBeanMetadata.class);
+                String implId = UUID.randomUUID().toString();
+                implClass.setId(".cxf.endpoint.implementationClass." + implId);
+                implClass.setClassName(implementationClass);
+                context.getComponentDefinitionRegistry().registerComponentDefinition(implClass);
+
+                cxfBean.addArgument(NSUtils.createRef(context, implId), Object.class.getName(), 0);
+            } else {
+                //Use the default bus or create it if this is the first run through the parser.
+                ComponentDefinitionRegistry cdr = context.getComponentDefinitionRegistry();
+                ComponentMetadata meta = cdr.getComponentDefinition("blueprintBundle");
+
+                Bundle blueprintBundle = null;
+                if (meta instanceof PassThroughMetadata) {
+                    blueprintBundle = (Bundle) ((PassThroughMetadata) meta).getObject();
+                }
+                //Skip the dry-run
+                if (blueprintBundle != null) {
+
+                    if (!cdr.containsComponentDefinition(NSUtils.DEFAULT__BUNDLE_BUS)) {
+                        //Create a bus
+                        MutablePassThroughMetadata factory = context.createMetadata(MutablePassThroughMetadata.class);
+                        factory.setId(".cxf.bus.passthrough.Factory" + UUID.randomUUID().toString());
+                        factory.setObject(new NSUtils.PassThroughCallable<Object>(BusFactory.getThreadDefaultBus()));
+
+                        MutableBeanMetadata busFactory = context.createMetadata(MutableBeanMetadata.class);
+                        busFactory.setId(NSUtils.DEFAULT__BUNDLE_BUS);
+                        busFactory.setRuntimeClass(Bus.class);
+                        busFactory.setFactoryComponent(factory);
+                        busFactory.setFactoryMethod("call");
+
+                        context.getComponentDefinitionRegistry().registerComponentDefinition(busFactory);
+
+                        if (!cxfBusRegistry.isRegistered(cdr)) {
+                            cxfBusRegistry.register(cdr, blueprintBundle);
+                        }
+                    }
+                }
+
+                cxfBean.addProperty("bus", NSUtils.createRef(context, NSUtils.DEFAULT__BUNDLE_BUS));
+            }
+        } else {
+
+            if (!StringUtils.isEmpty(implementationClass)) {
+
+                MutableBeanMetadata implClass = context.createMetadata(MutableBeanMetadata.class);
+                String implId = UUID.randomUUID().toString();
+                implClass.setId("cxf.endpoint.implementationClass." + implId);
+                implClass.setClassName(implementationClass);
+                context.getComponentDefinitionRegistry().registerComponentDefinition(implClass);
+
+                cxfBean.addArgument(NSUtils.createRef(context, implId), Object.class.getName(), 1);
+            }
+            cxfBean.addArgument(NSUtils.createRef(context, bus), Bus.class.getName(), 0);
+        }
+
+        for (int i = 0; i < atts.getLength(); i++) {
+            Attr node = (Attr) atts.item(i);
+            String val = node.getValue();
+            String pre = node.getPrefix();
+            String name = node.getLocalName();
+            if ("createdFromAPI".equals(name)) {
+                cxfBean.addProperty("abstract", NSUtils.createValue(context, "true"));
+                isAbstract = true;
+            } else {
+                if (NSUtils.isAttribute(pre, name) && !"publish".equals(name) && !"bus".equals(name)) {
+                    if ("endpointName".equals(name) || "serviceName".equals(name)) {
+                        QName q = NSUtils.parseQName(element, val);
+                        cxfBean.addProperty(name, createValue(context, q));
+                    } else {
+                        if ("depends-on".equals(name)) {
+                            cxfBean.addDependsOn(val);
+                        } else {
+                            if (NSUtils.IMPLEMENTOR.equals(name)) {
+                                String implementor = val;
+                                if (val.startsWith("#")) {
+                                    implementor = val.substring(1);
+                                }
+                                if (StringUtils.isEmpty(bus)) {
+                                    cxfBean.addArgument(NSUtils.createRef(context, implementor), Object.class.getName(), 0);
+                                } else {
+                                    cxfBean.addArgument(NSUtils.createRef(context, implementor), Object.class.getName(), 1);
+                                }
+                            } else {
+                                if (!"name".equals(name)) {
+                                    cxfBean.addProperty(name, NSUtils.createValue(context, val));
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    if ("abstract".equals(name)) {
+                        cxfBean.addProperty("abstract", NSUtils.createValue(context, "true"));
+                        isAbstract = true;
+                    } else {
+                        if ("publish".equals(name)) {
+                            publish = "true".equals(val);
+                            cxfBean.addProperty("publish", NSUtils.createValue(context, "true"));
+                        }
+                    }
+                }
+            }
+        }
+
+        Element elem = DOMUtils.getFirstElement(element);
+        while (elem != null) {
+            String name = elem.getLocalName();
+            if ("properties".equals(name)) {
+                Metadata map = NSUtils.parseMapElement(elem, context);
+                cxfBean.addProperty(name, map);
+            } else {
+                if ("binding".equals(name)) {
+                    setFirstChildAsProperty(elem, context, cxfBean, "bindingConfig");
+                } else {
+                    if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name) || "outInterceptors".equals(name)
+                        || "outFaultInterceptors".equals(name) || "features".equals(name) || "schemaLocations".equals(name) || "handlers".equals(
+                        name)) {
+                        MutableBeanMetadata bean = context.createMetadata(MutableBeanMetadata.class);
+                        Metadata list = parseListData(context, bean, elem);
+                        LOG.debug("List data parsed as " + list);
+                        cxfBean.addProperty(name, list);
+                    } else {
+                        if (NSUtils.IMPLEMENTOR.equals(name)) {
+                            String implementor = elem.getNodeValue();
+                            if (elem.getNodeValue().startsWith("#")) {
+                                //Reference
+                                implementor = elem.getNodeValue().substring(1);
+                            }
+                            if (StringUtils.isEmpty(bus)) {
+                                cxfBean.addArgument(NSUtils.createRef(context, implementor), Object.class.getName(), 0);
+                            } else {
+                                cxfBean.addArgument(NSUtils.createRef(context, implementor), Object.class.getName(), 1);
+                            }
+                        } else {
+                            setFirstChildAsProperty(elem, context, cxfBean, name);
+                        }
+                    }
+                }
+            }
+            elem = DOMUtils.getNextElement(elem);
+        }
+        if (!isAbstract) {
+            if (publish) {
+                cxfBean.setInitMethod("publish");
+            }
+            cxfBean.setDestroyMethod("stop");
+        }
+        // We don't want to delay the registration of our Server
+        cxfBean.setActivation(MutableBeanMetadata.ACTIVATION_EAGER);
+        LOG.debug("The final bean for construction " + cxfBean);
+        return cxfBean;
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/JaxWsNameSpaceHandler.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/JaxWsNameSpaceHandler.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/JaxWsNameSpaceHandler.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/JaxWsNameSpaceHandler.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,87 @@
+/*
+ * *
+ *  * 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.blueprint.jaxws;
+
+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.blueprint.core.CxfBusRegistry;
+import org.apache.cxf.blueprint.core.NSUtils;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JaxWsNameSpaceHandler implements NamespaceHandler {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(JaxWsNameSpaceHandler.class);
+
+    private CxfBusRegistry cxfBusRegistry;
+
+    private BlueprintContainer blueprintContainer;
+
+    @Override
+    public URL getSchemaLocation(String s) {
+        return getClass().getClassLoader().getResource("jaxws.xsd");
+    }
+
+    @Override
+    public Set<Class> getManagedClasses() {
+        return null;
+    }
+
+    @Override
+    public Metadata parse(Element element, ParserContext context) {
+
+        if (NSUtils.JAXWS_ENDPOINT.equals(element.getNodeName())) {
+            EndpointDefinitionParser endpointDefinitionParser = new EndpointDefinitionParser();
+            return endpointDefinitionParser.endPointParser(element, context, cxfBusRegistry);
+        } else {
+            if (NSUtils.JAXWS_SERVER.equals(element.getNodeName())) {
+                ServerDefinitionParser serverDefinitionParser = new ServerDefinitionParser();
+                return serverDefinitionParser.serverParser(element, context, cxfBusRegistry);
+            }
+        }
+        LOG.error("Invalid schema element sent to the NSHandler :" + element.getNodeName());
+        return null;
+    }
+
+    @Override
+    public ComponentMetadata decorate(Node node, ComponentMetadata componentMetadata, ParserContext parserContext) {
+        return null;
+    }
+
+    public void setCxfBusRegistry(CxfBusRegistry cxfBusRegistry) {
+        this.cxfBusRegistry = cxfBusRegistry;
+    }
+
+    public BlueprintContainer getBlueprintContainer() {
+        return blueprintContainer;
+    }
+
+    public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
+        this.blueprintContainer = blueprintContainer;
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/MetaDataBeans.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/MetaDataBeans.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/MetaDataBeans.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/MetaDataBeans.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,174 @@
+/*
+ * *
+ *  * 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.blueprint.jaxws;
+
+import java.util.List;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.frontend.ServerFactoryBean;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+
+class MetaDataBeans {
+
+    public static class CxfBlueprintServer extends ServerFactoryBean {
+
+        private BlueprintContainer blueprintContainer;
+
+        public CxfBlueprintServer() {
+            super();
+        }
+
+        public CxfBlueprintServer(ReflectionServiceFactoryBean fact) {
+            super(fact);
+        }
+
+        public void init() {
+            super.create();
+        }
+
+        //Destory method for blueprint
+        public void destroy() {
+            if (getServer() != null) {
+                getServer().destroy();
+                setServer(null);
+            }
+        }
+
+        public BlueprintContainer getBlueprintContainer() {
+            return blueprintContainer;
+        }
+
+        public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
+            this.blueprintContainer = blueprintContainer;
+        }
+
+        public List getInInterceptors() {
+            return super.getInInterceptors();
+        }
+
+        public void setInInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getInFaultInterceptors() {
+            return super.getInFaultInterceptors();
+        }
+
+        public void setInFaultInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInFaultInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getOutInterceptors() {
+            return super.getOutInterceptors();
+        }
+
+        public void setOutInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getOutInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getOutFaultInterceptors() {
+            return super.getOutFaultInterceptors();
+        }
+
+        public void setOutFaultInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInFaultInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+    }
+
+    public static class CxfBlueprintEndpoint extends EndpointImpl {
+
+        private BlueprintContainer blueprintContainer;
+
+        public CxfBlueprintEndpoint(Object implementor) {
+            super(null, implementor);
+        }
+
+        public CxfBlueprintEndpoint(Bus bus, Object implementor) {
+            super(bus, implementor);
+            setBus(bus);
+        }
+
+        @Override
+        public void stop() {
+            super.stop();
+            setBus(null);
+        }
+
+        public BlueprintContainer getBlueprintContainer() {
+            return blueprintContainer;
+        }
+
+        public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
+            this.blueprintContainer = blueprintContainer;
+        }
+
+        public List getInInterceptors() {
+            return super.getInInterceptors();
+        }
+
+        public void setInInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getInFaultInterceptors() {
+            return super.getInFaultInterceptors();
+        }
+
+        public void setInFaultInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInFaultInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getOutInterceptors() {
+            return super.getOutInterceptors();
+        }
+
+        public void setOutInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getOutInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+
+        public List getOutFaultInterceptors() {
+            return super.getOutFaultInterceptors();
+        }
+
+        public void setOutFaultInterceptors(List interceptors) {
+            for (Object o : interceptors) {
+                super.getInFaultInterceptors().add((Interceptor<? extends Message>) o);
+            }
+        }
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/ServerDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/ServerDefinitionParser.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/ServerDefinitionParser.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/ServerDefinitionParser.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,96 @@
+/*
+ * *
+ *  * 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.blueprint.jaxws;
+
+import java.util.UUID;
+import org.w3c.dom.Element;
+
+import org.apache.aries.blueprint.ParserContext;
+import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
+import org.apache.cxf.blueprint.core.BaseCxfParser;
+import org.apache.cxf.blueprint.core.CxfBusRegistry;
+import org.apache.cxf.blueprint.core.NSUtils;
+import org.apache.cxf.common.util.StringUtils;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ServerDefinitionParser extends BaseCxfParser {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(ServerDefinitionParser.class);
+
+    Metadata serverParser(Element element, ParserContext context, CxfBusRegistry registry) {
+
+        MutableBeanMetadata cxfBean = context.createMetadata(MutableBeanMetadata.class);
+
+        //Add a blueprintContainer ref
+
+        cxfBean.addProperty("blueprintContainer", NSUtils.createRef(context, "blueprintContainer"));
+
+        if (!StringUtils.isEmpty(NSUtils.getIdOrName(element))) {
+            cxfBean.setId(NSUtils.getIdOrName(element));
+        } else {
+            cxfBean.setId("cxf.server." + UUID.randomUUID().toString());
+        }
+        cxfBean.setRuntimeClass(MetaDataBeans.CxfBlueprintServer.class);
+
+        boolean setBus = parseAttributes(element, context, cxfBean, registry);
+        if (!setBus && hasBusProperty()) {
+            addBusWiringAttribute(cxfBean);
+        }
+        parseChildElements(element, context, cxfBean);
+
+        cxfBean.setInitMethod("init");
+        cxfBean.setDestroyMethod("destroy");
+
+        return cxfBean;
+    }
+
+    @Override
+    protected void mapElement(ParserContext ctx, MutableBeanMetadata bean, Element el, String name) {
+        if ("properties".equals(name)) {
+
+            Metadata map = NSUtils.parseMapElement(el, ctx);
+            bean.addProperty(name, map);
+        } else {
+            if ("executor".equals(name)) {
+                setFirstChildAsProperty(el, ctx, bean, "serviceFactory.executor");
+            } else {
+                if ("invoker".equals(name)) {
+                    setFirstChildAsProperty(el, ctx, bean, "serviceFactory.invoker");
+                } else {
+                    if ("binding".equals(name)) {
+                        setFirstChildAsProperty(el, ctx, bean, "bindingConfig");
+                    } else {
+                        if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name) || "outInterceptors".equals(name)
+                            || "outFaultInterceptors".equals(name) || "features".equals(name) || "schemaLocations".equals(name)) {
+                            MutableBeanMetadata listbean = ctx.createMetadata(MutableBeanMetadata.class);
+                            Metadata list = parseListData(ctx, listbean, el);
+                            LOG.debug("List data parsed as " + list);
+                            bean.addProperty(name, list);
+                        } else {
+                            setFirstChildAsProperty(el, ctx, bean, name);
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

Added: cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/WsAddressingHandler.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/WsAddressingHandler.java?rev=1084474&view=auto
==============================================================================
--- cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/WsAddressingHandler.java (added)
+++ cxf/sandbox/cxf-blueprint/jaxws/src/main/java/org/apache/cxf/blueprint/jaxws/WsAddressingHandler.java Wed Mar 23 04:28:40 2011
@@ -0,0 +1,61 @@
+/*
+ * *
+ *  * 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.blueprint.jaxws;
+
+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.osgi.service.blueprint.reflect.ComponentMetadata;
+import org.osgi.service.blueprint.reflect.Metadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class WsAddressingHandler implements NamespaceHandler {
+
+    private static final transient Logger LOG = LoggerFactory.getLogger(WsAddressingHandler.class);
+
+    @Override
+    public URL getSchemaLocation(String s) {
+        LOG.debug("Called getSchemas");
+        return getClass().getClassLoader().getResource("ws-addr-conf.xsd");
+    }
+
+    @Override
+    public Set<Class> getManagedClasses() {
+        LOG.debug("Returning managed classes.");
+        return null;
+    }
+
+    @Override
+    public Metadata parse(Element element, ParserContext parserContext) {
+        LOG.debug("Called parse");
+        return null;  //TODO
+    }
+
+    @Override
+    public ComponentMetadata decorate(Node node, ComponentMetadata componentMetadata, ParserContext parserContext) {
+        LOG.debug("Called decorate");
+        return null;  //TODO
+    }
+}



Mime
View raw message