cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r738411 [1/2] - in /cxf/sandbox/dosgi: ./ distribution/single-bundle/ systests/ systests/basic/ systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/ systests/common/ systests/common/src/ systests/common/src/main/ systests/commo...
Date Wed, 28 Jan 2009 09:16:16 GMT
Author: davidb
Date: Wed Jan 28 09:16:15 2009
New Revision: 738411

URL: http://svn.apache.org/viewvc?rev=738411&view=rev
Log:
Split up the DOSGi system tests into two separate modules: one for the multi-bundle distro, another one for the single-bundle one. They share a common module where the actual test logic is defined.

Added:
    cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java   (with props)
    cxf/sandbox/dosgi/systests/common/
    cxf/sandbox/dosgi/systests/common/pom.xml   (with props)
    cxf/sandbox/dosgi/systests/common/src/
    cxf/sandbox/dosgi/systests/common/src/main/
    cxf/sandbox/dosgi/systests/common/src/main/java/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java   (with props)
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java   (with props)
    cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java   (with props)
    cxf/sandbox/dosgi/systests/single_bundle_distro/
    cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml   (with props)
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java   (with props)
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java   (with props)
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java   (with props)
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml   (with props)
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/remote-service/
    cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/remote-service/remote-services.xml   (with props)
Modified:
    cxf/sandbox/dosgi/distribution/single-bundle/pom.xml
    cxf/sandbox/dosgi/pom.xml
    cxf/sandbox/dosgi/systests/basic/pom.xml
    cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/BasicPublishHookTest.java
    cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/ListenerHookServiceListenerTest.java
    cxf/sandbox/dosgi/systests/pom.xml

Modified: cxf/sandbox/dosgi/distribution/single-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/distribution/single-bundle/pom.xml?rev=738411&r1=738410&r2=738411&view=diff
==============================================================================
--- cxf/sandbox/dosgi/distribution/single-bundle/pom.xml (original)
+++ cxf/sandbox/dosgi/distribution/single-bundle/pom.xml Wed Jan 28 09:16:15 2009
@@ -217,18 +217,22 @@
             <Bundle-Activator>org.apache.cxf.dosgi.singlebundle.AggregatedActivator</Bundle-Activator>
             <Include-Resource>
               @cxf-bundle-minimal-${cxf.version}.jar!/META-INF/spring.*,
+              @cxf-bundle-minimal-${cxf.version}.jar!/META-INF/cxf/*,
               {maven-resources}
             </Include-Resource>
             <Import-Package>
               org.osgi.*
-            </Import-Package> 
+            </Import-Package>
             <Export-Package>
               org.apache.cxf.dosgi.singlebundle;version="${pom.version}"
             </Export-Package>
             <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency>
             <Embed-Directory>lib</Embed-Directory>
             <_exportcontents>
+              org.jdom.*;version="1.0.0",
+              javax.xml.ws.*;version="2.1.0",
               org.apache.cxf.dosgi.*;version="${pom.version}",
+              org.apache.cxf.*;version="${cxf.version}",
               org.osgi.service.distribution;version="4.2.0",
               org.osgi.service.discovery;version="4.2.0",
               !*

Modified: cxf/sandbox/dosgi/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/pom.xml?rev=738411&r1=738410&r2=738411&view=diff
==============================================================================
--- cxf/sandbox/dosgi/pom.xml (original)
+++ cxf/sandbox/dosgi/pom.xml Wed Jan 28 09:16:15 2009
@@ -36,8 +36,8 @@
         <module>dsw</module>
         <module>discovery</module>
         <module>samples</module>
-        <module>systests</module>
         <module>distribution</module>
+        <module>systests</module>
     </modules>
  
     <reporting>

Modified: cxf/sandbox/dosgi/systests/basic/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/basic/pom.xml?rev=738411&r1=738410&r2=738411&view=diff
==============================================================================
--- cxf/sandbox/dosgi/systests/basic/pom.xml (original)
+++ cxf/sandbox/dosgi/systests/basic/pom.xml Wed Jan 28 09:16:15 2009
@@ -1,5 +1,5 @@
 <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">
-<!--
+  <!--
   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
@@ -16,54 +16,267 @@
   KIND, either express or implied. See the License for the
   specific language governing permissions and limitations
   under the License.
--->
+  -->
 
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.cxf</groupId>
+  <artifactId>cxf-dosgi-ri-systests-basic</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+  <name>Distributed OSGI RI Basic System Test</name>
+
+  <parent>
     <groupId>org.apache.cxf</groupId>
-    <artifactId>cxf-dosgi-ri-systests-basic</artifactId>
+    <artifactId>cxf-dosgi-ri-systests</artifactId>
     <version>1.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
-    <name>Distributed OSGI RI Basic System Test</name>
+    <relativePath>../pom.xml</relativePath>  
+  </parent>
+
+  <properties>
+    <topDirectoryLocation>../..</topDirectoryLocation>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-systests-common</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
 
-    <parent>
+    <dependency>
+      <groupId>org.apache.servicemix.kernel.testing</groupId>
+      <artifactId>org.apache.servicemix.kernel.testing.support</artifactId>
+      <version>1.0.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.main</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-dsw-cxf</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
       <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-dosgi-ri-systests</artifactId>
-      <version>1.0-SNAPSHOT</version>
-      <relativePath>../pom.xml</relativePath>  
-    </parent>
-
-    <properties>
-        <topDirectoryLocation>../..</topDirectoryLocation>
-    </properties>
-    
-    <dependencies>
-        <dependency> 
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.osgi.core</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency> 
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-dosgi-ri-samples-greeter-client</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.framework</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency> 
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies> 
+      <artifactId>cxf-bundle-minimal</artifactId>
+      <version>${cxf.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>xalan</groupId>
+          <artifactId>xalan</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>${spring.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>${spring.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+      <version>${spring.version}</version>
+      <scope>test</scope>
+    </dependency> 
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-test</artifactId>
+      <version>${spring.osgi.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-core</artifactId>
+      <version>${spring.osgi.version}</version>
+      <scope>test</scope>
+    </dependency> 
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-io</artifactId>
+      <version>${spring.osgi.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-extender</artifactId>
+      <version>${spring.osgi.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.osgi</groupId>
+      <artifactId>spring-osgi-annotation</artifactId>
+      <version>${spring.osgi.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>  
+      <groupId>org.apache.commons</groupId>             
+      <artifactId>com.springsource.org.apache.commons.logging</artifactId>
+      <version>1.1.1</version> 
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty</artifactId>
+      <version>${jetty.version}</version>
+    </dependency> 
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>${jetty.version}</version>
+    </dependency>      
+
+    <dependency> 
+      <groupId>org.apache.servicemix.specs</groupId> 
+      <artifactId>org.apache.servicemix.specs.locator</artifactId> 
+      <version>${servicemix.specs.version}</version> 
+    </dependency>
+    <dependency> 
+      <groupId>org.apache.servicemix.specs</groupId> 
+      <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId> 
+      <version>${servicemix.specs.version}</version> 
+    </dependency>
+    <dependency> 
+      <groupId>org.apache.servicemix.specs</groupId> 
+      <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId> 
+      <version>${servicemix.specs.version}</version> 
+    </dependency>
+    <dependency> 
+      <groupId>org.apache.servicemix.specs</groupId> 
+      <artifactId>org.apache.servicemix.specs.jaxws-api-2.1</artifactId> 
+      <version>${servicemix.specs.version}</version> 
+    </dependency>
+    <dependency> 
+      <groupId>org.apache.servicemix.specs</groupId> 
+      <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId> 
+      <version>${servicemix.specs.version}</version> 
+    </dependency> 
+
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-javamail_1.4_spec</artifactId>
+      <version>1.2</version>
+    </dependency> 
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-activation_1.1_spec</artifactId>
+      <version>1.0.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-servlet_2.5_spec</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.geronimo.specs</groupId>
+      <artifactId>geronimo-annotation_1.0_spec</artifactId>
+      <version>1.1.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.xmlschema</artifactId> 
+      <version>${xmlschema.bundle.version}</version> 
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId> 
+      <version>${xmlresolver.bundle.version}</version> 
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.neethi</artifactId> 
+      <version>${neethi.bundle.version}</version> 
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId> 
+      <version>${wsdl4j.bundle.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId> 
+      <version>${xmlsec.bundle.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.wss4j</artifactId> 
+      <version>${wss4j.bundle.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>xalan</groupId>
+          <artifactId>xalan</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>xerces</groupId>
+          <artifactId>xercesImpl</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId> 
+      <version>${jaxbimpl.bundle.version}</version> 
+    </dependency> 
+
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.asm</artifactId> 
+      <version>${asm.bundle.version}</version> 
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicemix.bundles</groupId> 
+      <artifactId>org.apache.servicemix.bundles.woodstox</artifactId> 
+      <version>${woodstox.bundle.version}</version> 
+    </dependency> 
 
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies> 
 </project>

Modified: cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/BasicPublishHookTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/BasicPublishHookTest.java?rev=738411&r1=738410&r2=738411&view=diff
==============================================================================
--- cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/BasicPublishHookTest.java (original)
+++ cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/BasicPublishHookTest.java Wed Jan 28 09:16:15 2009
@@ -18,151 +18,11 @@
   */
 package org.apache.cxf.dosgi.systests.basic;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.jar.Manifest;
