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/04/04 23:59:01 UTC

svn commit: r644950 - in /incubator/tuscany/java/sca/itest: ./ recursive-ws/ recursive-ws/src/ recursive-ws/src/main/ recursive-ws/src/main/java/ recursive-ws/src/main/java/org/ recursive-ws/src/main/java/org/apache/ recursive-ws/src/main/java/org/apac...

Author: rfeng
Date: Fri Apr  4 14:58:52 2008
New Revision: 644950

URL: http://svn.apache.org/viewvc?rev=644950&view=rev
Log:
Add an itest for TUSCANY-2189

Added:
    incubator/tuscany/java/sca/itest/recursive-ws/   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/pom.xml   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Client.composite
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Inner.composite
    incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Outer.composite
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/org/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/org/apache/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/org/apache/tuscany/sca/itest/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java   (with props)
Modified:
    incubator/tuscany/java/sca/itest/pom.xml

Modified: incubator/tuscany/java/sca/itest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/pom.xml?rev=644950&r1=644949&r2=644950&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/pom.xml (original)
+++ incubator/tuscany/java/sca/itest/pom.xml Fri Apr  4 14:58:52 2008
@@ -94,6 +94,7 @@
                 <module>osgi-contribution</module>
                 <module>properties</module>
                 <module>recursive</module>
+                <module>recursive-ws</module>
                 <module>references</module>
                 <module>services</module>
                 <module>component-type</module>

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr  4 14:58:52 2008
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Added: incubator/tuscany/java/sca/itest/recursive-ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/pom.xml?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/pom.xml Fri Apr  4 14:58:52 2008
@@ -0,0 +1,87 @@
+<?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>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-itest</artifactId>
+        <version>2.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>itest-recursive-ws</artifactId>
+    <name>Apache Tuscany SCA Recursive WS Integration Tests</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-wsdl</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-databinding-axiom</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+
+    </dependencies>
+
+    <!-- Declare tuscany-host-jetty dependency in the default profile so that it can be replaced -->
+    <profiles>
+        <profile>
+            <id>default</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.tuscany.sca</groupId>
+                    <artifactId>tuscany-host-jetty</artifactId>
+                    <version>2.0-incubating-SNAPSHOT</version>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+</project>

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java Fri Apr  4 14:58:52 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;
+
+import java.awt.Image;
+
+import javax.activation.DataHandler;
+import javax.xml.transform.Source;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface BinaryService {
+    Image loadImage(byte[] image);
+
+    byte[] getBytes(Source source);
+
+    DataHandler transform(DataHandler dataHandler);
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/org/apache/tuscany/sca/itest/BinaryService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java Fri Apr  4 14:58:52 2008
@@ -0,0 +1,26 @@
+/*
+ * 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 recursive;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface Composer {
+    public String Compose(String s);
+}
\ No newline at end of file

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/Composer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java Fri Apr  4 14:58:52 2008
@@ -0,0 +1,35 @@
+/*
+ * 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 recursive;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ *  For testing purpose
+ */
+public class ComposerClient {
+
+    public final static void main(String[] args) throws Exception {
+        SCADomain scaDomain = SCADomain.newInstance("Client.composite");
+        Composer composer = scaDomain.getService(Composer.class, "ClientComponent/Composer");
+        System.out.println(composer.Compose("ABC"));
+        scaDomain.close();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java Fri Apr  4 14:58:52 2008
@@ -0,0 +1,38 @@
+/*
+ * 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 recursive;
+
+import org.osoa.sca.annotations.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ComposerClientImpl implements Composer {
+    @Reference
+    protected Composer composerWS;
+    
+    /**
+     * @see recursive.Composer#Compose(java.lang.String)
+     */
+    public String Compose(String s) {
+        return composerWS.Compose(s);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java Fri Apr  4 14:58:52 2008
@@ -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 recursive;
+
+/**
+ * Composer Component Implementation
+ * 
+ */
+
+public class ComposerImpl implements Composer {
+
+    public String Compose(String s) {
+        System.out.println("Composing " + s + "...");
+        return "Composed: " + s;
+
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java Fri Apr  4 14:58:52 2008
@@ -0,0 +1,35 @@
+/*
+ * 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 recursive;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ *  For testing purpose
+ */
+public class ComposerServer {
+
+    public final static void main(String[] args) throws Exception {
+        SCADomain scaDomain = SCADomain.newInstance("Outer.composite");
+        System.out.println("Press Enter to exit...");
+        System.in.read();
+        scaDomain.close();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/main/java/recursive/ComposerServer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Client.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Client.composite?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Client.composite (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Client.composite Fri Apr  4 14:58:52 2008
@@ -0,0 +1,28 @@
+<?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" targetNamespace="http://client" name="Client">
+    <component name="ClientComponent">
+        <implementation.java class="recursive.ComposerClientImpl" />
+        <reference name="composerWS">
+            <binding.ws uri="http://localhost:8085/OuterService"/>
+        </reference>
+    </component>
+</composite>

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Inner.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Inner.composite?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Inner.composite (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Inner.composite Fri Apr  4 14:58:52 2008
@@ -0,0 +1,26 @@
+<?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" targetNamespace="http://inner" name="Inner">
+    <component name="InnerComponent">
+        <implementation.java class="recursive.ComposerImpl" />
+    </component>
+    <service name="OuterService" promote="InnerComponent"/>
+</composite>

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Outer.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Outer.composite?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Outer.composite (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/main/resources/Outer.composite Fri Apr  4 14:58:52 2008
@@ -0,0 +1,31 @@
+<?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" targetNamespace="http://outer" xmlns:inner="http://inner"
+    name="Outer">
+    <component name="OuterComponent">
+        <implementation.composite name="inner:Inner" />
+        <service name="OuterService">
+            <interface.java interface="recursive.Composer" />
+            <binding.ws uri="http://localhost:8085/OuterService" />
+        </service>
+    </component>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java Fri Apr  4 14:58:52 2008
@@ -0,0 +1,68 @@
+/*
+ * 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 recursive;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.host.embedded.SCATestCaseRunner;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import recursive.Composer;
+
+/**
+ * Test case for helloworld web service client 
+ */
+public class ComposerClientTestCase {
+
+    private Composer composer;
+    private SCADomain scaDomain;
+    
+    private SCATestCaseRunner server;
+
+    @Before
+    public void startClient() throws Exception {
+        try {
+            scaDomain = SCADomain.newInstance("Client.composite");
+            composer = scaDomain.getService(Composer.class, "ClientComponent/Composer");
+    
+            server =  new SCATestCaseRunner(ComposerTestServer.class);
+            server.before();
+
+        } catch (Throwable e) {
+            e.printStackTrace();
+        }
+    }
+    
+    @Test
+    public void testWSClient() throws Exception {
+        String msg = composer.Compose("ABC");
+        Assert.assertEquals("Composed: ABC", msg);
+    }
+    
+    @After
+    public void stopClient() throws Exception {
+    	server.after();
+        scaDomain.close();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java?rev=644950&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java (added)
+++ incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java Fri Apr  4 14:58:52 2008
@@ -0,0 +1,55 @@
+/*
+ * 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 recursive;
+
+import java.io.IOException;
+import java.net.Socket;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Starts up the SCA runtime which starts listening for service requests
+ */
+public class ComposerTestServer {
+
+    private SCADomain scaDomain;
+
+    @Before
+    public void startServer() throws Exception {
+        try {
+            scaDomain = SCADomain.newInstance("Outer.composite");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Test
+    public void testPing() throws IOException {
+        new Socket("127.0.0.1", 8085);
+    }
+
+    @After
+    public void stopServer() throws Exception {
+        scaDomain.close();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org