tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramku...@apache.org
Subject svn commit: r905603 - in /tuscany/sca-java-2.x/trunk/itest/recursive-ws: ./ src/ src/main/ src/main/java/ src/main/java/policy/ src/main/java/recursive/ src/main/resources/ src/main/resources/bindingoverride/ src/main/resources/policy/ src/test/ src/te...
Date Tue, 02 Feb 2010 12:18:52 GMT
Author: ramkumar
Date: Tue Feb  2 12:18:47 2010
New Revision: 905603

URL: http://svn.apache.org/viewvc?rev=905603&view=rev
Log:
Added itest recursive-ws module into 2.x code base

Added:
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/pom.xml   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/Composer.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClient.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerServer.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Client.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Inner.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Outer.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/InnerComposite.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/OuterComposite.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyInnerComposite.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyOuterComposite.composite
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java   (with props)
    tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java   (with props)

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/pom.xml?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/pom.xml Tue Feb  2 12:18:47 2010
@@ -0,0 +1,92 @@
+<?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-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>itest-recursive-ws</artifactId>
+    <name>Apache Tuscany SCA iTest Recursive WS</name>
+    <version>2.0-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-api</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-node-impl</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>${pom.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-wsdl</artifactId>
+            <version>${pom.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <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-axiom</artifactId>
+            <version>${pom.version}</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-SNAPSHOT</version>
+                    <scope>runtime</scope>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+</project>

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

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java Tue Feb  2 12:18:47 2010
@@ -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 policy;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Target {
+    String hello(String arg);
+}

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/Target.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,33 @@
+/*
+ * 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 policy;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Target.class)
+public class TargetClientImpl implements Target {
+
+    @Reference
+    protected Target targetService;
+
+    public String hello(String arg) {
+        return "Target: Hello " + targetService.hello(arg) + "!";
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetClientImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,29 @@
+/*
+ * 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 policy;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Target.class)
+public class TargetServiceImpl implements Target {
+
+    public String hello(String arg) {
+        return "Target: Hello " + arg + "!";
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/policy/TargetServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/Composer.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/Composer.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/Composer.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/Composer.java Tue Feb  2 12:18:47 2010
@@ -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.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Composer {
+    public String Compose(String s);
+}
\ No newline at end of file

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

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClient.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClient.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClient.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,43 @@
+/*
+ * 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.File;
+
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+
+/**
+ *  For testing purpose
+ */
+public class ComposerClient {
+
+    public final static void main(String[] args) throws Exception {
+    	NodeFactory factory = NodeFactory.newInstance();
+        Node node = factory.createNode(new File("src/main/resources/Client.composite").toURI().toURL().toString(),
+                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+        node.start();
+        Composer composer = ((Client)node).getService(Composer.class, "ClientComponent/Composer");
+        System.out.println(composer.Compose("ABC"));
+        node.stop();
+    }
+
+}

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

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java Tue Feb  2 12:18:47 2010
@@ -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.oasisopen.sca.annotation.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: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerClientImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java Tue Feb  2 12:18:47 2010
@@ -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: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerServer.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerServer.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerServer.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/java/recursive/ComposerServer.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,42 @@
+/*
+ * 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.File;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+
+/**
+ *  For testing purpose
+ */
+public class ComposerServer {
+
+    public final static void main(String[] args) throws Exception {
+    	NodeFactory factory = NodeFactory.newInstance();
+        Node node = factory.createNode(new File("src/main/resources/Outer.composite").toURI().toURL().toString(),
+                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+        node.start();
+        System.out.println("Press Enter to exit...");
+        System.in.read();
+        node.stop();
+    }
+
+}

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

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Client.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Client.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Client.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,29 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912" 
+           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: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Inner.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Inner.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Inner.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Inner.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,27 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912" 
+           targetNamespace="http://inner" name="Inner">
+    <component name="InnerComponent">
+        <implementation.java class="recursive.ComposerImpl" />
+    </component>
+    <service name="OuterService" promote="InnerComponent"/>
+</composite>

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Outer.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Outer.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Outer.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/Outer.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,32 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912" 
+    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: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/InnerComposite.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/InnerComposite.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/InnerComposite.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/InnerComposite.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,36 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+    targetNamespace="http://bindingoverride"
+    xmlns:bindingoverride="http://bindingoverride"
+    name="BindingOverrideInnerComposite">
+
+   	<service name="InnerService" promote="InnerServiceComponent"> 
+        <interface.java interface="policy.Target"/>
+    </service>
+	
+    <component name="InnerServiceComponent">
+		<implementation.java class="policy.TargetServiceImpl"/> 
+        <service name="Target">
+            <interface.java interface="policy.Target"/>
+        </service>		
+    </component>
+
+</composite>

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/OuterComposite.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/OuterComposite.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/OuterComposite.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/bindingoverride/OuterComposite.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,38 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+    targetNamespace="http://bindingoverride"
+    xmlns:bindingoverride="http://bindingoverride"
+    name="BindingOverrideOuterComposite">
+    
+    <component name="OuterClientComponent">
+        <implementation.java class="policy.TargetClientImpl"/>
+        <reference name="targetService" target="OuterServiceComponent"/>
+    </component>
+    
+    <component name="OuterServiceComponent">
+        <implementation.composite name="bindingoverride:BindingOverrideInnerComposite"/>
+        <service name="InnerService">
+            <interface.java interface="policy.Target"/>
+            <binding.ws uri="http://localhost:8085/OuterTargetServiceComponent"/>
+        </service>
+    </component>
+
+</composite>

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyInnerComposite.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyInnerComposite.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyInnerComposite.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyInnerComposite.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,37 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+    targetNamespace="http://policy"
+    xmlns:policy="http://policy"
+    name="PolicyInnerComposite">
+
+   	<service name="TargetService" promote="TargetServiceComponent"> 
+            <interface.java interface="policy.Target"/>
+    </service>
+	
+    <component name="TargetServiceComponent">
+		<implementation.java class="policy.TargetServiceImpl"/> 
+        <service name="Target">
+            <interface.java interface="policy.Target"/>
+            <binding.ws uri="http://localhost:8085/TargetServiceComponent"/>
+        </service>		
+    </component>
+
+</composite>

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyOuterComposite.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyOuterComposite.composite?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyOuterComposite.composite (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/PolicyOuterComposite.composite Tue Feb  2 12:18:47 2010
@@ -0,0 +1,39 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+    targetNamespace="http://policy"
+    xmlns:policy="http://policy"
+    name="PolicyOuterComposite"
+    requires="policy:TestIntent_1">
+    
+    <component name="TargetClientComponent">
+        <implementation.java class="policy.TargetClientImpl"/>
+        <reference name="targetService" target="OuterTargetServiceComponent"/>
+    </component>
+    
+    <component name="OuterTargetServiceComponent">
+        <implementation.composite name="policy:PolicyInnerComposite"/>
+        <service name="TargetService">
+            <interface.java interface="policy.Target"/>
+            <binding.ws uri="http://localhost:8085/OuterTargetServiceComponent"/>
+        </service>
+    </component>
+
+</composite>

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml Tue Feb  2 12:18:47 2010
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+    * 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.    
+-->
+<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" 
+             targetNamespace="http://policy"
+             xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+             xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+             xmlns:ip="http://policy" >
+
+    <!-- Policy Intents -->
+    <sca:intent name="TestIntent_1" constrains="sca:binding.ws">
+        <description>Test Intent One</description>
+    </sca:intent>
+
+    <!--  Policy Sets -->
+    <sca:policySet name="TestPolicySet_1_binding" 
+                   provides="ip:TestIntent_1" 
+                   appliesTo="sca:binding.ws"
+                   xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+        <wsp:Policy />
+    </sca:policySet>
+
+</definitions>
\ No newline at end of file

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/main/resources/policy/definitions.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,65 @@
+/*
+ * 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 bindingoverride;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import policy.Target;
+
+public class BindingOverrideTestCase{
+
+    private Node node;
+    private Target targetClient;
+
+    @Before
+    public void setUp() throws Exception {
+        try {
+        	NodeFactory factory = NodeFactory.newInstance();
+            node = factory.createNode(new File("src/main/resources/bindingoverride/OuterComposite.composite").toURI().toURL().toString(),
+                    new Contribution("TestContribution", new File("src/main/resources/bindingoverride/").toURI().toURL().toString()));
+            node.start();
+            targetClient = ((Client)node).getService(Target.class, "OuterClientComponent");
+        } catch(Exception ex) {
+            System.out.println(ex.toString());
+        }
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        node.stop();
+    }
+
+    @Test
+    //@Ignore("TUSCANY-2352")
+    public void test() throws Exception {
+        Assert.assertEquals("Target: Hello Target: Hello Fred!!", targetClient.hello("Fred"));
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/bindingoverride/BindingOverrideTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,81 @@
+/*
+ * 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 policy;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.impl.CompositeImpl;
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class PolicyTestCase{
+
+    private Node node;
+    private Target targetClient;
+
+    @Before
+    public void setUp() throws Exception {
+        try {
+        	NodeFactory factory = NodeFactory.newInstance();
+            node = factory.createNode(new File("src/main/resources/policy/PolicyOuterComposite.composite").toURI().toURL().toString(),
+                    new Contribution("TestContribution", new File("src/main/resources/policy/").toURI().toURL().toString()));
+            node.start();
+            targetClient = ((Client)node).getService(Target.class, "TargetClientComponent");
+        } catch(Exception ex) {
+            System.out.println(ex.toString());
+        }
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        node.stop();
+    }
+
+    @Test
+    public void test() throws Exception {
+    	//Check that the binding policy sets do flow down to the component but not down to the
+    	//component inside implementation.composite
+    	Component outerComponent = ((NodeImpl)node).getDomainComposite().getComponent("OuterTargetServiceComponent");
+    	
+    	// The outer component service bindings should have policy sets attached
+    	Assert.assertEquals(1, outerComponent.getServices().get(0).getPolicySets().size());
+    	
+    	Component component = ((CompositeImpl)outerComponent.getImplementation()).getComponents().get(0);
+    	
+    	// The original inner component service binding should not have policy sets attached
+    	Assert.assertEquals(0, ((PolicySet)component.getServices().get(0).getBindings().get(0)).getReferencedPolicySets().size());
+        
+        // The promoted inner component service binding should have policy sets attached
+    	Assert.assertEquals(1, ((PolicySet)component.getServices().get(1).getBindings().get(0)).getReferencedPolicySets().size());
+    	
+        String result = targetClient.hello("Fred");
+
+        System.out.println(result);
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/policy/PolicyTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerClientTestCase.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,76 @@
+/*
+ * 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.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Client;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+//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 Node node;
+    
+    //private SCATestCaseRunner server;
+
+    @Before
+    public void startClient() throws Exception {
+        try {
+        	NodeFactory factory = NodeFactory.newInstance();
+            node = factory.createNode(new File("src/main/resources/Client.composite").toURI().toURL().toString(),
+                    new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+            node.start();
+            composer = ((Client)node).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();
+        node.stop();
+    }
+
+}

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

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

Added: tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java?rev=905603&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java (added)
+++ tuscany/sca-java-2.x/trunk/itest/recursive-ws/src/test/java/recursive/ComposerTestServer.java Tue Feb  2 12:18:47 2010
@@ -0,0 +1,61 @@
+/*
+ * 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.File;
+import java.io.IOException;
+import java.net.Socket;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+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 Node node;
+
+    @Before
+    public void startServer() throws Exception {
+        try {
+        	NodeFactory factory = NodeFactory.newInstance();
+            node = factory.createNode(new File("src/main/resources/Outer.composite").toURI().toURL().toString(),
+                    new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+            node.start();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Test
+    public void testPing() throws IOException {
+        new Socket("127.0.0.1", 8085);
+    }
+
+    @After
+    public void stopServer() throws Exception {
+        node.stop();
+    }
+
+}

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

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



Mime
View raw message