You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by cs...@apache.org on 2013/08/27 09:54:23 UTC

svn commit: r1517758 - in /cxf/dosgi/trunk: parent/ systests2/common/ systests2/multi-bundle/ systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/ systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/

Author: cschneider
Date: Tue Aug 27 07:54:22 2013
New Revision: 1517758

URL: http://svn.apache.org/r1517758
Log:
DOSGI-205 Upgrade zo pax exam 3.2.0, fix rest test

Added:
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java   (with props)
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java   (with props)
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java   (with props)
Modified:
    cxf/dosgi/trunk/parent/pom.xml
    cxf/dosgi/trunk/systests2/common/pom.xml
    cxf/dosgi/trunk/systests2/multi-bundle/pom.xml
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java
    cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java

Modified: cxf/dosgi/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/parent/pom.xml?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/parent/pom.xml (original)
+++ cxf/dosgi/trunk/parent/pom.xml Tue Aug 27 07:54:22 2013
@@ -67,7 +67,7 @@
         <jaxbimpl.bundle.version>2.2.1.1_2</jaxbimpl.bundle.version>
         <slf4j.version>1.6.4</slf4j.version>
         <felix.plugin.version>2.4.0</felix.plugin.version>
-        <exam.version>2.6.0</exam.version>
+        <exam.version>3.2.0</exam.version>
         <cxf.resources.base.path />
         <cxf.checkstyle.extension />
     </properties>
@@ -159,9 +159,9 @@
             </dependency>
 
             <dependency>
-                <groupId>org.ops4j.pax.swissbox</groupId>
-                <artifactId>pax-swissbox-tinybundles</artifactId>
-                <version>1.3.1</version>
+                <groupId>org.ops4j.pax.tinybundles</groupId>
+                <artifactId>tinybundles</artifactId>
+                <version>2.0.0</version>
             </dependency>
         </dependencies>
     </dependencyManagement>

Modified: cxf/dosgi/trunk/systests2/common/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/common/pom.xml?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/common/pom.xml (original)
+++ cxf/dosgi/trunk/systests2/common/pom.xml Tue Aug 27 07:54:22 2013
@@ -44,10 +44,8 @@
         </dependency>
 
         <dependency>
-            <groupId>org.ops4j.pax.swissbox</groupId>
-            <artifactId>pax-swissbox-tinybundles</artifactId>
-            <version>1.3.1</version>
-            <scope>provided</scope>
+           <groupId>org.ops4j.pax.tinybundles</groupId>
+           <artifactId>tinybundles</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>

Modified: cxf/dosgi/trunk/systests2/multi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/pom.xml?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/pom.xml Tue Aug 27 07:54:22 2013
@@ -57,6 +57,12 @@
             <artifactId>pax-exam-link-mvn</artifactId>
             <scope>test</scope>
         </dependency>
+        
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>1.6.0</version>
+        </dependency>
 
         <dependency>
             <groupId>org.eclipse</groupId>
@@ -71,11 +77,6 @@
          -->
 
         <dependency>
