You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2012/07/26 15:36:31 UTC

svn commit: r1365986 - in /cxf/dosgi/trunk: distribution/multi-bundle/ distribution/multi-bundle/src/main/resources/ distribution/single-bundle/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ samples/greeter_rest/ samples/greeter_rest/imp...

Author: sergeyb
Date: Thu Jul 26 13:36:30 2012
New Revision: 1365986

URL: http://svn.apache.org/viewvc?rev=1365986&view=rev
Log:
[DOSGI-110] Support for relative endpoint addresses when used with HTTP contexts, updating greeter_rest demo which now exports 3 HTTP-context bound services, 2 from ne bundle, 1 more from the 2nd one

Added:
    cxf/dosgi/trunk/samples/greeter_rest/impl2/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java   (with props)
    cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java   (with props)
Modified:
    cxf/dosgi/trunk/distribution/multi-bundle/pom.xml
    cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml
    cxf/dosgi/trunk/distribution/single-bundle/pom.xml
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
    cxf/dosgi/trunk/samples/greeter_rest/pom.xml

Modified: cxf/dosgi/trunk/distribution/multi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/pom.xml?rev=1365986&r1=1365985&r2=1365986&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/pom.xml Thu Jul 26 13:36:30 2012
@@ -69,6 +69,11 @@
       <version>1.1.1</version>
     </dependency>
     <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
+    <dependency>
 	<groupId>org.osgi</groupId>
 	<artifactId>org.osgi.enterprise</artifactId>
 	<version>${osgi.version}</version>

Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml?rev=1365986&r1=1365985&r2=1365986&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml Thu Jul 26 13:36:30 2012
@@ -7,6 +7,7 @@
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/geronimo-ws-metadata_2.0_spec-1.1.3.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/com.springsource.org.apache.commons.logging-1.1.1.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/com.springsource.org.jdom-1.1.0.jar</bundle>
+  <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/commons-lang-2.6.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-core-${spring.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-beans-${spring.version}.jar</bundle>
   <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/spring-context-${spring.version}.jar</bundle>

Modified: cxf/dosgi/trunk/distribution/single-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/single-bundle/pom.xml?rev=1365986&r1=1365985&r2=1365986&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/single-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/single-bundle/pom.xml Thu Jul 26 13:36:30 2012
@@ -245,7 +245,11 @@
       <artifactId>com.springsource.org.apache.log4j</artifactId> 
       <version>${log4j.version}</version>
     </dependency>
-    
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-bundle-minimal</artifactId>

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java?rev=1365986&r1=1365985&r2=1365986&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java Thu Jul 26 13:36:30 2012
@@ -18,6 +18,7 @@
  */
 package org.apache.cxf.dosgi.dsw.handlers;
 
+import java.net.URI;
 import java.net.UnknownHostException;
 import java.util.Collections;
 import java.util.HashMap;
@@ -28,6 +29,7 @@ import java.util.concurrent.CopyOnWriteA
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.cxf.Bus;
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.common.logging.LogUtils;
@@ -148,10 +150,12 @@ public class HttpServiceConfigurationTyp
         
         ServerFactoryBean factory = 
         	createServerFactoryBean(frontEndImpl != null ? frontEndImpl : frontEndImpl2);
-        String address = constructAddress(dswContext, contextRoot);
+        
         factory.setBus(bus);
         factory.setServiceClass(iClass);
-        factory.setAddress("/");
+        
+        String relativeEndpointAddress = getRelativeEndpointAddress(sd);
+        factory.setAddress(relativeEndpointAddress);
         factory.getServiceFactory().setDataBinding(databinding);
         factory.setServiceBean(serviceBean);
         
@@ -159,6 +163,9 @@ public class HttpServiceConfigurationTyp
         
         setWsdlProperties(factory, callingContext, sd, false);
         
+        String completeEndpointAddress = 
+        		constructAddress(dswContext, contextRoot, relativeEndpointAddress);
+        
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {
             String[] intents = applyIntents(dswContext, callingContext, factory.getFeatures(), factory, sd);
@@ -166,7 +173,7 @@ public class HttpServiceConfigurationTyp
             // The properties for the EndpointDescription
             Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[] {
                 Constants.WS_CONFIG_TYPE
-            }, address,intents);
+            }, completeEndpointAddress, intents);
             EndpointDescription endpdDesc = null;
             
             Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
