You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2008/05/27 21:15:13 UTC

svn commit: r660648 - in /incubator/tuscany/java/sca/itest/databindings: ./ jaxb-bottom-up/ jaxb-bottom-up/src/ jaxb-bottom-up/src/main/ jaxb-bottom-up/src/main/java/ jaxb-bottom-up/src/main/java/org/ jaxb-bottom-up/src/main/java/org/apache/ jaxb-botto...

Author: rfeng
Date: Tue May 27 12:15:04 2008
New Revision: 660648

URL: http://svn.apache.org/viewvc?rev=660648&view=rev
Log:
Apply the patch from Vamsi for TUSCANY-2340

Added:
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/   (with props)
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml   (with props)
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java   (with props)
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java   (with props)
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java   (with props)
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java   (with props)
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/resources/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/
    incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java   (with props)
Modified:
    incubator/tuscany/java/sca/itest/databindings/pom.xml

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue May 27 12:15:04 2008
@@ -0,0 +1,15 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+.externalToolBuilders
+maven-eclipse.xml

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml Tue May 27 12:15:04 2008
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<project>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>itest-databindings</artifactId>
+        <version>2.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>itest-databindings-jaxb-bottom-up</artifactId>
+    <version>2.0-incubating-SNAPSHOT</version>
+    <packaging>jar</packaging>
+    <name>Apache Tuscany SCA Databinding Integration Tests - JAXB Bottom Up</name>
+
+    <repositories>
+        <repository>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <id>java.net</id>
+            <name>java.net Maven 1.x Repository</name>
+            <url>http://download.java.net/maven/1</url>
+            <layout>legacy</layout>
+        </repository>
+        <repository>
+            <id>java.net2</id>
+            <name>java.net Maven 2.x Repository</name>
+            <url>http://download.java.net/maven/2</url>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>java.net2</id>
+            <name>java.net Maven 2.x Repository</name>
+            <url>http://download.java.net/maven/2</url>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>${pom.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-databinding-jaxb</artifactId>
+            <version>${pom.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-databinding-sdo</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-databinding-axiom</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>itest-databindings-common</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-java-xml</artifactId>
+            <version>${pom.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-jetty</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.1</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- 
+            <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.1.4</version>
+            <scope>runtime</scope>
+            </dependency>
+        -->
+        <dependency>
+            <groupId>com.sun.xml.ws</groupId>
+            <artifactId>jaxws-rt</artifactId>
+            <version>2.1.3</version>
+        </dependency>
+        <!-- Added by Simon Nash    -->
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.12</version>
+            <scope>provided</scope>
+        </dependency>
+        <!-- End of addition   -->
+    </dependencies>
+</project>

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java Tue May 27 12:15:04 2008
@@ -0,0 +1,39 @@
+/*
+ * 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.tuscany.sca.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for HelloServiceSimple.
+ */
+@Remotable
+public interface HelloServiceSimple {
+    String getGreetings(String name);
+    String[] getGreetingsArray(String[] names);
+    List<String> getGreetingsList(List<String> names);
+    ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+    Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+    HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
+}

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java Tue May 27 12:15:04 2008
@@ -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.tuscany.sca.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The interface for HelloServiceSimpleClient.
+ */
+public interface HelloServiceSimpleClient {
+    String getGreetingsForward(String name);
+    String[] getGreetingsArrayForward(String[] names);
+    List<String> getGreetingsListForward(List<String> names);
+    ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
+    Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
+    HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
+}

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java Tue May 27 12:15:04 2008
@@ -0,0 +1,69 @@
+/*
+ * 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.tuscany.sca.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of HelloServiceSimpleClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceSimpleClient.class)
+public class HelloServiceSimpleClientImpl implements HelloServiceSimpleClient {
+
+    private HelloServiceSimple service;
+
+    @Reference
+    public void setHelloServiceSimple(HelloServiceSimple service) {
+        this.service = service;
+    }
+
+    public String getGreetingsForward(String name) {
+        return service.getGreetings(name);
+    }
+
+    public String[] getGreetingsArrayForward(String[] names) {
+        return service.getGreetingsArray(names);
+    }
+
+    public List<String> getGreetingsListForward(List<String> names) {
+        return service.getGreetingsList(names);
+    }
+
+    public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
+        return service.getGreetingsMap(namesMap);
+    }
+
+    public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
+        return service.getGreetingsArrayList(names);
+    }
+
+    public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
+        return service.getGreetingsHashMap(namesMap);
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java Tue May 27 12:15:04 2008
@@ -0,0 +1,74 @@
+/*
+ * 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.tuscany.sca.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * An implementation of HelloServiceSimple.
+ */
+@Service(HelloServiceSimple.class)
+public class HelloServiceSimpleImpl implements HelloServiceSimple {
+
+    public String getGreetings(String name) {
+        return "Hello "+name;
+    }
+
+    public String[] getGreetingsArray(String[] names) {
+        for(int i = 0; i < names.length; ++i) {
+            names[i] = "Hello "+names[i];
+        }
+        return names;
+    }
+
+    public List<String> getGreetingsList(List<String> names) {
+        for(int i = 0; i < names.size(); ++i) {
+            names.set(i, "Hello "+names.get(i));
+        }
+        return names;
+    }
+
+    public ArrayList<String> getGreetingsArrayList(ArrayList<String> names) {
+        for(int i = 0; i < names.size(); ++i) {
+            names.set(i, "Hello "+names.get(i));
+        }
+        return names;
+    }
+
+    public Map<String, String> getGreetingsMap(Map<String, String> namesMap) {
+        for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+            entry.setValue("Hello "+entry.getKey());
+        }
+        return namesMap;
+    }
+
+    public HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap) {
+        for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+            entry.setValue("Hello "+entry.getKey());
+        }
+        return namesMap;
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite Tue May 27 12:15:04 2008
@@ -0,0 +1,53 @@
+<?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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" 
+           xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+           name="HelloService">
+           
+    <!-- Clients to test the service -->
+    <!-- A HelloServiceSimpleClient component that uses WS binding to invoke HelloServiceSimple service -->
+    <component name="HelloServiceSimpleClientWSComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleClientImpl" />
+        <reference name="helloServiceSimple">
+            <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple"/>
+            <binding.ws uri="http://localhost:8080/hs-ep0"/>
+        </reference>
+    </component>
+
+    <!-- A HelloServiceSimpleClient component that uses SCA binding to invoke HelloServiceSimple service -->
+    <component name="HelloServiceSimpleClientSCAComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleClientImpl" />
+        <reference name="helloServiceSimple" target="HelloServiceSimpleComponent">
+            <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple"/>
+            <binding.sca/>
+        </reference>
+    </component>
+    
+    <!-- Components used to implement the services -->
+    <!-- A HelloServiceSimple component. -->
+    <component name="HelloServiceSimpleComponent">
+        <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleImpl"/>
+        <service name="HelloServiceSimple">
+            <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple"/>
+            <binding.ws uri="http://localhost:8080/hs-ep0"/>
+            <binding.sca/>
+        </service>
+    </component>
+</composite>

Added: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java?rev=660648&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java Tue May 27 12:15:04 2008
@@ -0,0 +1,247 @@
+/*
+ * 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.tuscany.sca.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DatabindingTestCase {
+
+    private SCADomain domain;
+
+    /**
+     * Runs before each test method
+     */
+    @Before
+    public void setUp() throws Exception {
+        try { 
+            domain = SCADomain.newInstance("helloservice.composite");
+        } catch(Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * Runs after each test method
+     */
+    @After
+    public void tearDown() {
+        domain.close();
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using SCA binding.
+     * Service method invoked is getGreetings.
+     */
+    @Test
+    public void testSCA() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+        performTest(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using SCA binding.
+     * Service method invoked is getGreetingsArray.
+     */
+    @Test
+    public void testSCAArray() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+        performTestArray(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using SCA binding.
+     * Service method invoked is getGreetingsList.
+     */
+    @Test
+    public void testSCAList() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+        performTestList(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using SCA binding.
+     * Service method invoked is getGreetingsArrayList.
+     */
+    @Test
+    public void testSCAArrayList() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+        performTestArrayList(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using SCA binding.
+     * Service method invoked is getGreetingsMap.
+     */
+    @Test
+    public void testSCAMap() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+        performTestMap(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using SCA binding.
+     * Service method invoked is getGreetingsHashMap.
+     */
+    @Test
+    public void testSCAHashMap() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+        performTestHashMap(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using WS binding.
+     * Service method invoked is getGreetings.
+     */
+    @Test
+    public void testWS() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+        performTest(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using WS binding.
+     * Service method invoked is getGreetingsArray.
+     */
+    @Test
+    public void testWSArray() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+        performTestArray(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using WS binding.
+     * Service method invoked is getGreetingsList.
+     */
+    @Test
+    @Ignore
+    public void testWSList() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+        performTestList(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using WS binding.
+     * Service method invoked is getGreetingsArrayList.
+     */
+    @Test
+    @Ignore
+    public void testWSArrayList() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+        performTestArrayList(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using WS binding.
+     * Service method invoked is getGreetingsMap.
+     */
+    @Test
+    @Ignore
+    public void testWSMap() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+        performTestMap(helloServiceSimpleClient);
+    }
+
+    /**
+     * Invokes the HelloServiceSimple service using WS binding.
+     * Service method invoked is getGreetingsHashMap.
+     */
+    @Test
+    @Ignore
+    public void testWSHashMap() throws Exception {
+        HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+        performTestHashMap(helloServiceSimpleClient);
+    }
+
+    private void performTest(HelloServiceSimpleClient helloServiceSimpleClient) {
+        String name = "Pandu";
+        String resp = helloServiceSimpleClient.getGreetingsForward(name);
+        Assert.assertEquals("Hello "+name, resp);
+    }
+
+    private void performTestArray(HelloServiceSimpleClient helloServiceSimpleClient) {
+        String[] names = {"Me", "Pandu"};
+        String[] resps = helloServiceSimpleClient.getGreetingsArrayForward(names);
+        for(int i = 0; i < names.length; ++i) {
+            Assert.assertEquals("Hello "+names[i], resps[i]);
+        }
+    }
+
+    private void performTestList(HelloServiceSimpleClient helloServiceSimpleClient) {
+        List<String> namesList = new ArrayList<String>();
+        namesList.add("Me");
+        namesList.add("Pandu");
+        namesList.add("Chinnipandu");
+        List<String> respList = helloServiceSimpleClient.getGreetingsListForward(namesList);
+        Assert.assertEquals(namesList.size(), respList.size());
+        for(int i = 0; i < namesList.size(); ++i) {
+            Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+        }
+    }
+
+    private void performTestArrayList(HelloServiceSimpleClient helloServiceSimpleClient) {
+        ArrayList<String> namesList = new ArrayList<String>();
+        namesList.add("Me");
+        namesList.add("Pandu");
+        namesList.add("Chinnipandu");
+        ArrayList<String> respList = helloServiceSimpleClient.getGreetingsArrayListForward(namesList);
+        Assert.assertEquals(namesList.size(), respList.size());
+        for(int i = 0; i < namesList.size(); ++i) {
+            Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+        }
+    }
+
+    private void performTestMap(HelloServiceSimpleClient helloServiceSimpleClient) {
+        Map<String, String> namesMap = new HashMap<String, String>();
+        namesMap.put("Me", null);
+        namesMap.put("Pandu", null);
+        namesMap.put("Chinnipandu", null);
+        Map<String, String> respMap = helloServiceSimpleClient.getGreetingsMapForward(namesMap);
+        Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+        for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+            Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+        }
+    }
+
+    private void performTestHashMap(HelloServiceSimpleClient helloServiceSimpleClient) {
+        HashMap<String, String> namesMap = new HashMap<String, String>();
+        namesMap.put("Me", null);
+        namesMap.put("Pandu", null);
+        namesMap.put("Chinnipandu", null);
+        Map<String, String> respMap = helloServiceSimpleClient.getGreetingsHashMapForward(namesMap);
+        Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+        for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+            Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/itest/databindings/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/databindings/pom.xml?rev=660648&r1=660647&r2=660648&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/databindings/pom.xml (original)
+++ incubator/tuscany/java/sca/itest/databindings/pom.xml Tue May 27 12:15:04 2008
@@ -40,6 +40,7 @@
     <module>common</module>
     <module>sdogen</module>
     <module>jaxbgen</module>
+    <module>jaxb-bottom-up</module>
     <module>interop</module>
   </modules>
 </project>