-            <groupId>org.ops4j.pax.swissbox</groupId>
-            <artifactId>pax-swissbox-tinybundles</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>org.apache.cxf.dosgi.systests</groupId>
             <artifactId>cxf-dosgi-ri-systests2-common</artifactId>
             <version>${project.version}</version>

Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java Tue Aug 27 07:54:22 2013
@@ -35,10 +35,10 @@ import org.apache.cxf.dosgi.systests2.mu
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 
@@ -48,14 +48,14 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.streamBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
-@RunWith(JUnit4TestRunner.class)
+@RunWith(PaxExam.class)
 public class TestCustomIntent extends AbstractDosgiTest {
 
     @Inject
     BundleContext bundleContext;
 
     protected static InputStream getCustomIntentBundle() {
-        return TinyBundles.newBundle()
+        return TinyBundles.bundle()
                 .add(CustomIntentActivator.class)
                 .add(CustomFeature.class)
                 .add(AddGreetingPhraseInterceptor.class)
@@ -64,7 +64,7 @@ public class TestCustomIntent extends Ab
     }
 
     protected static InputStream getServiceBundle() {
-        return TinyBundles.newBundle()
+        return TinyBundles.bundle()
                 .add(GreeterServiceWithCustomIntentActivator.class)
                 .add(EmptyGreeterService.class)
                 .set(Constants.BUNDLE_SYMBOLICNAME, "EmptyGreeterService")

Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java Tue Aug 27 07:54:22 2013
@@ -30,9 +30,9 @@ import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.data.Stat;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
 
@@ -40,7 +40,7 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
-@RunWith(JUnit4TestRunner.class)
+@RunWith(PaxExam.class)
 public class TestDiscoveryExport extends AbstractDosgiTest {
 
     private static final String GREETER_ZOOKEEPER_NODE

Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java Tue Aug 27 07:54:22 2013
@@ -18,26 +18,31 @@
  */
 package org.apache.cxf.dosgi.systests2.multi;
 
+import java.io.InputStream;
+
 import javax.inject.Inject;
 
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService;
-import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase;
-import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.dosgi.systests2.multi.rest.RestTranslate;
+import org.apache.cxf.dosgi.systests2.multi.rest.RestTranslateImpl;
+import org.apache.cxf.dosgi.systests2.multi.rest.TranslateActivator;
+import org.apache.cxf.jaxrs.client.WebClient;
 import org.junit.Assert;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
 
 import static org.ops4j.pax.exam.CoreOptions.frameworkStartLevel;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.provision;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
-@RunWith(JUnit4TestRunner.class)
+@RunWith(PaxExam.class)
 public class TestExportRestService extends AbstractDosgiTest {
 
     @Inject
@@ -51,31 +56,35 @@ public class TestExportRestService exten
                 MultiBundleTools.getDistroWithDiscovery(),
                 systemProperty("org.osgi.service.http.port").value(webPort),
                 systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
-                mavenBundle().groupId("org.apache.servicemix.bundles")
-                    .artifactId("org.apache.servicemix.bundles.junit").version("4.9_2"),
-                mavenBundle().groupId("org.apache.cxf.dosgi.samples")
-                    .artifactId("cxf-dosgi-ri-samples-greeter-rest-interface").versionAsInProject(),
                 mavenBundle().groupId("org.apache.cxf.dosgi.samples")
-                    .artifactId("cxf-dosgi-ri-samples-greeter-rest-impl").versionAsInProject(),
-                frameworkStartLevel(100)
+                    .artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject(),
+                CoreOptions.junitBundles(),
+                provision(getServiceBundle()),
+                frameworkStartLevel(100),
+                //CoreOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005")
         };
     }
+    
+    private InputStream getServiceBundle() {
+        return TinyBundles.bundle()
+                .add(RestTranslate.class)
+                .add(RestTranslateImpl.class)
+                .add(TranslateActivator.class)
+                .set(Constants.BUNDLE_SYMBOLICNAME, "RestTranslate")
+                .set(Constants.BUNDLE_ACTIVATOR, TranslateActivator.class.getName())
+                .build(TinyBundles.withBnd());
+    }
 
     /**
      * FIXME This test fails.. 
      */
     @Test
-    @Ignore
     public void testEndpointAvailable() throws Exception {
-        waitWebPage("http://localhost:" + webPort + "/greeter/greeter/greeting/Chris");
+        waitWebPage("http://localhost:" + webPort + "/cxf/translate");
         try {
-            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
-            GreeterService greeterService = JAXRSClientFactory.create("http://localhost:" + webPort + "/greeter",
-                                                                      GreeterService.class);
-            GreeterInfo result = greeterService.greetMe("Chris");
-            GreetingPhrase greeting = result.getGreetings().get(0);
-            Assert.assertEquals("Hello", greeting.getPhrase());
-            Assert.assertEquals("Chris", greeting.getName());
+            WebClient client = WebClient.create("http://localhost:" + webPort + "/cxf/translate/hello");
+            String result = client.get(String.class);
+            Assert.assertEquals("hallo", result);
         } catch (Exception e) {
             e.printStackTrace();
             throw new RuntimeException(e.getMessage());

Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java Tue Aug 27 07:54:22 2013
@@ -38,16 +38,16 @@ import org.apache.cxf.frontend.ClientPro
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
 import org.osgi.framework.BundleContext;
 
 import static org.ops4j.pax.exam.CoreOptions.frameworkStartLevel;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
-@RunWith(JUnit4TestRunner.class)
+@RunWith(PaxExam.class)
 public class TestExportService extends AbstractDosgiTest {
 
     @Inject

Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java?rev=1517758&r1=1517757&r2=1517758&view=diff
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java (original)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java Tue Aug 27 07:54:22 2013
@@ -40,10 +40,10 @@ import org.apache.cxf.frontend.ServerFac
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
@@ -53,7 +53,7 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.CoreOptions.provision;
 import static org.ops4j.pax.exam.CoreOptions.systemProperty;
 
-@RunWith(JUnit4TestRunner.class)
+@RunWith(PaxExam.class)
 public class TestImportService extends AbstractDosgiTest {
 
     @Inject
@@ -79,7 +79,7 @@ public class TestImportService extends A
     }
 
     protected static InputStream createServiceConsumerBundle() {
-        return TinyBundles.newBundle()
+        return TinyBundles.bundle()
             .add(MyActivator.class)
             .add(MyServiceTracker.class)
             .add(StartServiceTracker.class)
@@ -109,7 +109,6 @@ public class TestImportService extends A
         //    a service property.
 
         // Set up a Server in the test
-        Thread.sleep(10000);
         ServerFactoryBean factory = new ServerFactoryBean();
         factory.setServiceClass(GreeterService.class);
         factory.setAddress("http://localhost:9191/grrr");
@@ -127,6 +126,7 @@ public class TestImportService extends A
             bundleContext.registerService(Object.class.getName(), new Object(), props);
 
             // Wait for the service tracker in the test bundle to register a service with the test result
+            @SuppressWarnings("rawtypes")
             ServiceReference ref = waitService(bundleContext, String.class, "(testResult=test1)", 20);
             Assert.assertEquals("HiOSGi;exception", ref.getProperty("result"));
         } finally {

Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java?rev=1517758&view=auto
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java (added)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java Tue Aug 27 07:54:22 2013
@@ -0,0 +1,34 @@
+/**
+ * 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.systests2.multi.rest;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+
+public interface RestTranslate {
+
+    @GET
+    String englishWords();
+
+    @GET
+    @Path("/{word}")
+    String getTranslation(@PathParam("word") String word);
+
+}

Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java?rev=1517758&view=auto
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java (added)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java Tue Aug 27 07:54:22 2013
@@ -0,0 +1,41 @@
+/**
+ * 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.systests2.multi.rest;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class RestTranslateImpl implements RestTranslate {
+    Map<String, String> translation;
+    
+    public RestTranslateImpl() {
+        translation = new HashMap<String, String>();
+        translation.put("hello", "hallo");
+    }
+    
+    @Override
+    public String englishWords() {
+        return translation.keySet().toString();
+    }
+    
+    @Override
+    public String getTranslation(String word) {
+        return translation.get(word);
+    }
+}

Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java?rev=1517758&view=auto
==============================================================================
--- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java (added)
+++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java Tue Aug 27 07:54:22 2013
@@ -0,0 +1,40 @@
+/**
+ * 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.systests2.multi.rest;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class TranslateActivator implements BundleActivator {
+
+    public void start(BundleContext context) throws Exception {
+        Dictionary<String, String> props = new Hashtable<String, String>();
+        props.put("service.exported.interfaces", "*");
+        props.put("service.exported.configs", "org.apache.cxf.rs");
+        props.put("service.exported.intents", "HTTP");
+        props.put("org.apache.cxf.rs.address", "/translate");
+        context.registerService(RestTranslate.class.getName(), new RestTranslateImpl(), props);
+    }
+
+    public void stop(BundleContext context) throws Exception {
+    }
+}

Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain