You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/07/22 22:01:08 UTC

svn commit: r678875 - in /tuscany/branches/sca-java-1.3: itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ itest/builder/src/main/resources/scenario10/ itest/builder/src/main/resources/scenario10/META-INF/ itest/builder/src/main/resourc...

Author: slaws
Date: Tue Jul 22 13:01:07 2008
New Revision: 678875

URL: http://svn.apache.org/viewvc?rev=678875&view=rev
Log:
TUSCANY-2484 - Changes and tests for the case where a promoted reference has a multiplicity greater than 1. Not complete yet as this has thrown up a problem in that the promoting interface contract is not available to the promoted component. I was going to commit a fix with this change but backed it out to think a little more about it. 

Added:
    tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite   (with props)
    tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite   (with props)
Modified:
    tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java
    tuscany/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
    tuscany/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ReferenceConfigurationUtil.java

Modified: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java?rev=678875&r1=678874&r2=678875&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java (original)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java Tue Jul 22 13:01:07 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.tuscany.sca.itest.builder;
 
+import java.util.List;
+
 import org.osoa.sca.annotations.Reference;
 import org.osoa.sca.annotations.Service;
 

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java Tue Jul 22 13:01:07 2008
@@ -0,0 +1,48 @@
+/*
+ * 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.builder;
+
+import java.util.List;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Implementation class for ComponentD.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(interfaces={Service3.class, Service3a.class})
+public class ComponentDReferenceMultiplicityImpl implements Service3, Service3a {
+
+    @Reference
+    protected Service3a reference3;
+    
+    @Reference
+    protected List<Service3> reference3a;
+
+    public String getGreetings(String name) {
+        return "Hello, " + name + "!";
+    }
+
+    public String getGreetings2(String name) {
+        return "Goodbye, " + name + "!";
+    }
+
+}

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java Tue Jul 22 13:01:07 2008
@@ -0,0 +1,36 @@
+/*
+ * 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.builder;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Implementation class for ComponentD.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(interfaces={Service3.class})
+public class ComponentEImpl implements Service3 {
+
+
+    public String getGreetings(String name) {
+        return "Hello, " + name + " from ComponentE";
+    }
+}

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java Tue Jul 22 13:01:07 2008
@@ -0,0 +1,36 @@
+/*
+ * 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.builder;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * Implementation class for ComponentD.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Service(interfaces={Service3.class})
+public class ComponentFImpl implements Service3 {
+
+
+    public String getGreetings(String name) {
+        return "Hello, " + name + " from ComponentF";
+    }
+}

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml Tue Jul 22 13:01:07 2008
@@ -0,0 +1,24 @@
+<?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.    
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+              targetNamespace="http://scenario10"
+              xmlns:ns10="http://scenario10">
+   <deployable composite="ns10:CompositeA" />
+</contribution>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,58 @@
+<?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://scenario10"
+        xmlns:tns="http://scenario10"
+        name="CompositeA">
+
+    <service name="Service1" promote="ComponentB/Service2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference1" promote="ComponentB/reference2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference1a" promote="ComponentB/reference2a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentB">
+        <implementation.composite name="tns:CompositeC" />
+        <service name="Service2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service2a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <reference name="reference2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>
+        <reference name="reference2a" target="ComponentF">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>        
+    </component>
+    
+    <component name="ComponentF">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>            
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,64 @@
+<?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://scenario10"
+        xmlns:tns="http://scenario10"
+        name="CompositeC">
+
+    <service name="Service2" promote="ComponentD/Service3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <service name="Service2a" promote="ComponentD/Service3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference2" promote="ComponentD/reference3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference2a" promote="ComponentD/reference3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+         <binding.ws />
+    </reference>    
+
+    <component name="ComponentD">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+        <service name="Service3">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws uri="http://foo.com/bar" />
+        </service>
+        <reference name="reference3" target="ComponentD/Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws/>
+        </reference>
+        <reference name="reference3a" target="ComponentE">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>        
+    </component>
+    
+    <component name="ComponentE">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>    
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml Tue Jul 22 13:01:07 2008
@@ -0,0 +1,24 @@
+<?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.    
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+              targetNamespace="http://scenario11"
+              xmlns:ns11="http://scenario11">
+   <deployable composite="ns11:CompositeA" />
+</contribution>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,59 @@
+<?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://scenario11"
+        xmlns:tns="http://scenario11"
+        name="CompositeA">
+
+    <service name="Service1" promote="ComponentB/Service2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference1" promote="ComponentB/reference2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference1a" promote="ComponentB/reference2a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentB">
+        <implementation.composite name="tns:CompositeC" />
+        <service name="Service2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service2a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <reference name="reference2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>
+        <reference name="reference2a" target="ComponentF">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws />
+        </reference>        
+    </component>
+    
+    <component name="ComponentF">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>            
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,63 @@
+<?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://scenario11"
+        xmlns:tns="http://scenario11"
+        name="CompositeC">
+
+    <service name="Service2" promote="ComponentD/Service3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <service name="Service2a" promote="ComponentD/Service3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference2" promote="ComponentD/reference3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference2a" promote="ComponentD/reference3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentD">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+        <service name="Service3">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws uri="http://foo.com/bar" />
+        </service>
+        <reference name="reference3" target="ComponentD/Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws/>
+        </reference>
+        <reference name="reference3a" target="ComponentE">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>        
+    </component>
+    
+    <component name="ComponentE">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>    
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml Tue Jul 22 13:01:07 2008
@@ -0,0 +1,24 @@
+<?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.    
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+              targetNamespace="http://scenario12"
+              xmlns:ns12="http://scenario12">
+   <deployable composite="ns12:CompositeA" />
+</contribution>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,58 @@
+<?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://scenario12"
+        xmlns:tns="http://scenario12"
+        name="CompositeA">
+
+    <service name="Service1" promote="ComponentB/Service2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference1" promote="ComponentB/reference2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference1a" promote="ComponentB/reference2a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentB">
+        <implementation.composite name="tns:CompositeC" />
+        <service name="Service2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service2a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <reference name="reference2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>
+        <reference name="reference2a" target="ComponentF">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>        
+    </component>
+    
+    <component name="ComponentF">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>            
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,63 @@
+<?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://scenario12"
+        xmlns:tns="http://scenario12"
+        name="CompositeC">
+
+    <service name="Service2" promote="ComponentD/Service3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <service name="Service2a" promote="ComponentD/Service3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference2" promote="ComponentD/reference3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference2a" promote="ComponentD/reference3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentD">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+        <service name="Service3">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws uri="http://foo.com/bar" />
+        </service>
+        <reference name="reference3" target="ComponentD/Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws/>
+        </reference>
+        <reference name="reference3a" target="ComponentE">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>        
+    </component>
+    
+    <component name="ComponentE">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>    
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml Tue Jul 22 13:01:07 2008
@@ -0,0 +1,24 @@
+<?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.    
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+              targetNamespace="http://scenario9"
+              xmlns:ns9="http://scenario9">
+   <deployable composite="ns9:CompositeA" />
+</contribution>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,58 @@
+<?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://scenario9"
+        xmlns:tns="http://scenario9"
+        name="CompositeA">
+
+    <service name="Service1" promote="ComponentB/Service2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference1" promote="ComponentB/reference2">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference1a" promote="ComponentB/reference2a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentB">
+        <implementation.composite name="tns:CompositeC" />
+        <service name="Service2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service2a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <reference name="reference2">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>
+        <reference name="reference2a" target="ComponentF">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </reference>        
+    </component>
+    
+    <component name="ComponentF">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>            
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite?rev=678875&view=auto
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite (added)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite Tue Jul 22 13:01:07 2008
@@ -0,0 +1,64 @@
+<?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://scenario9"
+        xmlns:tns="http://scenario9"
+        name="CompositeC">
+
+    <service name="Service2" promote="ComponentD/Service3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <service name="Service2a" promote="ComponentD/Service3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </service>
+    <reference name="reference2" promote="ComponentD/reference3">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>
+    <reference name="reference2a" promote="ComponentD/reference3a">
+        <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+    </reference>    
+
+    <component name="ComponentD">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+        <service name="Service3">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+        </service>
+        <service name="Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws uri="http://foo.com/bar" />
+        </service>
+        <reference name="reference3" target="ComponentD/Service3a">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws/>
+        </reference>
+        <reference name="reference3a" target="ComponentE">
+            <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+            <binding.ws />
+        </reference>        
+    </component>
+    
+    <component name="ComponentE">
+        <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+        <service name="Service3">
+            <binding.sca />
+            <binding.ws />
+        </service>
+    </component>    
+</composite>

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: tuscany/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java?rev=678875&r1=678874&r2=678875&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java (original)
+++ tuscany/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java Tue Jul 22 13:01:07 2008
@@ -28,6 +28,7 @@
 import org.apache.tuscany.sca.assembly.ComponentService;
 import org.apache.tuscany.sca.assembly.Composite;
 import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.SCABinding;
 import org.apache.tuscany.sca.assembly.Service;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
@@ -49,6 +50,7 @@
     protected void tearDown() throws Exception {
     }
 
+    
     // Scenario 1: <binding.ws> on outer composite service CompositeA/Service1
     public void testScenario1() throws Exception {
         System.out.println("====>Running testScenario1");
@@ -690,4 +692,88 @@
         assert wsBinding.getWSDLDocument() == null;
     }
 
+    // Scenario 9: targets in references CDR1A and CBR2A and binding.ws at CDR3A
+    public void testScenario9() throws Exception {
+        System.out.println("====>Running testScenario9");
+        customBuilder = new CustomCompositeBuilder(false);
+        customBuilder.loadContribution("scenario9.composite", "TestContribution", "src/main/resources/scenario9/");
+        //TestUtils.printResults(customBuilder);
+        TestUtils.checkProblems(customBuilder);
+        checkScenario9Results();
+    }
+
+    private void checkScenario9Results() {
+        Composite domainComposite = customBuilder.getDomainComposite();
+
+        Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+        WebServiceBinding wsBinding = null;
+        for (ComponentReference reference : componentD.getReferences()) {
+            if ("reference3a".equals(reference.getName())) {
+                assertTrue(reference.getBindings().size() == 2);
+                assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
+                assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
+            }
+        }
+     
+    }
+    
+    // Scenario 10: targets in references CDR1A and CBR2A and binding.ws at CCR2A
+    public void testScenario10() throws Exception {
+        System.out.println("====>Running testScenario10");
+        customBuilder = new CustomCompositeBuilder(false);
+        customBuilder.loadContribution("scenario10.composite", "TestContribution", "src/main/resources/scenario10/");
+        //TestUtils.printResults(customBuilder);
+        TestUtils.checkProblems(customBuilder);
+        checkScenario10And11Results();
+    }
+    
+    // Scenario 11: targets in references CDR1A and CBR2A and binding.ws at CBR2A
+    public void testScenario11() throws Exception {
+        System.out.println("====>Running testScenario11");
+        customBuilder = new CustomCompositeBuilder(false);
+        customBuilder.loadContribution("scenario11.composite", "TestContribution", "src/main/resources/scenario11/");
+        //TestUtils.printResults(customBuilder);
+        TestUtils.checkProblems(customBuilder);
+        checkScenario10And11Results();
+    }    
+
+    private void checkScenario10And11Results() {
+        Composite domainComposite = customBuilder.getDomainComposite();
+
+        Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+        WebServiceBinding wsBinding = null;
+        for (ComponentReference reference : componentD.getReferences()) {
+            if ("reference3a".equals(reference.getName())) {
+                assertTrue(reference.getBindings().size() == 2);
+                assertTrue(reference.getBindings().get(0) instanceof SCABinding);
+                assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
+            }
+        }
+     
+    }  
+
+    // Scenario 12: targets in references CDR1A and CBR2A and binding.ws at CAR1A
+    public void testScenario12() throws Exception {
+        System.out.println("====>Running testScenario12");
+        customBuilder = new CustomCompositeBuilder(false);
+        customBuilder.loadContribution("scenario12.composite", "TestContribution", "src/main/resources/scenario12/");
+        //TestUtils.printResults(customBuilder);
+        TestUtils.checkProblems(customBuilder);
+        checkScenario12Results();
+    }    
+
+    private void checkScenario12Results() {
+        Composite domainComposite = customBuilder.getDomainComposite();
+
+        Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+        WebServiceBinding wsBinding = null;
+        for (ComponentReference reference : componentD.getReferences()) {
+            if ("reference3a".equals(reference.getName())) {
+                assertTrue(reference.getBindings().size() == 2);
+                assertTrue(reference.getBindings().get(0) instanceof SCABinding);
+                assertTrue(reference.getBindings().get(1) instanceof SCABinding);
+            }
+        }
+     
+    }    
 }

Modified: tuscany/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ReferenceConfigurationUtil.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ReferenceConfigurationUtil.java?rev=678875&r1=678874&r2=678875&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ReferenceConfigurationUtil.java (original)
+++ tuscany/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ReferenceConfigurationUtil.java Tue Jul 22 13:01:07 2008
@@ -27,6 +27,7 @@
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.assembly.ComponentReference;
 import org.apache.tuscany.sca.assembly.CompositeReference;
+import org.apache.tuscany.sca.assembly.Endpoint;
 import org.apache.tuscany.sca.assembly.Multiplicity;
 import org.apache.tuscany.sca.assembly.OptimizableBinding;
 import org.apache.tuscany.sca.assembly.Reference;
@@ -167,37 +168,57 @@
                                            ComponentReference promotedReference,
                                            AssemblyFactory assemblyFactory,
                                            Monitor monitor) {
-        List<Binding> bindings = new ArrayList<Binding>();
-        
-        // collect the top level bindings first
-        for (Binding binding : reference.getBindings()) {
-            if ((!(binding instanceof OptimizableBinding)) || binding.getURI() != null) {
-                bindings.add(binding);
-            }
-        }
-        
-        // if there are not top level bindings to override the promoted bindings
-        // then collect the promoted bindings
-        if (bindings.size() == 0){
-            for (Binding binding : promotedReference.getBindings()) {
-                if ((!(binding instanceof OptimizableBinding)) || binding.getURI() != null) {
-                    bindings.add(binding);
-                }
-            }
-        } else {
-            // TUSCANY-2324: if bindings are being replaced, use the matching interface contract
-            promotedReference.setInterfaceContract(reference.getInterfaceContract());
-        }
-        
-        promotedReference.getBindings().clear();
-        promotedReference.getBindings().addAll(bindings);
-        
+              
         if (promotedReference.getMultiplicity() == Multiplicity.ONE_ONE ||
             promotedReference.getMultiplicity() == Multiplicity.ZERO_ONE) {
+            
+            // if necessary override the promoted endpoints (and bindings) with the top level bindings
+            if (reference.getBindings().size() > 0 ){
+                
+                if (reference instanceof ComponentReference){
+                    promotedReference.getEndpoints().clear();
+                    promotedReference.getEndpoints().addAll(((ComponentReference)reference).getEndpoints());
+                }
+                
+                promotedReference.getBindings().clear();
+                
+                for (Binding binding : reference.getBindings()) {
+                    if ((!(binding instanceof OptimizableBinding)) || binding.getURI() != null) {
+                        promotedReference.getBindings().add(binding);
+                        
+                        // TUSCANY-2324: ensure that the promoted reference can identify the
+                        //               correct interface contract for this binding
+                        promotedReference.setInterfaceContract(reference.getInterfaceContract());
+                    }
+                }
+                
+
+            }
+            
             if (promotedReference.getBindings().size() > 1) {
                 warning(monitor, "ComponentReferenceMoreWire", promotedReference, promotedReference.getName());                
             }
+        } else {
+            // if necessary merge the promoted endpoints (and bindings) with the top level bindings
+            if (reference.getBindings().size() > 0 ){
+                
+                if (reference instanceof ComponentReference){
+                    promotedReference.getEndpoints().addAll(((ComponentReference)reference).getEndpoints());
+                }
+                               
+                for (Binding binding : reference.getBindings()) {
+                    if ((!(binding instanceof OptimizableBinding)) || binding.getURI() != null) {
+                        promotedReference.getBindings().add(binding);
+                        
+                        // TUSCANY-2324: ensure that the promoted reference can identify the
+                        //               correct interface contract for this binding
+                        // TODO: no such interface exists yet!
+                        //promotedReference.setInterfaceContract(binding, reference.getInterfaceContract());                        
+                    }
+                }
+            }            
         }
+        
         Set<Binding> callbackBindings = new HashSet<Binding>();
         if (promotedReference.getCallback() != null) {
             callbackBindings.addAll(promotedReference.getCallback().getBindings());