+import org.apache.cxf.dosgi.systests.common.AbstractBasicPublishHookTest;
+import org.apache.cxf.dosgi.systests.common.Dependency;
 
-import org.apache.cxf.aegis.databinding.AegisDatabinding;
-import org.apache.cxf.dosgi.samples.greeter.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
-import org.apache.cxf.frontend.ClientProxyFactoryBean;
-import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.cm.ManagedService;
-
-public class BasicPublishHookTest extends AbstractIntegrationTest  {
-    protected Manifest getManifest() {
-        // let the testing framework create/load the manifest
-        Manifest mf = super.getManifest();
-        String importP = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
-        mf.getMainAttributes().putValue(Constants.IMPORT_PACKAGE,
-            importP + ",META-INF.cxf");
-        mf.getMainAttributes().putValue(Constants.DYNAMICIMPORT_PACKAGE, "*");
-
-        return mf;
-    }
-    
-    protected String[] getTestBundlesNames() {
-        return new String[] {
-                             
-            getBundle("org.apache.geronimo.specs", "geronimo-javamail_1.4_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-activation_1.1_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-annotation_1.0_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-ws-metadata_2.0_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-servlet_2.5_spec"),
-            
-            getBundle("org.apache.commons", "com.springsource.org.apache.commons.logging"),
-            getBundle("org.jdom", "com.springsource.org.jdom"),
-
-            getBundle("org.mortbay.jetty", "jetty"),
-            getBundle("org.mortbay.jetty", "jetty-util"),
-            
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.locator"),
-            
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.saaj-api-1.3"),
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.stax-api-1.0"),
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxb-api-2.1"),
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxws-api-2.1"),
-            
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.woodstox"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlsec"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wss4j"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wsdl4j"), 
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlresolver"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.neethi"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.asm"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxb-impl"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlschema"),
-            getBundle("org.apache.cxf", "cxf-bundle-minimal"),
-            getBundle("org.apache.cxf", "cxf-dosgi-ri-dsw-cxf"),
-            getBundle("org.apache.cxf", "cxf-dosgi-ri-samples-greeter-interface")
-        };
-    }
-    
-    public void testBasicInvocation() throws Exception {
-        
-        Dictionary<String, Object> props = new Hashtable<String, Object>();
-        props.put(Constants.SERVICE_PID, "cxf-dsw");
-        
-        ServiceReference[] srefs
-            = bundleContext.getAllServiceReferences(ManagedService.class.getName(),
-                                                    "(" 
-                                                    + Constants.SERVICE_PID
-                                                    + "="
-                                                    + "cxf-dsw"
-                                                    + ")");
-        assertNotNull(srefs);
-        assertEquals(1, srefs.length);
-        ManagedService ms = (ManagedService)bundleContext.getService(srefs[0]);
-        ms.updated(props);
-        
-        ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader(ClientProxyFactoryBean.class.getClassLoader());
-        installBundle("org.apache.cxf", "cxf-dosgi-ri-samples-greeter-impl", null, "jar");
-        
-        // TODO : get this address using a DistributionProvider interface
-        String address = "http://localhost:9090/greeter";
-        waitForEndpoint(address);
-        
-        //do the invocation using a CXF api 
-        GreeterService greeter1 = null;
-        try {
-            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
-            factory.setServiceClass(GreeterService.class);
-            factory.setAddress(address);
-            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
-            greeter1 = (GreeterService)factory.create();
-            useService(greeter1);
-        } finally {
-            Thread.currentThread().setContextClassLoader(contextLoader);
-        }
-            
-    }
-    
-    private void waitForEndpoint(String address) throws Exception {
-        
-        URL wsdlURL = new URL(address + "?wsdl");
-        
-        for (int counter = 1; counter <= 10; counter++) {
-            Thread.sleep(2000);
-            try {
-                BufferedReader is = new BufferedReader(
-                                        new InputStreamReader(wsdlURL.openStream()));
-                String line;
-                while ((line = is.readLine()) != null) {
-                    if (line.contains("definitions")) {
-                        System.out.println("Waited for endpoint for " + counter * 2 + " secs");
-                        return;
-                    }
-                }
-            } catch (IOException ex) {
-                // continue
-            }
-        }
-        System.out.println("Failed to retrieve service wsdl during 20 sec");
-    }
-    
-    private void useService(GreeterService greeter) throws Exception {
-        assertNotNull(greeter);
-        
-        Map<GreetingPhrase, String> greetings = greeter.greetMe("Fred");
-
-        assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
-        
-        try {
-            greeter.greetMe("Stranger");
-            fail("GreeterException has to be thrown");
-        } catch (GreeterException ex) {
-            assertEquals("Wrong exception message", 
-                         "GreeterService can not greet Stranger", 
-                         ex.toString());
-        }
+public class BasicPublishHookTest extends AbstractBasicPublishHookTest  {
+    protected Dependency [] getDistributionBundles() {
+        return DependencyResolver.getDistribution();
     }
 }

Added: cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java (added)
+++ cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,60 @@
+/** 
+  * 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.dosgi.systests.basic;
+
+import org.apache.cxf.dosgi.systests.common.Dependency;
+
+class DependencyResolver {
+    private DependencyResolver() {}
+
+    static Dependency [] getDistribution() {
+        return new Dependency [] {
+            new Dependency("org.apache.geronimo.specs", "geronimo-javamail_1.4_spec"),
+            new Dependency("org.apache.geronimo.specs", "geronimo-activation_1.1_spec"),
+            new Dependency("org.apache.geronimo.specs", "geronimo-annotation_1.0_spec"),
+            new Dependency("org.apache.geronimo.specs", "geronimo-ws-metadata_2.0_spec"),
+            new Dependency("org.apache.geronimo.specs", "geronimo-servlet_2.5_spec"),
+            
+            new Dependency("org.apache.commons", "com.springsource.org.apache.commons.logging"),
+            new Dependency("org.jdom", "com.springsource.org.jdom"),
+    
+            new Dependency("org.mortbay.jetty", "jetty"),
+            new Dependency("org.mortbay.jetty", "jetty-util"),
+            
+            new Dependency("org.apache.servicemix.specs", "org.apache.servicemix.specs.locator"),
+            
+            new Dependency("org.apache.servicemix.specs", "org.apache.servicemix.specs.saaj-api-1.3"),
+            new Dependency("org.apache.servicemix.specs", "org.apache.servicemix.specs.stax-api-1.0"),
+            new Dependency("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxb-api-2.1"),
+            new Dependency("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxws-api-2.1"),
+            
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.woodstox"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlsec"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wss4j"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wsdl4j"), 
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlresolver"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.neethi"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.asm"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxb-impl"),
+            new Dependency("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlschema"),
+            new Dependency("org.apache.cxf", "cxf-bundle-minimal"),
+            new Dependency("org.apache.cxf", "cxf-dosgi-ri-dsw-cxf"),            
+        };
+    }
+}

Propchange: cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/DependencyResolver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/ListenerHookServiceListenerTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/ListenerHookServiceListenerTest.java?rev=738411&r1=738410&r2=738411&view=diff
==============================================================================
--- cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/ListenerHookServiceListenerTest.java (original)
+++ cxf/sandbox/dosgi/systests/basic/src/test/java/org/apache/cxf/dosgi/systests/basic/ListenerHookServiceListenerTest.java Wed Jan 28 09:16:15 2009
@@ -18,185 +18,11 @@
   */
 package org.apache.cxf.dosgi.systests.basic;
 
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.FutureTask;
-import java.util.jar.Manifest;
+import org.apache.cxf.dosgi.systests.common.AbstractListenerHookServiceListenerTest;
+import org.apache.cxf.dosgi.systests.common.Dependency;
 
-import org.apache.cxf.aegis.databinding.AegisDatabinding;
-import org.apache.cxf.dosgi.samples.greeter.GreeterException;
-import org.apache.cxf.dosgi.samples.greeter.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
-import org.apache.cxf.endpoint.Server;
-import org.apache.cxf.frontend.ClientProxyFactoryBean;
-import org.apache.cxf.frontend.ServerFactoryBean;
-import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class ListenerHookServiceListenerTest extends AbstractIntegrationTest  {       
-    private FutureTask<Map<GreetingPhrase, String>> task;
-        
-    protected Manifest getManifest() {
-        // let the testing framework create/load the manifest
-        Manifest mf = super.getManifest();
-        String importP = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
-        mf.getMainAttributes().putValue(Constants.IMPORT_PACKAGE,
-            importP + ",META-INF.cxf");
-        mf.getMainAttributes().putValue(Constants.DYNAMICIMPORT_PACKAGE, "*");
-
-        return mf;
-    }
-    
-    protected String[] getTestBundlesNames() {
-        return new String[] {
-                             
-            getBundle("org.apache.geronimo.specs", "geronimo-javamail_1.4_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-activation_1.1_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-annotation_1.0_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-ws-metadata_2.0_spec"),
-            getBundle("org.apache.geronimo.specs", "geronimo-servlet_2.5_spec"),
-            
-            getBundle("org.apache.commons", "com.springsource.org.apache.commons.logging"),
-            getBundle("org.jdom", "com.springsource.org.jdom"),
-            
-            getBundle("org.mortbay.jetty", "jetty"),
-            getBundle("org.mortbay.jetty", "jetty-util"),
-            
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.locator"),
-            
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.saaj-api-1.3"),
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.stax-api-1.0"),
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxb-api-2.1"),
-            getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxws-api-2.1"),
-            
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.woodstox"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlsec"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wss4j"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wsdl4j"), 
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlresolver"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.neethi"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.asm"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxb-impl"),
-            getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.xmlschema"),
-            getBundle("org.apache.cxf", "cxf-bundle-minimal"),
-            getBundle("org.apache.cxf", "cxf-dosgi-ri-samples-greeter-interface")
-        };
-    }
-    
-    public void testBasicInvocation() throws Exception {
-
-        Thread.currentThread().setContextClassLoader(ClientProxyFactoryBean.class.getClassLoader());
-
-        Server server = null;
-        ServiceTracker tracker = null;
-        try {
-            server = startServer("http://localhost:9090/greeter", 
-                                 GreeterService.class, new GreeterServiceImpl());
-            
-            tracker = new ServiceTracker(bundleContext, 
-                                         GreeterService.class.getName(), null) {
-                @Override
-                public Object addingService(final ServiceReference reference) {
-                    Object result = super.addingService(reference);
-
-                    FutureTask<Map<GreetingPhrase, String>> future =
-                        new FutureTask<Map<GreetingPhrase, String>>(new Callable<Map<GreetingPhrase, String>>() {
-                          public Map<GreetingPhrase, String> call() {
-                            return useService(reference);
-                        }});
-                    future.run();
-                    setFuture(future);
-                    return result;
-                }
-            };
-            tracker.open();
-            // sleep for a bit
-            Thread.sleep(2000);
-            
-            // now install dsw
-            installBundle("org.apache.cxf", "cxf-dosgi-ri-dsw-cxf", null, "jar");
-            verifyGreeterResponse();
-        } finally {
-            if (tracker != null) {
-                tracker.close();
-            }
-            
-            if (server != null) {
-                server.getDestination().shutdown();
-                server.stop();
-            }
-            
-        }
-    }
-    
-    private Map<GreetingPhrase, String> useService(ServiceReference sref) {
-        GreeterService hs = (GreeterService)bundleContext.getService(sref);
-        assertNotNull(hs);
-        try {
-            return hs.greetMe("Fred");
-        } catch (Exception ex) {
-            fail("unexpected exception");
-        }
-        return null; 
-    }
-    
-    private void verifyGreeterResponse() throws Exception {
-        Map<GreetingPhrase, String> greetings = null;
-        synchronized (this) {
-            while (task == null) {
-                wait(500);    
-            }
-            greetings = task.get();
-        }
-        
-        assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
-    }
-    
-    private void setFuture(FutureTask<Map<GreetingPhrase, String>> future) {
-        synchronized (this) {
-            task = future;
-            notify();
-        }
-    }
-        
-    
-    private class GreeterServiceImpl implements GreeterService {
-
-        private final static String STRANGER_NAME = "Stranger";
-                
-        public Map<GreetingPhrase, String> greetMe(String name) 
-            throws GreeterException {
-
-            if (name.equals(STRANGER_NAME)) {
-                throw new GreeterException(name);
-            }
-            
-            Map<GreetingPhrase, String> greetings = 
-                new HashMap<GreetingPhrase, String>();
-            
-            greetings.put(new GreetingPhrase("Hello"), name);
-            greetings.put(new GreetingPhrase("Hoi"), name);
-            greetings.put(new GreetingPhrase("Hola"), name);
-            greetings.put(new GreetingPhrase("Bonjour"), name);
-            
-            
-            return greetings;
-        }
-
-    } 
-    
-    private Server startServer(String address, Class<?> type, Object impl) {
-        ServerFactoryBean factory = new ServerFactoryBean();
-        factory.setServiceClass(type);
-        factory.setAddress(address);
-        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
-        factory.setServiceBean(impl);
-        Server server = factory.create();
-        server.start();
-        return server;
+public class ListenerHookServiceListenerTest extends AbstractListenerHookServiceListenerTest  {       
+    protected Dependency [] getDistributionBundles() {
+        return DependencyResolver.getDistribution();
     }
-    
 }

Added: cxf/sandbox/dosgi/systests/common/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/common/pom.xml?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/common/pom.xml (added)
+++ cxf/sandbox/dosgi/systests/common/pom.xml Wed Jan 28 09:16:15 2009
@@ -0,0 +1,102 @@
+<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">
+  <!--
+  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.
+  -->
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.cxf</groupId>
+  <artifactId>cxf-dosgi-ri-systests-common</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <name>Distributed OSGI RI System Test Common Classes</name>
+
+  <parent>
+    <groupId>org.apache.cxf</groupId>
+    <artifactId>cxf-dosgi-ri-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <relativePath>../../parent/pom.xml</relativePath>  
+  </parent>
+
+  <properties>
+    <topDirectoryLocation>../..</topDirectoryLocation>
+    <bundle.import.package>*</bundle.import.package>
+    <bundle.export.package>
+      org.apache.cxf.dosgi.systests.common;version="${pom.version}"
+    </bundle.export.package>
+  </properties>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicemix.kernel.testing</groupId>
+      <artifactId>org.apache.servicemix.kernel.testing.support</artifactId>
+      <version>1.0.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.main</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency> 
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
+      <version>${project.version}</version>
+    </dependency> 
+
+    <dependency> 
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-impl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency> 
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-samples-greeter-client</artifactId>
+      <version>${project.version}</version>
+    </dependency> 
+  </dependencies> 
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-Name>CXF DOSGi System Tests Common Bundle</Bundle-Name>
+            <Bundle-Description>This bundle contains common classes used by the system tests.</Bundle-Description>
+            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+            <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
+            <Import-Package>${bundle.import.package}</Import-Package>
+            <Export-Package>${bundle.export.package}</Export-Package> 
+            <DynamicImport-Package>*</DynamicImport-Package>
+          </instructions>
+        </configuration>
+      </plugin> 
+    </plugins>
+  </build>    
+</project>

Propchange: cxf/sandbox/dosgi/systests/common/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/common/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/sandbox/dosgi/systests/common/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java (added)
+++ cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,149 @@
+/** 
+  * 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.dosgi.systests.common;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.Manifest;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.dosgi.samples.greeter.GreeterException;
+import org.apache.cxf.dosgi.samples.greeter.GreeterService;
+import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ManagedService;
+
+public abstract class AbstractBasicPublishHookTest extends AbstractIntegrationTest  {
+    protected Manifest getManifest() {
+        // let the testing framework create/load the manifest
+        Manifest mf = super.getManifest();
+        String importP = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
+        mf.getMainAttributes().putValue(Constants.IMPORT_PACKAGE, importP);
+        mf.getMainAttributes().putValue(Constants.DYNAMICIMPORT_PACKAGE, "*");
+
+        return mf;
+    }
+    
+    @Override
+    protected String[] getTestBundlesNames() {
+        List<String> deps = new ArrayList<String>();
+        
+        for (Dependency d : getDistributionBundles()) {
+            deps.add(getBundle(d.getGroupId(), d.getArtifactId()));
+        }
+
+        // ones needed by the test
+        deps.add(getBundle("org.apache.cxf", "cxf-dosgi-ri-systests-common"));
+        deps.add(getBundle("org.apache.cxf", "cxf-dosgi-ri-samples-greeter-interface"));
+
+        return deps.toArray(new String [deps.size()]);
+    }
+    
+    protected abstract Dependency [] getDistributionBundles();
+
+    public void testBasicInvocation() throws Exception {
+        
+        Dictionary<String, Object> props = new Hashtable<String, Object>();
+        props.put(Constants.SERVICE_PID, "cxf-dsw");
+        
+        ServiceReference[] srefs
+            = bundleContext.getAllServiceReferences(ManagedService.class.getName(),
+                                                    "(" 
+                                                    + Constants.SERVICE_PID
+                                                    + "="
+                                                    + "cxf-dsw"
+                                                    + ")");
+        assertNotNull(srefs);
+        assertEquals(1, srefs.length);
+        ManagedService ms = (ManagedService)bundleContext.getService(srefs[0]);
+        ms.updated(props);
+        
+        ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(ClientProxyFactoryBean.class.getClassLoader());
+        installBundle("org.apache.cxf", "cxf-dosgi-ri-samples-greeter-impl", null, "jar");
+        
+        // TODO : get this address using a DistributionProvider interface
+        String address = "http://localhost:9090/greeter";
+        waitForEndpoint(address);
+        
+        //do the invocation using a CXF api 
+        GreeterService greeter1 = null;
+        try {
+            ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
+            factory.setServiceClass(GreeterService.class);
+            factory.setAddress(address);
+            factory.getServiceFactory().setDataBinding(new AegisDatabinding());
+            greeter1 = (GreeterService)factory.create();
+            useService(greeter1);
+        } finally {
+            Thread.currentThread().setContextClassLoader(contextLoader);
+        }
+            
+    }
+    
+    private void waitForEndpoint(String address) throws Exception {
+        
+        URL wsdlURL = new URL(address + "?wsdl");
+        
+        for (int counter = 1; counter <= 10; counter++) {
+            Thread.sleep(2000);
+            try {
+                BufferedReader is = new BufferedReader(
+                                        new InputStreamReader(wsdlURL.openStream()));
+                String line;
+                while ((line = is.readLine()) != null) {
+                    if (line.contains("definitions")) {
+                        System.out.println("Waited for endpoint for " + counter * 2 + " secs");
+                        return;
+                    }
+                }
+            } catch (IOException ex) {
+                // continue
+            }
+        }
+        System.out.println("Failed to retrieve service wsdl during 20 sec");
+    }
+    
+    private void useService(GreeterService greeter) throws Exception {
+        assertNotNull(greeter);
+        
+        Map<GreetingPhrase, String> greetings = greeter.greetMe("Fred");
+
+        assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
+        
+        try {
+            greeter.greetMe("Stranger");
+            fail("GreeterException has to be thrown");
+        } catch (GreeterException ex) {
+            assertEquals("Wrong exception message", 
+                         "GreeterService can not greet Stranger", 
+                         ex.toString());
+        }
+    }
+}

Propchange: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractBasicPublishHookTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java (added)
+++ cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,184 @@
+/** 
+  * 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.dosgi.systests.common;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.FutureTask;
+import java.util.jar.Manifest;
+
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.dosgi.samples.greeter.GreeterException;
+import org.apache.cxf.dosgi.samples.greeter.GreeterService;
+import org.apache.cxf.dosgi.samples.greeter.GreetingPhrase;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.frontend.ServerFactoryBean;
+import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+public abstract class AbstractListenerHookServiceListenerTest extends AbstractIntegrationTest  {       
+    private FutureTask<Map<GreetingPhrase, String>> task;
+        
+    protected Manifest getManifest() {
+        // let the testing framework create/load the manifest
+        Manifest mf = super.getManifest();
+        String importP = mf.getMainAttributes().getValue(Constants.IMPORT_PACKAGE);
+        mf.getMainAttributes().putValue(Constants.IMPORT_PACKAGE, importP);
+        mf.getMainAttributes().putValue(Constants.DYNAMICIMPORT_PACKAGE, "*");
+
+        return mf;
+    }
+    
+    @Override
+    protected String[] getTestBundlesNames() {
+        List<String> deps = new ArrayList<String>();
+        
+        for (Dependency d : getDistributionBundles()) {
+            deps.add(getBundle(d.getGroupId(), d.getArtifactId()));
+        }
+
+        // ones needed by the test
+        deps.add(getBundle("org.apache.cxf", "cxf-dosgi-ri-systests-common"));
+        deps.add(getBundle("org.apache.cxf", "cxf-dosgi-ri-samples-greeter-interface"));
+
+        return deps.toArray(new String [deps.size()]);
+    }
+    
+    protected abstract Dependency [] getDistributionBundles();
+
+    public void testBasicInvocation() throws Exception {
+
+        Thread.currentThread().setContextClassLoader(ClientProxyFactoryBean.class.getClassLoader());
+
+        Server server = null;
+        ServiceTracker tracker = null;
+        try {
+            server = startServer("http://localhost:9090/greeter", 
+                                 GreeterService.class, new GreeterServiceImpl());
+            
+            tracker = new ServiceTracker(bundleContext, 
+                                         GreeterService.class.getName(), null) {
+                @Override
+                public Object addingService(final ServiceReference reference) {
+                    Object result = super.addingService(reference);
+
+                    FutureTask<Map<GreetingPhrase, String>> future =
+                        new FutureTask<Map<GreetingPhrase, String>>(new Callable<Map<GreetingPhrase, String>>() {
+                          public Map<GreetingPhrase, String> call() {
+                            return useService(reference);
+                        }});
+                    future.run();
+                    setFuture(future);
+                    return result;
+                }
+            };
+            tracker.open();
+            // sleep for a bit
+            Thread.sleep(2000);
+            
+            // now install dsw
+            installBundle("org.apache.cxf", "cxf-dosgi-ri-dsw-cxf", null, "jar");
+            verifyGreeterResponse();
+        } finally {
+            if (tracker != null) {
+                tracker.close();
+            }
+            
+            if (server != null) {
+                server.getDestination().shutdown();
+                server.stop();
+            }
+            
+        }
+    }
+    
+    private Map<GreetingPhrase, String> useService(ServiceReference sref) {
+        GreeterService hs = (GreeterService)bundleContext.getService(sref);
+        assertNotNull(hs);
+        try {
+            return hs.greetMe("Fred");
+        } catch (Exception ex) {
+            fail("unexpected exception");
+        }
+        return null; 
+    }
+    
+    private void verifyGreeterResponse() throws Exception {
+        Map<GreetingPhrase, String> greetings = null;
+        synchronized (this) {
+            while (task == null) {
+                wait(500);    
+            }
+            greetings = task.get();
+        }
+        
+        assertEquals("Fred", greetings.get(new GreetingPhrase("Hello")));
+    }
+    
+    private void setFuture(FutureTask<Map<GreetingPhrase, String>> future) {
+        synchronized (this) {
+            task = future;
+            notify();
+        }
+    }
+        
+    
+    private class GreeterServiceImpl implements GreeterService {
+
+        private final static String STRANGER_NAME = "Stranger";
+                
+        public Map<GreetingPhrase, String> greetMe(String name) 
+            throws GreeterException {
+
+            if (name.equals(STRANGER_NAME)) {
+                throw new GreeterException(name);
+            }
+            
+            Map<GreetingPhrase, String> greetings = 
+                new HashMap<GreetingPhrase, String>();
+            
+            greetings.put(new GreetingPhrase("Hello"), name);
+            greetings.put(new GreetingPhrase("Hoi"), name);
+            greetings.put(new GreetingPhrase("Hola"), name);
+            greetings.put(new GreetingPhrase("Bonjour"), name);
+            
+            
+            return greetings;
+        }
+
+    } 
+    
+    private Server startServer(String address, Class<?> type, Object impl) {
+        ServerFactoryBean factory = new ServerFactoryBean();
+        factory.setServiceClass(type);
+        factory.setAddress(address);
+        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
+        factory.setServiceBean(impl);
+        Server server = factory.create();
+        server.start();
+        return server;
+    }
+    
+}

Propchange: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractListenerHookServiceListenerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java (added)
+++ cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,37 @@
+/** 
+  * 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.dosgi.systests.common;
+
+public class Dependency {
+    private final String groupId;
+    private final String artifactId;
+    
+    public Dependency(String gid, String aid) {
+        groupId = gid;
+        artifactId = aid;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public String getArtifactId() {
+        return artifactId;
+    }
+}

Propchange: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/Dependency.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/sandbox/dosgi/systests/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/pom.xml?rev=738411&r1=738410&r2=738411&view=diff
==============================================================================
--- cxf/sandbox/dosgi/systests/pom.xml (original)
+++ cxf/sandbox/dosgi/systests/pom.xml Wed Jan 28 09:16:15 2009
@@ -49,31 +49,6 @@
             <systemPath>${basedir}/${topDirectoryLocation}/systests/equinox_libs/3.5m4/org.eclipse.osgi_3.5.0.v20081201-1815.jar</systemPath>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.servicemix.kernel.testing</groupId>
-            <artifactId>org.apache.servicemix.kernel.testing.support</artifactId>
-            <version>1.0.0</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.osgi</groupId>
-                    <artifactId>orgi_R4_core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.framework</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>org.apache.felix.main</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.springframework.osgi</groupId>
-                </exclusion>
-
-            </exclusions>
-        </dependency>
-
         <!--
         <dependency>
             <groupId>org.apache.felix</groupId>
@@ -97,208 +72,12 @@
            </dependency> -->
 
 
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-dosgi-ri-dsw-cxf</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency> 
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-dosgi-ri-samples-greeter-interface</artifactId>
-            <version>${project.version}</version>
-        </dependency> 
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-bundle-minimal</artifactId>
-            <version>${cxf.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>xalan</groupId>
-                    <artifactId>xalan</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-       <dependency>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring-core</artifactId>
-          <version>${spring.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring-context</artifactId>
-          <version>${spring.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring-beans</artifactId>
-          <version>${spring.version}</version>
-          <scope>test</scope>
-        </dependency> 
-        <dependency>
-          <groupId>org.springframework.osgi</groupId>
-          <artifactId>spring-osgi-test</artifactId>
-          <version>${spring.osgi.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <groupId>org.springframework.osgi</groupId>
-          <artifactId>spring-osgi-core</artifactId>
-          <version>${spring.osgi.version}</version>
-          <scope>test</scope>
-        </dependency> 
-        <dependency>
-          <groupId>org.springframework.osgi</groupId>
-          <artifactId>spring-osgi-io</artifactId>
-          <version>${spring.osgi.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <groupId>org.springframework.osgi</groupId>
-          <artifactId>spring-osgi-extender</artifactId>
-          <version>${spring.osgi.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <groupId>org.springframework.osgi</groupId>
-          <artifactId>spring-osgi-annotation</artifactId>
-          <version>${spring.osgi.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>  
-           <groupId>org.apache.commons</groupId>             
-           <artifactId>com.springsource.org.apache.commons.logging</artifactId>
-           <version>1.1.1</version> 
-        </dependency>
-        <dependency>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>jetty</artifactId>
-            <version>${jetty.version}</version>
-        </dependency> 
-        <dependency>
-            <groupId>org.mortbay.jetty</groupId>
-            <artifactId>jetty-util</artifactId>
-            <version>${jetty.version}</version>
-        </dependency>      
-
-        <dependency> 
-           <groupId>org.apache.servicemix.specs</groupId> 
-           <artifactId>org.apache.servicemix.specs.locator</artifactId> 
-           <version>${servicemix.specs.version}</version> 
-        </dependency>
-        <dependency> 
-           <groupId>org.apache.servicemix.specs</groupId> 
-           <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId> 
-           <version>${servicemix.specs.version}</version> 
-        </dependency>
-        <dependency> 
-           <groupId>org.apache.servicemix.specs</groupId> 
-           <artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId> 
-           <version>${servicemix.specs.version}</version> 
-        </dependency>
-        <dependency> 
-           <groupId>org.apache.servicemix.specs</groupId> 
-           <artifactId>org.apache.servicemix.specs.jaxws-api-2.1</artifactId> 
-           <version>${servicemix.specs.version}</version> 
-        </dependency>
-        <dependency> 
-           <groupId>org.apache.servicemix.specs</groupId> 
-           <artifactId>org.apache.servicemix.specs.saaj-api-1.3</artifactId> 
-           <version>${servicemix.specs.version}</version> 
-        </dependency> 
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-javamail_1.4_spec</artifactId>
-            <version>1.2</version>
-        </dependency> 
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-activation_1.1_spec</artifactId>
-            <version>1.0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
-            <version>1.1.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <version>1.1.2</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.0_spec</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-
-        <dependency>
-           <groupId>org.apache.servicemix.bundles</groupId> 
-           <artifactId>org.apache.servicemix.bundles.xmlschema</artifactId> 
-           <version>${xmlschema.bundle.version}</version> 
-        </dependency>
-        <dependency>
-           <groupId>org.apache.servicemix.bundles</groupId> 
-           <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId> 
-           <version>${xmlresolver.bundle.version}</version> 
-        </dependency>
-        <dependency>
-           <groupId>org.apache.servicemix.bundles</groupId> 
-           <artifactId>org.apache.servicemix.bundles.neethi</artifactId> 
-           <version>${neethi.bundle.version}</version> 
-        </dependency>
-        <dependency>
-          <groupId>org.apache.servicemix.bundles</groupId> 
-          <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId> 
-          <version>${wsdl4j.bundle.version}</version>
-        </dependency>
-
-        <dependency>
-          <groupId>org.apache.servicemix.bundles</groupId> 
-          <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId> 
-          <version>${xmlsec.bundle.version}</version>
-        </dependency>
-
-        <dependency>
-          <groupId>org.apache.servicemix.bundles</groupId> 
-          <artifactId>org.apache.servicemix.bundles.wss4j</artifactId> 
-          <version>${wss4j.bundle.version}</version>
-          <exclusions>
-             <exclusion>
-                 <groupId>xalan</groupId>
-                 <artifactId>xalan</artifactId>
-              </exclusion>
-             <exclusion>
-              <groupId>xerces</groupId>
-               <artifactId>xercesImpl</artifactId>
-             </exclusion>
-          </exclusions>
-        </dependency>
-
-        <dependency>
-           <groupId>org.apache.servicemix.bundles</groupId> 
-           <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId> 
-           <version>${jaxbimpl.bundle.version}</version> 
-        </dependency> 
-
-        <dependency>
-           <groupId>org.apache.servicemix.bundles</groupId> 
-           <artifactId>org.apache.servicemix.bundles.asm</artifactId> 
-           <version>${asm.bundle.version}</version> 
-        </dependency>
-        
-        <dependency>
-           <groupId>org.apache.servicemix.bundles</groupId> 
-           <artifactId>org.apache.servicemix.bundles.woodstox</artifactId> 
-           <version>${woodstox.bundle.version}</version> 
-        </dependency> 
      </dependencies> 
 
     <modules>
+        <module>common</module>
         <module>basic</module>
+        <module>single_bundle_distro</module>
     </modules>
 
     <build>

Added: cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml (added)
+++ cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml Wed Jan 28 09:16:15 2009
@@ -0,0 +1,106 @@
+<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">
+  <!--
+  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.
+  -->
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.cxf</groupId>
+  <artifactId>cxf-dosgi-ri-systests-singlebundle-distro</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+  <name>Distributed OSGI RI Basic System Test using Single Bundle Distro</name>
+
+  <parent>
+    <groupId>org.apache.cxf</groupId>
+    <artifactId>cxf-dosgi-ri-systests</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>  
+  </parent>
+
+  <properties>
+    <topDirectoryLocation>../..</topDirectoryLocation>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-systests-common</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicemix.kernel.testing</groupId>
+      <artifactId>org.apache.servicemix.kernel.testing.support</artifactId>
+      <version>1.0.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.main</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.osgi.core</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-dosgi-ri-singlebundle-distribution</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>org.apache.felix.framework</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>xalan</groupId>
+          <artifactId>xalan</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>xml-apis</groupId>
+          <artifactId>xml-apis</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>xerces</groupId>
+          <artifactId>xercesImpl</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies> 
+</project>

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java (added)
+++ cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,28 @@
+/** 
+  * 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.dosgi.systests.singlebundle;
+
+import org.apache.cxf.dosgi.systests.common.AbstractBasicPublishHookTest;
+import org.apache.cxf.dosgi.systests.common.Dependency;
+
+public class BasicPublishHookTest extends AbstractBasicPublishHookTest  {
+    protected Dependency [] getDistributionBundles() {
+        return DependencyResolver.getDistribution();
+    }
+}

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/BasicPublishHookTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java (added)
+++ cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,31 @@
+/** 
+  * Licensed to the Apache Software Foundation (ASF) under one 
+  * or more contributor license agreements. See the NOTICE file 
+  * distributed with this work for additional information 
+  * regarding copyright ownership. The ASF licenses this file 
+  * to you under the Apache License, Version 2.0 (the 
+  * "License"); you may not use this file except in compliance 
+  * with the License. You may obtain a copy of the License at 
+  * 
+  * http://www.apache.org/licenses/LICENSE-2.0 
+  * 
+  * Unless required by applicable law or agreed to in writing, 
+  * software distributed under the License is distributed on an 
+  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+  * KIND, either express or implied. See the License for the 
+  * specific language governing permissions and limitations 
+  * under the License. 
+  */
+package org.apache.cxf.dosgi.systests.singlebundle;
+
+import org.apache.cxf.dosgi.systests.common.Dependency;
+
+class DependencyResolver {
+    private DependencyResolver() {}
+
+    static Dependency [] getDistribution() {
+        return new Dependency [] {
+            new Dependency("org.apache.cxf", "cxf-dosgi-ri-singlebundle-distribution"),
+        };
+    }
+}

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/DependencyResolver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java (added)
+++ cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java Wed Jan 28 09:16:15 2009
@@ -0,0 +1,28 @@
+/** 
+  * 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.dosgi.systests.singlebundle;
+
+import org.apache.cxf.dosgi.systests.common.AbstractListenerHookServiceListenerTest;
+import org.apache.cxf.dosgi.systests.common.Dependency;
+
+public class ListenerHookServiceListenerTest extends AbstractListenerHookServiceListenerTest  {       
+    protected Dependency [] getDistributionBundles() {
+        return DependencyResolver.getDistribution();
+    }
+}

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/java/org/apache/cxf/dosgi/systests/singlebundle/ListenerHookServiceListenerTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml?rev=738411&view=auto
==============================================================================
--- cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml (added)
+++ cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml Wed Jan 28 09:16:15 2009
@@ -0,0 +1,75 @@
+<?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.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:p="http://cxf.apache.org/policy"
+       xmlns:wsp="http://www.w3.org/ns/ws-policy"
+       xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+       xsi:schemaLocation="
+       http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+       http://www.w3.org/ns/ws-policy http://www.w3.org/2007/02/ws-policy.xsd
+       http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+       http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <bean id="intentMap" class="org.apache.cxf.dosgi.dsw.qos.IntentMap">
+       <property name="intents">
+         <map>
+           <entry key="reliability" value-ref="reliableMessaging"/>
+           <entry key="decoupled" value-ref="decoupledAddressing"/>
+         </map>
+       </property>
+    </bean>
+
+    <p:policies id="reliableMessaging">
+        <wsp:PolicyReference URI="#ReliabilityPolicy"/>
+        <wsp:PolicyReference URI="#DecoupledPolicy"/>
+        <wsp:PolicyReference URI="#AddressingPolicy"/>
+    </p:policies>
+
+    <p:policies id="decoupledAddressing">
+        <wsp:PolicyReference URI="#DecoupledPolicy"/>
+        <wsp:PolicyReference URI="#AddressingPolicy"/>
+    </p:policies>
+
+    <wsp:Policy wsu:Id="ReliabilityPolicy">
+        <wsrm-policy:RMAssertion>
+            <wsrm-policy:BaseRetransmissionInterval Milliseconds="4000"/>
+            <wsrm-policy:AcknowledgementInterval Milliseconds="2000" />
+        </wsrm-policy:RMAssertion>
+    </wsp:Policy>
+
+    <wsp:Policy wsu:Id="DecoupledPolicy">
+        <wsp:ExactlyOne>
+            <http:client DecoupledEndpoint="http://localhost:9970/decoupled_endpoint"/>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+
+    <wsp:Policy wsu:Id="AddressingPolicy"
+        xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+        <wsam:Addressing>
+            <wsp:Policy />
+        </wsam:Addressing>
+    </wsp:Policy>
+
+</beans>

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/sandbox/dosgi/systests/single_bundle_distro/src/test/resources/OSGI-INF/cxf/intents/intent-map.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message