You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by da...@apache.org on 2009/02/06 19:03:03 UTC

svn commit: r741656 - in /webservices/commons/trunk/modules/axiom: ./ modules/axiom-api/ modules/axiom-api/src/main/java/org/apache/axiom/injection/ modules/axiom-api/src/main/java/org/apache/axiom/om/ modules/axiom-api/src/main/java/org/apache/axiom/o...

Author: davidillsley
Date: Fri Feb  6 18:03:02 2009
New Revision: 741656

URL: http://svn.apache.org/viewvc?rev=741656&view=rev
Log:
Initial commit of proper OSGIification of Axiom.
Apologies up front for probably breaking something but a commit is overdue.

I'll submit a more full explanation of the changes to the list in the next couple of days.


Added:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/injection/
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/injection/FactoryInjectionComponent.java
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/OMAbstractFactoryTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/ServiceTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/StAXOMBuilderTest.java
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-run/
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-run/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-osgi/pom.xml
Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAbstractFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/StAXUtils.java
    webservices/commons/trunk/modules/axiom/modules/axiom-c14n/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
    webservices/commons/trunk/modules/axiom/modules/axiom-integration/pom.xml
    webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml
    webservices/commons/trunk/modules/axiom/pom.xml

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/pom.xml Fri Feb  6 18:03:02 2009
@@ -1,132 +1,139 @@
 <?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/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.ws.commons.axiom</groupId>