@@ -202,7 +209,8 @@ public class HttpServiceConfigurationTyp
         return cxf.getBus();
     }
 
-    protected String constructAddress(BundleContext ctx, String contextRoot) {
+    protected String constructAddress(BundleContext ctx, String contextRoot, 
+    		                          String relativeEndpointAddress) {
         String port = null;
         boolean https = false;
         if ("true".equalsIgnoreCase(ctx.getProperty("org.osgi.service.http.secure.enabled"))) {
@@ -221,8 +229,13 @@ public class HttpServiceConfigurationTyp
         } catch (UnknownHostException e) {
             hostName = "localhost";
         }
-
-        return getAddress(https ? "https" : "http", hostName, port, contextRoot);
+        
+        String address = getAddress(https ? "https" : "http", hostName, port, contextRoot);
+        if (!StringUtils.isEmpty(relativeEndpointAddress) 
+        	&& !relativeEndpointAddress.equals("/")) {
+        	address += relativeEndpointAddress;
+        }
+        return address;
     }
 
     protected HttpService getHttpService() {
@@ -355,4 +368,18 @@ public class HttpServiceConfigurationTyp
         }
     }
 
+    protected String getRelativeEndpointAddress(Map sd) {
+        String address = OsgiUtils.getProperty(sd, Constants.RS_ADDRESS_PROPERTY);
+        if (address != null) {
+        	if (URI.create(address).isAbsolute()) {
+        		LOG.info("Ignoring an absolute endpoint address, the value of " 
+        				 + Constants.RS_ADDRESS_PROPERTY + " property can only be a relative URI"
+        				 + " when " + Constants.RS_HTTP_SERVICE_CONTEXT 
+        				 + " property is set");
+        	} else {
+        		return address;
+        	}
+        }
+        return "/";
+    }
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java?rev=1365986&r1=1365985&r2=1365986&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSHttpServiceConfigurationTypeHandler.java Thu Jul 26 13:36:30 2012
@@ -67,7 +67,9 @@ public class JaxRSHttpServiceConfigurati
             factory.setResourceProvider(iClass, new SingletonResourceProvider(serviceBean));
         }
         
-        factory.setAddress("/");
+        String relativeEndpointAddress = getRelativeEndpointAddress(sd);
+        factory.setAddress(relativeEndpointAddress);
+        
         List<Object> providers = JaxRSUtils.getProviders(callingContext, dswContext, sd);
         if (providers != null && providers.size() > 0) {
             factory.setProviders(providers);
@@ -81,7 +83,8 @@ public class JaxRSHttpServiceConfigurati
                 }
     	}        
 
-        String address = constructAddress(dswContext, contextRoot);
+    	String completeEndpointAddress = 
+        		constructAddress(dswContext, contextRoot, relativeEndpointAddress);
 
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {
@@ -92,7 +95,7 @@ public class JaxRSHttpServiceConfigurati
             // The properties for the EndpointDescription
             Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[] {
                 Constants.RS_CONFIG_TYPE
-            }, address,intents);
+            }, completeEndpointAddress, intents);
             EndpointDescription endpdDesc = null;
             
             
@@ -123,5 +126,4 @@ public class JaxRSHttpServiceConfigurati
         }
         return context;
     }
-
 }

Added: cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml?rev=1365986&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml Thu Jul 26 13:36:30 2012
@@ -0,0 +1,79 @@
+<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.dosgi.samples</groupId>
+    <artifactId>cxf-dosgi-ri-samples-greeter-rest-impl2</artifactId>
+    <packaging>bundle</packaging>
+    <name>Distributed OSGI Greeter Implementation2 Bundle</name>
+    <version>1.4-SNAPSHOT</version>
+
+    <parent>
+      <groupId>org.apache.cxf.dosgi</groupId>
+      <artifactId>cxf-dosgi-ri-parent</artifactId>
+      <version>1.4-SNAPSHOT</version>
+      <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <properties>
+        <bundle.import.package>javax.ws.rs.*,*</bundle.import.package>                               
+        <bundle.private.package>org.apache.cxf.dosgi.samples.greeter.impl2.rest</bundle.private.package>
+    </properties>
+    
+    <dependencies>
+        <dependency> 
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>${felix.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.foundation</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency> 
+        <dependency> 
+            <groupId>org.apache.cxf.dosgi.samples</groupId>
+            <artifactId>cxf-dosgi-ri-samples-greeter-rest-interface</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 Distributed OSGi Greeter Demo Service Rest Implementation2 Bundle</Bundle-Name>
+                        <Bundle-Description>This bundle contains the implementation of the CXF Distributed OSGi Greeter Rest Demo Implementation2 Bundle</Bundle-Description>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Activator>org.apache.cxf.dosgi.samples.greeter.impl2.rest.Activator</Bundle-Activator>
+                        <Import-Package>${bundle.import.package}</Import-Package>
+                        <Private-Package>${bundle.private.package}</Private-Package> 
+                        <DynamicImport-Package>org.apache.cxf.dosgi.dsw.qos,org.apache.cxf</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin> 
+         </plugins>
+    </build>    
+
+</project>

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java?rev=1365986&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java Thu Jul 26 13:36:30 2012
@@ -0,0 +1,53 @@
+/** 
+  * 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.samples.greeter.impl2.rest;
+
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+public class Activator implements BundleActivator {
+    private ServiceRegistration registration;
+    public void start(BundleContext bc) throws Exception {
+        Dictionary props = getProperties("/rest");
+        registration = bc.registerService(GreeterService.class.getName(), 
+                                          new GreeterServiceImpl2(), props);
+    }
+
+    @SuppressWarnings("unchecked")
+	private Dictionary getProperties(String address) { 
+    	Dictionary props = new Hashtable();
+
+        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.httpservice.context", address);
+        props.put("org.apache.cxf.rs.address", "/service");
+        return props;
+    }
+    
+    public void stop(BundleContext bc) throws Exception {
+        registration.unregister();
+    }
+}

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java?rev=1365986&view=auto
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java (added)
+++ cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java Thu Jul 26 13:36:30 2012
@@ -0,0 +1,50 @@
+/** 
+  * Licensed to the Apache Software Foundation (ASF) under one 
+  * or more contributor license agreements. See the NOTICE file 
+  * distributed with this work for additional information 
+  * regarding copyright ownership. The ASF licenses this file 
+  * to you under the Apache License, Version 2.0 (the 
+  * "License"); you may not use this file except in compliance 
+  * with the License. You may obtain a copy of the License at 
+  * 
+  * http://www.apache.org/licenses/LICENSE-2.0 
+  * 
+  * Unless required by applicable law or agreed to in writing, 
+  * software distributed under the License is distributed on an 
+  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+  * KIND, either express or implied. See the License for the 
+  * specific language governing permissions and limitations 
+  * under the License. 
+  */
+package org.apache.cxf.dosgi.samples.greeter.impl2.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.cxf.dosgi.samples.greeter.rest.GreeterException;
+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;
+
+public class GreeterServiceImpl2 implements GreeterService {
+
+    private final static String STRANGER_NAME = "Stranger";
+
+    public GreeterInfo greetMe(String name) throws GreeterException {
+        System.out.println("Invoking from GreeterServiceImpl2: greetMe(" + name + ")");
+        
+        if (name.equals(STRANGER_NAME)) {
+            throw new GreeterException(name);
+        }
+
+        GreeterInfo info = new GreeterInfo();
+        List<GreetingPhrase> list = new ArrayList<GreetingPhrase>();
+        list.add(new GreetingPhrase("Hello", name));
+        list.add(new GreetingPhrase("Hoi", name));
+        list.add(new GreetingPhrase("Hola", name));
+        list.add(new GreetingPhrase("Bonjour", name));
+        info.setGreetings(list);
+        return info;
+    }
+
+}

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/dosgi/trunk/samples/greeter_rest/impl2/src/main/java/org/apache/cxf/dosgi/samples/greeter/impl2/rest/GreeterServiceImpl2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/dosgi/trunk/samples/greeter_rest/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/samples/greeter_rest/pom.xml?rev=1365986&r1=1365985&r2=1365986&view=diff
==============================================================================
--- cxf/dosgi/trunk/samples/greeter_rest/pom.xml (original)
+++ cxf/dosgi/trunk/samples/greeter_rest/pom.xml Thu Jul 26 13:36:30 2012
@@ -36,6 +36,7 @@
     <modules>    
       <module>interface</module>
       <module>impl</module>
+      <module>impl2</module>
       <module>client</module>
     </modules>