-        <artifactId>axiom</artifactId>
-        <version>SNAPSHOT</version>
-    </parent>
-    <artifactId>axiom-api</artifactId>
-    <name>Axiom API</name>
-    <version>SNAPSHOT</version>
-    <description>The Axiom API</description>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-activation_1.1_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-javamail_1.4_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>jaxen</groupId>
-            <artifactId>jaxen</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xml-apis</groupId>
-            <artifactId>xml-apis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-stax-api_1.0_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xmlunit</groupId>
-            <artifactId>xmlunit</artifactId>
-        </dependency>
-    </dependencies>
-    <build>
-        <resources>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-            <resource>
-                <directory>${project.build.directory}/legal-files</directory>
-            </resource>
-        </resources>
-        <plugins>
-            <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-legal-files</id>
-                        <phase>generate-resources</phase>
-                        <configuration>
-                            <tasks>
-                                <copy todir="${project.build.directory}/legal-files">
-                                    <fileset dir="../..">
-                                        <include name="LICENSE.txt" />
-                                        <include name="NOTICE.txt" />
-                                    </fileset>
-                                </copy>
-                            </tasks>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
-                        <manifestEntries>
-                           <!-- Put the correct Bundle-Version: in the manifest -->
-                           <Bundle-Version>${version}</Bundle-Version>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>
-            <!-- Attach a JAR with the test classes so that we can reuse them in other modules
-                 (see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <includes>
-                        <include>**/*Test.java</include>
-                        <include>**/*TestCase.java</include>
-                    </includes>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+	<!--
+		~ 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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.ws.commons.axiom</groupId>
+		<artifactId>axiom</artifactId>
+		<version>1.2.9-SNAPSHOT</version>
+	</parent>
+	<artifactId>axiom-api</artifactId>
+	<name>Axiom API</name>
+	<version>1.2.9-SNAPSHOT</version>
+	<description>The Axiom API</description>
+	<packaging>bundle</packaging>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-activation_1.1_spec</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-javamail_1.4_spec</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>jaxen</groupId>
+			<artifactId>jaxen</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>xml-apis</groupId>
+			<artifactId>xml-apis</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-stax-api_1.0_spec</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+		</dependency>
+                <dependency>
+                        <groupId>xmlunit</groupId>
+                        <artifactId>xmlunit</artifactId>
+                </dependency>
+	</dependencies>
+	<build>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+			</resource>
+			<resource>
+				<directory>${project.build.directory}/legal-files</directory>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-legal-files</id>
+						<phase>generate-resources</phase>
+						<configuration>
+							<tasks>
+								<copy todir="${project.build.directory}/legal-files">
+									<fileset dir="../..">
+										<include name="LICENSE.txt" />
+										<include name="NOTICE.txt" />
+									</fileset>
+								</copy>
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<excludeDependencies>true</excludeDependencies>
+					<instructions>
+						<_nouses>true</_nouses>
+						<_removeheaders>Private-Package</_removeheaders>
+						<Export-Package>*;-noimport:=true</Export-Package>
+						<Import-Package>org.jaxen.*;resolution:=optional,*</Import-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-scr-plugin</artifactId>
+			</plugin>
+			<!--
+				Attach a JAR with the test classes so that we can reuse them in
+				other modules (see
+				http://maven.apache.org/guides/mini/guide-attached-tests.html).
+			-->
+			<plugin>
+				<artifactId>maven-jar-plugin</artifactId>
+				<executions>
+					<execution>
+						<goals>
+							<goal>test-jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<includes>
+						<include>**/*Test.java</include>
+						<include>**/*TestCase.java</include>
+					</includes>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 </project>

Added: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/injection/FactoryInjectionComponent.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/injection/FactoryInjectionComponent.java?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/injection/FactoryInjectionComponent.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/injection/FactoryInjectionComponent.java Fri Feb  6 18:03:02 2009
@@ -0,0 +1,132 @@
+package org.apache.axiom.injection;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @scr.component name="factoryinjection.component" immediate="true"
+ * @scr.reference name="omfactory" interface="org.apache.axiom.om.OMFactory" cardinality="0..n" policy="dynamic" bind="setOMFactory" unbind="unsetOMFactory"
+ * @scr.reference name="soap12factory" interface="org.apache.axiom.soap.SOAPFactory" target="(axiom.soapVersion=*soap12*)" cardinality="0..n" policy="dynamic" bind="setSOAP12Factory" unbind="unsetSOAP12Factory"
+ * @scr.reference name="soap11factory" interface="org.apache.axiom.soap.SOAPFactory" target="(axiom.soapVersion=*soap11*)" cardinality="0..n" policy="dynamic" bind="setSOAP11Factory" unbind="unsetSOAP11Factory"
+ */
+public class FactoryInjectionComponent {
+
+	private static final Log log = LogFactory
+			.getLog(FactoryInjectionComponent.class);
+
+	public FactoryInjectionComponent() {
+		if (log.isDebugEnabled()) {
+			log.debug("FactoryInjectionComponent created");
+		}
+	}
+
+	private static List omFactories = null;
+	private static OMFactory currentOMFactory = null;
+	
+	private static List soap11Factories = null;
+	private static SOAPFactory currentSOAP11Factory = null;
+	
+	private static List soap12Factories = null;
+	private static SOAPFactory currentSOAP12Factory = null;
+
+	protected void setOMFactory(OMFactory omfactory) {
+		synchronized (FactoryInjectionComponent.class) {
+			if (omFactories == null) {
+				omFactories = new ArrayList();
+			}
+			// Special case llom - it's the default
+			if (omfactory.getClass().toString().contains("llom")) {
+				omFactories.add(0, omfactory);
+			} else {
+				omFactories.add(omfactory);
+			}
+			currentOMFactory = (OMFactory) omFactories.get(0);
+		}
+	}
+
+	protected void unsetOMFactory(OMFactory omfactory) {
+		synchronized (FactoryInjectionComponent.class) {
+			if (omFactories != null) {
+				omFactories.remove(omfactory);
+			}
+			if (omFactories.size() == 0) {
+				omFactories = null;
+			} else {
+				currentOMFactory = (OMFactory) omFactories.get(0);
+			}
+		}
+	}
+
+	public static OMFactory getOMFactory() {
+		return currentOMFactory;
+	}
+
+	protected void setSOAP12Factory(SOAPFactory soapfactory) {
+		synchronized (FactoryInjectionComponent.class) {
+			if (soap12Factories == null) {
+				soap12Factories = new ArrayList();
+			}
+			// Special case llom - it's the default
+			if (soapfactory.getClass().toString().contains("llom")) {
+				soap12Factories.add(0, soapfactory);
+			} else {
+				soap12Factories.add(soapfactory);
+			}
+			currentSOAP12Factory = (SOAPFactory) soap12Factories.get(0);
+		}
+	}
+
+	protected void unsetSOAP12Factory(SOAPFactory soapfactory) {
+		synchronized (FactoryInjectionComponent.class) {
+			if (soap12Factories != null) {
+				soap12Factories.remove(soapfactory);
+			}
+			if (soap12Factories.size() == 0) {
+				soap12Factories = null;
+			} else {
+				currentSOAP12Factory = (SOAPFactory) soap12Factories.get(0);
+			}
+		}
+	}
+	
+	public static SOAPFactory getSOAP12Factory() {
+		return currentSOAP12Factory;
+	}
+
+	protected void setSOAP11Factory(SOAPFactory soapfactory) {
+		synchronized (FactoryInjectionComponent.class) {
+			if (soap11Factories == null) {
+				soap11Factories = new ArrayList();
+			}
+			// Special case llom - it's the default
+			if (soapfactory.getClass().toString().contains("llom")) {
+				soap11Factories.add(0, soapfactory);
+			} else {
+				soap11Factories.add(soapfactory);
+			}
+			currentSOAP11Factory = (SOAPFactory) soap11Factories.get(0);
+		}
+	}
+
+	protected void unsetSOAP11Factory(SOAPFactory soapfactory) {
+		synchronized (FactoryInjectionComponent.class) {
+			if (soap11Factories != null) {
+				soap11Factories.remove(soapfactory);
+			}
+			if (soap11Factories.size() == 0) {
+				soap11Factories = null;
+			} else {
+				currentSOAP11Factory = (SOAPFactory) soap11Factories.get(0);
+			}
+		}
+	}
+	
+	public static SOAPFactory getSOAP11Factory() {
+		return currentSOAP11Factory;
+	}
+}

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAbstractFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAbstractFactory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAbstractFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMAbstractFactory.java Fri Feb  6 18:03:02 2009
@@ -19,6 +19,7 @@
 
 package org.apache.axiom.om;
 
+import org.apache.axiom.injection.FactoryInjectionComponent;
 import org.apache.axiom.soap.SOAPFactory;
 
 /**
@@ -90,9 +91,15 @@
      *                     or if the class can't be instantiated
      */
     public static OMFactory getOMFactory() {
-        if (defaultOMFactory != null) {
+        OMFactory of = FactoryInjectionComponent.getOMFactory();
+        if(of!=null){
+        	return of;
+        }
+    	
+    	if (defaultOMFactory != null) {
             return defaultOMFactory;
         }
+        
         String omFactory;
         try {
             omFactory = System.getProperty(OM_FACTORY_NAME_PROPERTY);
@@ -124,9 +131,15 @@
      *                     or if the class can't be instantiated
      */
     public static SOAPFactory getSOAP11Factory() {
+        SOAPFactory sf = FactoryInjectionComponent.getSOAP11Factory();
+        if(sf != null){
+        	return sf;
+        }
+        
         if (defaultSOAP11OMFactory != null) {
             return defaultSOAP11OMFactory;
         }
+        
         String omFactory;
         try {
             omFactory = System.getProperty(SOAP11_FACTORY_NAME_PROPERTY);
@@ -158,9 +171,15 @@
      *                     or if the class can't be instantiated
      */
     public static SOAPFactory getSOAP12Factory() {
-        if (defaultSOAP12OMFactory != null) {
+        SOAPFactory sf = FactoryInjectionComponent.getSOAP12Factory();
+        if(sf != null){
+        	return sf;
+        }
+        
+    	if (defaultSOAP12OMFactory != null) {
             return defaultSOAP12OMFactory;
         }
+        
         String omFactory;
         try {
             omFactory = System.getProperty(SOAP12_FACTORY_NAME_PROPERTY);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/StAXUtils.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/StAXUtils.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/StAXUtils.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/util/StAXUtils.java Fri Feb  6 18:03:02 2009
@@ -291,7 +291,14 @@
     
     // This has package access since it is used from within anonymous inner classes
     static XMLInputFactory newXMLInputFactory(boolean isNetworkDetached) {
-        XMLInputFactory factory = XMLInputFactory.newInstance();
+    	ClassLoader cl = (ClassLoader) AccessController.doPrivileged(
+                new PrivilegedAction() {
+                    public Object run()  {
+                        return Thread.currentThread().getContextClassLoader();
+                    }
+                }
+        );
+        XMLInputFactory factory = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory", cl);
         if (isNetworkDetached) {
             factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, 
                       Boolean.FALSE);

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-c14n/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-c14n/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-c14n/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-c14n/pom.xml Fri Feb  6 18:03:02 2009
@@ -22,13 +22,14 @@
     <parent>
         <artifactId>axiom</artifactId>
         <groupId>org.apache.ws.commons.axiom</groupId>
-        <version>SNAPSHOT</version>
+        <version>1.2.9-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.ws.commons.axiom</groupId>
     <artifactId>axiom-c14n</artifactId>
     <name>Axiom C14N</name>
-    <version>SNAPSHOT</version>
+    <version>1.2.9-SNAPSHOT</version>
+    <packaging>bundle</packaging>
     <description />
     <dependencies>
         <dependency>
@@ -90,6 +91,19 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<excludeDependencies>true</excludeDependencies>
+					<instructions>
+						<_nouses>true</_nouses>
+						<_removeheaders>Private-Package</_removeheaders>
+						<Export-Package>*;-noimport:=true</Export-Package>
+					</instructions>
+				</configuration>
+			</plugin>
         </plugins>
     </build>
 </project>

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml Fri Feb  6 18:03:02 2009
@@ -22,11 +22,12 @@
     <parent>
         <groupId>org.apache.ws.commons.axiom</groupId>
         <artifactId>axiom</artifactId>
-        <version>SNAPSHOT</version>
+        <version>1.2.9-SNAPSHOT</version>
     </parent>
     <artifactId>axiom-dom</artifactId>
     <name>Axiom DOM</name>
-    <version>SNAPSHOT</version>
+    <version>1.2.9-SNAPSHOT</version>
+    <packaging>bundle</packaging>
     <description>The Axiom DOM implementation.</description>
     <dependencies>
         <dependency>
@@ -102,18 +103,22 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
-                        <manifestEntries>
-                           <!-- Put the correct Bundle-Version: in the manifest -->
-                           <Bundle-Version>${version}</Bundle-Version>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>
+             <plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<excludeDependencies>true</excludeDependencies>
+					<instructions>
+						<_nouses>true</_nouses>
+						<Private-Package>org.apache.axiom.*</Private-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+				<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-scr-plugin</artifactId>
+			</plugin>
             <!-- Attach a JAR with the test classes so that we can reuse them in other modules
                  (see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
             <plugin>
@@ -137,4 +142,17 @@
             </plugin>
         </plugins>
     </build>
+   	<pluginRepositories>
+		<pluginRepository>
+			<id>snapshot-apache</id>
+			<name>Apache Snapshot repository</name>
+			<url>http://people.apache.org/repo/m2-snapshot-repository</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+		</pluginRepository>
+	</pluginRepositories>
 </project>

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/OMDOMFactory.java Fri Feb  6 18:03:02 2009
@@ -75,6 +75,10 @@
  *       not be used in conjunction with {@link OMAbstractFactory}. In particular,
  *       the <tt>om.factory</tt> system property must not be set to this class.</li> 
  * </ul>
+ * 
+ * @scr.component name="om.dom.component" immediate="true"
+ * @scr.service interface="org.apache.axiom.om.OMFactory"
+ * @scr.property name="implementationName" type="String" value="dom"
  */
 public class OMDOMFactory implements OMFactory {
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap11/SOAP11Factory.java Fri Feb  6 18:03:02 2009
@@ -44,6 +44,12 @@
 import org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl;
 import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
 
+/**
+ * @scr.component name="soap11factory.doom.component" immediate="true"
+ * @scr.service interface="org.apache.axiom.soap.SOAPFactory" 
+ * @scr.property name="axiom.soapVersion" type="String" value="soap11"
+ * @scr.property name="implementationName" type="String" value="doom"
+ */
 public class SOAP11Factory extends DOMSOAPFactory {
 
     public SOAP11Factory() {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/soap12/SOAP12Factory.java Fri Feb  6 18:03:02 2009
@@ -43,6 +43,12 @@
 import org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl;
 import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
 
+/**
+ * @scr.component name="soap12factory.doom.component" immediate="true"
+ * @scr.service interface="org.apache.axiom.soap.SOAPFactory" 
+ * @scr.property name="axiom.soapVersion" type="String" value="soap12"
+ * @scr.property name="implementationName" type="String" value="doom"
+ */
 public class SOAP12Factory extends DOMSOAPFactory {
 
     public SOAP12Factory() {

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml Fri Feb  6 18:03:02 2009
@@ -22,11 +22,12 @@
     <parent>
         <groupId>org.apache.ws.commons.axiom</groupId>
         <artifactId>axiom</artifactId>
-        <version>SNAPSHOT</version>
+        <version>1.2.9-SNAPSHOT</version>
     </parent>
     <artifactId>axiom-impl</artifactId>
     <name>Axiom Impl</name>
-    <version>SNAPSHOT</version>
+    <version>1.2.9-SNAPSHOT</version>
+    <packaging>bundle</packaging>
     <description>The Axiom default implementation.</description>
     <dependencies>
         <dependency>
@@ -103,17 +104,21 @@
                 </executions>
             </plugin>
             <plugin>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
-                        <manifestEntries>
-                           <!-- Put the correct Bundle-Version: in the manifest -->
-                           <Bundle-Version>${version}</Bundle-Version>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<excludeDependencies>true</excludeDependencies>
+					<instructions>
+						<_nouses>true</_nouses>
+						<Private-Package>org.apache.axiom.*</Private-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-scr-plugin</artifactId>
+			</plugin>
             <!-- Attach a JAR with the test classes so that we can reuse them in other modules
                  (see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
             <plugin>

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/OMLinkedListImplFactory.java Fri Feb  6 18:03:02 2009
@@ -47,7 +47,11 @@
 import java.util.Hashtable;
 import java.util.Map;
 
-/** Class OMLinkedListImplFactory */
+/** Class OMLinkedListImplFactory
+ * @scr.component name="om.llom.component" immediate="true"
+ * @scr.service interface="org.apache.axiom.om.OMFactory"
+ * @scr.property name="implementationName" type="String" value="llom"
+ */
 public class OMLinkedListImplFactory implements OMFactory {
 
     private static final String uriAndPrefixSeparator = ";";

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11Factory.java Fri Feb  6 18:03:02 2009
@@ -46,6 +46,12 @@
 import org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl;
 import org.apache.axiom.soap.impl.llom.SOAPMessageImpl;
 
+/**
+ * @scr.component name="soap11factory.llom.component" immediate="true"
+ * @scr.service interface="org.apache.axiom.soap.SOAPFactory"
+ * @scr.property name="implementationName" type="String" value="llom"
+ * @scr.property name="axiom.soapVersion" type="String" value="soap11"
+ */
 public class SOAP11Factory extends OMLinkedListImplFactory implements SOAPFactory {
     /** Eran Chinthaka (chinthaka@apache.org) */
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12Factory.java Fri Feb  6 18:03:02 2009
@@ -46,6 +46,12 @@
 import org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl;
 import org.apache.axiom.soap.impl.llom.SOAPMessageImpl;
 
+/**
+ * @scr.component name="soap12factory.llom.component" immediate="true"
+ * @scr.service interface="org.apache.axiom.soap.SOAPFactory"
+ * @scr.property name="implementationName" type="String" value="llom"
+ * @scr.property name="axiom.soapVersion" type="String" value="soap12"
+ */
 public class SOAP12Factory extends OMLinkedListImplFactory implements SOAPFactory {
     /** Eran Chinthaka (chinthaka@apache.org) */
 

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-integration/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-integration/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-integration/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-integration/pom.xml Fri Feb  6 18:03:02 2009
@@ -22,11 +22,11 @@
     <parent>
         <groupId>org.apache.ws.commons.axiom</groupId>
         <artifactId>axiom</artifactId>
-        <version>SNAPSHOT</version>
+        <version>1.2.9-SNAPSHOT</version>
     </parent>
     <artifactId>axiom-integration</artifactId>
     <name>Axiom Integration Test Suite</name>
-    <version>SNAPSHOT</version>
+    <version>1.2.9-SNAPSHOT</version>
     <description>
         This module contains tests that validate the interoperability of Axiom with
         other libraries.

Added: webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/pom.xml?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/pom.xml (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/pom.xml Fri Feb  6 18:03:02 2009
@@ -0,0 +1,95 @@
+<?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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.ws.commons.axiom</groupId>
+		<artifactId>axiom-osgi</artifactId>
+		<version>1.2.9-SNAPSHOT</version>
+	</parent>
+	<artifactId>axiom-osgi-build</artifactId>
+	<name>Axiom OSGI Test Suite - Build</name>
+	<version>1.2.9-SNAPSHOT</version>
+	<packaging>bundle</packaging>
+	<description>
+    </description>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ws.commons.axiom</groupId>
+			<artifactId>axiom-api</artifactId>
+			<version>${version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>
+			<version>1.1.0-SNAPSHOT</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<excludeDependencies>true</excludeDependencies>
+					<instructions>
+					<Export-Package>org.apache.axiom.*</Export-Package>
+						<Test-Suite>
+							org.apache.axiom.test.ServiceTest, org.apache.axiom.test.OMAbstractFactoryTest,
+							org.apache.axiom.test.StAXOMBuilderTest
+								</Test-Suite>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<repositories>
+		<repository>
+			<id>snapshot-apache</id>
+			<name>Apache Snapshot repository</name>
+			<url>http://people.apache.org/repo/m2-snapshot-repository</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+		</repository>
+	</repositories>
+	<pluginRepositories>
+		<pluginRepository>
+			<id>snapshot-apache</id>
+			<name>Apache Snapshot repository</name>
+			<url>http://people.apache.org/repo/m2-snapshot-repository</url>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+		</pluginRepository>
+	</pluginRepositories>
+</project>

Added: webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/OMAbstractFactoryTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/OMAbstractFactoryTest.java?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/OMAbstractFactoryTest.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/OMAbstractFactoryTest.java Fri Feb  6 18:03:02 2009
@@ -0,0 +1,19 @@
+package org.apache.axiom.test;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
+
+public class OMAbstractFactoryTest extends OSGiTestCase {
+
+	public void testgetOMFactory() throws Exception {
+		assertNotNull(OMAbstractFactory.getOMFactory());
+	}
+
+	public void testgetSOAP11Factory() throws Exception {
+		assertNotNull(OMAbstractFactory.getSOAP11Factory());
+	}
+
+	public void testgetSOAP12Factory() throws Exception {
+		assertNotNull(OMAbstractFactory.getSOAP12Factory());
+	}
+}

Added: webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/ServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/ServiceTest.java?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/ServiceTest.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/ServiceTest.java Fri Feb  6 18:03:02 2009
@@ -0,0 +1,62 @@
+package org.apache.axiom.test;
+
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
+import org.osgi.framework.ServiceReference;
+
+public class ServiceTest extends OSGiTestCase {
+	
+	public void testLLOMOMFactoryServicePresent() throws Exception {
+		ServiceReference[] omfactRefs = context
+				.getServiceReferences("org.apache.axiom.om.OMFactory", "(implementationName=llom)");
+		assertNotNull(omfactRefs);
+		assertEquals(3, omfactRefs.length);
+	}
+	
+	public void testDOOMOMFactoryServicePresent() throws Exception {
+		ServiceReference[] omfactRefs = context
+				.getServiceReferences("org.apache.axiom.om.OMFactory", "(implementationName=llom)");
+		assertNotNull(omfactRefs);
+		assertEquals(3, omfactRefs.length);
+	}
+	
+	public void testLLOMSOAP11FactoryServicePresent() throws Exception {
+		ServiceReference[] soapfactRefs = context.getServiceReferences(
+				"org.apache.axiom.soap.SOAPFactory", "(&(axiom.soapVersion=soap11)(implementationName=llom))");
+
+		assertNotNull(soapfactRefs);
+		assertEquals(1, soapfactRefs.length);
+		SOAPFactory sf = (SOAPFactory) context.getService(soapfactRefs[0]);
+		assertEquals("http://schemas.xmlsoap.org/soap/envelope/",sf.createSOAPEnvelope().getNamespace().getNamespaceURI());
+	}
+	
+	public void testDOOMSOAP11FactoryServicePresent() throws Exception {
+		ServiceReference[] soapfactRefs = context.getServiceReferences(
+				"org.apache.axiom.soap.SOAPFactory", "(&(axiom.soapVersion=soap11)(implementationName=doom))");
+
+		assertNotNull(soapfactRefs);
+		assertEquals(1, soapfactRefs.length);
+		SOAPFactory sf = (SOAPFactory) context.getService(soapfactRefs[0]);
+		assertEquals("http://schemas.xmlsoap.org/soap/envelope/",sf.createSOAPEnvelope().getNamespace().getNamespaceURI());
+	}
+	
+	public void testLLOMSOAP12FactoryServicePresent() throws Exception {
+		ServiceReference[] soapfactRefs = context.getServiceReferences(
+				"org.apache.axiom.soap.SOAPFactory", "(&(axiom.soapVersion=soap12)(implementationName=doom))");
+
+		assertNotNull(soapfactRefs);
+		assertEquals(1, soapfactRefs.length);
+		SOAPFactory sf = (SOAPFactory) context.getService(soapfactRefs[0]);
+		assertEquals("http://www.w3.org/2003/05/soap-envelope",sf.createSOAPEnvelope().getNamespace().getNamespaceURI());
+	}
+	
+	public void testDOOMSOAP12FactoryServicePresent() throws Exception {
+		ServiceReference[] soapfactRefs = context.getServiceReferences(
+				"org.apache.axiom.soap.SOAPFactory", "(&(axiom.soapVersion=soap12)(implementationName=llom))");
+
+		assertNotNull(soapfactRefs);
+		assertEquals(1, soapfactRefs.length);
+		SOAPFactory sf = (SOAPFactory) context.getService(soapfactRefs[0]);
+		assertEquals("http://www.w3.org/2003/05/soap-envelope",sf.createSOAPEnvelope().getNamespace().getNamespaceURI());
+	}
+}

Added: webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/StAXOMBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/StAXOMBuilderTest.java?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/StAXOMBuilderTest.java (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-build/src/main/java/org/apache/axiom/test/StAXOMBuilderTest.java Fri Feb  6 18:03:02 2009
@@ -0,0 +1,20 @@
+package org.apache.axiom.test;
+
+import java.io.ByteArrayInputStream;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.felix.ipojo.junit4osgi.OSGiTestCase;
+
+public class StAXOMBuilderTest extends OSGiTestCase {
+	
+	private String xmlString = "<a:testElement xmlns:a=\"http://test/namespace\" />";
+	
+	public void testLLOMOMFactoryServicePresent() throws Exception {
+		ByteArrayInputStream bais = new ByteArrayInputStream(xmlString.getBytes());
+		StAXOMBuilder sb = new StAXOMBuilder(bais);
+		OMElement oe = sb.getDocumentElement();
+		assertEquals("testElement",oe.getLocalName());
+		assertEquals("http://test/namespace", oe.getNamespace().getNamespaceURI());
+	}
+}

Added: webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-run/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-run/pom.xml?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-run/pom.xml (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-osgi/axiom-osgi-run/pom.xml Fri Feb  6 18:03:02 2009
@@ -0,0 +1,137 @@
+<?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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.ws.commons.axiom</groupId>
+		<artifactId>axiom-osgi</artifactId>
+		<version>1.2.9-SNAPSHOT</version>
+	</parent>
+	<artifactId>axiom-osgi-run</artifactId>
+	<name>Axiom OSGI Test Suite - Run</name>
+	<version>1.2.9-SNAPSHOT</version>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-activation_1.1_spec</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.specs</groupId>
+			<artifactId>geronimo-javamail_1.4_spec</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<!-- An OSGI aware version of the StAX API -->
+			<groupId>org.apache.servicemix.specs</groupId>
+			<artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
+			<version>1.1.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ws.commons.axiom</groupId>
+			<artifactId>axiom-api</artifactId>
+			<version>1.2.9-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ws.commons.axiom</groupId>
+			<artifactId>axiom-impl</artifactId>
+			<version>1.2.9-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ws.commons.axiom</groupId>
+			<artifactId>axiom-osgi-build</artifactId>
+			<version>1.2.9-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ws.commons.axiom</groupId>
+			<artifactId>axiom-dom</artifactId>
+			<version>1.2.9-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.ws.commons.axiom</groupId>
+			<artifactId>axiom-osgi-build</artifactId>
+			<version>1.2.9-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+	 	<dependency>
+			<groupId>org.codehaus.woodstox</groupId>
+			<artifactId>stax2-api</artifactId>
+			<version>3.0.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.codehaus.woodstox</groupId>
+			<artifactId>woodstox-core-asl</artifactId>
+			<version>4.0.1</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!--
+			I'd prefer to use these slf4j bundles rather than the springsource
+			repackaged commons-logging but there seems to be a bug in the version
+			of Apache Felix that the plugin pulls in which means slf4j won't
+			work. <dependency> <groupId>org.slf4j</groupId>
+			<artifactId>slf4j-nop</artifactId> <version>1.5.6</version>
+			<scope>test</scope> </dependency> <dependency>
+			<groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId>
+			<version>1.5.6</version> <scope>test</scope> </dependency>
+			<dependency> <groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId> <version>1.5.6</version>
+			<scope>test</scope> </dependency>
+		-->
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>com.springsource.org.apache.commons.logging</artifactId>
+			<version>1.1.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.scr</artifactId>
+			<version>1.0.6</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-junit4osgi-plugin</artifactId>
+				<version>1.1.0-SNAPSHOT</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>test</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+	<repositories>
+		<repository>
+			<id>com.springsource.repository.bundles.external</id>
+			<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
+			<url>http://repository.springsource.com/maven/bundles/external</url>
+		</repository>
+	</repositories>
+</project>

Added: webservices/commons/trunk/modules/axiom/modules/axiom-osgi/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-osgi/pom.xml?rev=741656&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-osgi/pom.xml (added)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-osgi/pom.xml Fri Feb  6 18:03:02 2009
@@ -0,0 +1,32 @@
+<?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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.ws.commons.axiom</groupId>
+		<artifactId>axiom</artifactId>
+		<version>1.2.9-SNAPSHOT</version>
+	</parent>
+	<artifactId>axiom-osgi</artifactId>
+	<name>Axiom OSGI Test Suite Parent</name>
+	<version>1.2.9-SNAPSHOT</version>
+<packaging>pom</packaging>
+    <modules>
+        <module>axiom-osgi-build</module>
+        <module>axiom-osgi-run</module>
+    </modules>
+</project>

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/pom.xml Fri Feb  6 18:03:02 2009
@@ -22,11 +22,11 @@
     <parent>
         <groupId>org.apache.ws.commons.axiom</groupId>
         <artifactId>axiom</artifactId>
-        <version>SNAPSHOT</version>
+        <version>1.2.9-SNAPSHOT</version>
     </parent>
     <artifactId>axiom-tests</artifactId>
     <name>Axiom Test Suite</name>
-    <version>SNAPSHOT</version>
+    <version>1.2.9-SNAPSHOT</version>
     <description>
         The Axiom test suite. This ought to be split into several parts and be made
         a part of axiom-api, axiom-impl and axiom-dom. However, that's not as easy

Modified: webservices/commons/trunk/modules/axiom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/pom.xml?rev=741656&r1=741655&r2=741656&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/pom.xml Fri Feb  6 18:03:02 2009
@@ -22,7 +22,7 @@
     <groupId>org.apache.ws.commons.axiom</groupId>
     <artifactId>axiom</artifactId>
     <name>Axiom</name>
-    <version>SNAPSHOT</version>
+    <version>1.2.9-SNAPSHOT</version>
     <packaging>pom</packaging>
     <description>AXIOM API</description>
     <url>http://ws.apache.org/commons/axiom/</url>
@@ -360,7 +360,20 @@
                     <artifactId>maven-release-plugin</artifactId>
                     <version>2.0-beta-8</version>
                 </plugin>
-                <plugin>
+              	<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-scr-plugin</artifactId>
+				<version>1.0.9-SNAPSHOT</version> <!-- Need to use 1.0.9 because need QDox 1.8. See FELIX-917 -->
+				<executions>
+					<execution>
+						<id>generate-scr-scrdescriptor</id>
+						<goals>
+							<goal>scr</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		  <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-assembly-plugin</artifactId>
                     <configuration>
@@ -568,6 +581,7 @@
         <module>modules/axiom-dom</module>
         <module>modules/axiom-c14n</module>
         <module>modules/axiom-tests</module>
+        <module>modules/axiom-osgi</module>
     </modules>
     <properties>
         <axiom.version>${pom.version}</axiom.version>