You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2007/06/24 13:00:53 UTC

svn commit: r550205 [1/2] - in /incubator/tuscany/java/sca/itest/spec-api: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/main/java/org/apache/tu...

Author: svkrish
Date: Sun Jun 24 04:00:49 2007
New Revision: 550205

URL: http://svn.apache.org/viewvc?view=rev&rev=550205
Log:
restoring spec-api deleted accidently

Added:
    incubator/tuscany/java/sca/itest/spec-api/
    incubator/tuscany/java/sca/itest/spec-api/pom.xml
    incubator/tuscany/java/sca/itest/spec-api/src/
    incubator/tuscany/java/sca/itest/spec-api/src/main/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/BasicService.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/CompositeTest.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/MathService.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myListService.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInComposite.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInRecursive.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleService.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalService.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInComposite.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursive.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite
    incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myservice.composite
    incubator/tuscany/java/sca/itest/spec-api/src/test/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java
    incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java

Added: incubator/tuscany/java/sca/itest/spec-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/pom.xml?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/pom.xml (added)
+++ incubator/tuscany/java/sca/itest/spec-api/pom.xml Sun Jun 24 04:00:49 2007
@@ -0,0 +1,45 @@
+<?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>1.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>tuscany-itest-spec-api</artifactId>
+    <name>Apache Tuscany SCA Spec API Integration Tests</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+    </dependencies>
+</project>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java Sun Jun 24 04:00:49 2007
@@ -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 org.apache.tuscany.sca.test.spec;
+
+public interface BasicService {
+
+    int negate(int theInt);
+    int delegateNegate(int theInt);
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,25 @@
+/*
+ * 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.test.spec;
+
+public interface MathService {
+
+    int negate(int theInt);
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,28 @@
+/*
+ * 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.test.spec;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface MyListService {
+    String[] getHolidays();
+
+    String getYear();
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,27 @@
+/*
+ * 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.test.spec;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface MyListServiceByYear {
+    //FIXME renaming method due to TUSCANY-1173. Original name getHolidays
+    String[] getHolidaysByYear(int year);
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java Sun Jun 24 04:00:49 2007
@@ -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 org.apache.tuscany.sca.test.spec;
+
+import java.util.Date;
+
+public interface MyService extends SCAComponentService {
+    Date nextHoliday();
+
+    String getLocation();
+
+    String getYear();
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java Sun Jun 24 04:00:49 2007
@@ -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 org.apache.tuscany.sca.test.spec;
+
+import java.util.Date;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface MyServiceByDate {
+    //FIXME renaming method due to TUSCANY-1173. Original name nextHoliday
+    Date nextHolidayByDate(Date date);
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,23 @@
+/*
+ * 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.test.spec;
+
+public interface MyTotalService extends MyListService, MyListServiceByYear, MyService, MyServiceByDate {
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,25 @@
+/*
+ * 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.test.spec;
+
+
+public interface SCAComponentService {
+    String getComponentName();
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,49 @@
+/*
+ * 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.test.spec.impl;
+
+import org.apache.tuscany.sca.test.spec.BasicService;
+import org.apache.tuscany.sca.test.spec.MathService;
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.annotations.Context;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+@Service(BasicService.class)
+public class BasicServiceImpl implements BasicService {
+
+    @Context
+    protected ComponentContext context;
+
+    //The reference anntation is used in lieu of a component type definition
+    //This makes the call to getService redundant since the reference is injected
+    //but it serves the purpose to demonstrate that getService is working.
+    @Reference
+    protected MathService mathServiceReference;
+
+    public int negate(int theInt) {
+        return -theInt;
+    }
+
+    public int delegateNegate(int theInt) {
+        mathServiceReference = context.getService(MathService.class, "mathServiceReference");
+        return mathServiceReference.negate(theInt);
+    }
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,31 @@
+/*
+ * 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.test.spec.impl;
+
+import org.apache.tuscany.sca.test.spec.MathService;
+import org.osoa.sca.annotations.Service;
+
+@Service(MathService.class)
+public class MathServiceImpl implements MathService {
+
+    public int negate(int theInt) {
+        return -theInt;
+    }
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,73 @@
+/*
+ * 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.test.spec.impl;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.test.spec.MyListService;
+import org.apache.tuscany.sca.test.spec.MyListServiceByYear;
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+
+@Service(interfaces = {MyListService.class, MyListServiceByYear.class})
+public class MyListServiceImpl implements MyListService, MyListServiceByYear {
+
+    // This is multiplicity=1:n
+    @Reference(name = "myListServiceList", required = false)
+    public List<MyListService> myListServicesList;
+
+    // This is multiplicity=0:n
+    @Reference(name = "myListServiceArray", required = false)
+    public MyListService[] myListServicesArray;
+
+    @Property(name = "serviceYear")
+    protected String year = "2006";
+
+    public String[] getHolidays() {
+        return getHolidaysByYear(new Integer(year).intValue());
+    }
+
+    public String[] getHolidaysByYear(int year) {
+        MyListService myService;
+        if (myListServicesList != null) {
+            for (int i = 0; i < myListServicesList.size(); i++) {
+                myService = myListServicesList.get(i);
+                if (new Integer(myService.getYear()).intValue() == year) {
+                    return myService.getHolidays();
+                }
+            }
+        }
+        if (myListServicesArray != null) {
+            for (int i = 0; i < myListServicesArray.length; i++) {
+                myService = myListServicesArray[i];
+                if (new Integer(myService.getYear()).intValue() == year) {
+                    return myService.getHolidays();
+                }
+            }
+        }
+        return null;
+    }
+
+    public String getYear() {
+        return year;
+    }
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,112 @@
+/*
+ * 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.test.spec.impl;
+
+import java.util.Date;
+
+import org.apache.tuscany.sca.test.spec.MyListService;
+import org.apache.tuscany.sca.test.spec.MyListServiceByYear;
+import org.apache.tuscany.sca.test.spec.MyService;
+import org.apache.tuscany.sca.test.spec.MyServiceByDate;
+import org.osoa.sca.annotations.ComponentName;
+import org.osoa.sca.annotations.Destroy;
+import org.osoa.sca.annotations.Init;
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Service;
+
+
+@Service(interfaces = {MyService.class, MyServiceByDate.class, MyListService.class, MyListServiceByYear.class})
+public class MyServiceImpl implements MyService, MyServiceByDate, MyListService, MyListServiceByYear {
+    static String[][] holidays =
+        {
+         {"2006/01/02", "2006/05/29", "2006/07/03", "2006/07/04", "2006/09/04", "2006/11/23", "2006/11/23",
+          "2006/11/24", "2006/12/25"},
+         {"2007/01/01", "2007/05/28", "2007/07/04", "2007/09/03", "2007/11/22", "2007/11/23", "2007/12/25"}};
+
+    @Property(name = "location")
+    protected String location = "RTP";
+
+    @Property(name = "year")
+    protected String year = "2006";
+
+    @ComponentName
+    private String componentName;
+
+    public MyServiceImpl() {
+        //System.out.println("creating service instance...");
+    }
+
+    public Date nextHoliday() {
+
+        return nextHolidayByDate(new Date());
+    }
+
+    @SuppressWarnings("deprecation")
+    public Date nextHolidayByDate(Date today) {
+        Date d1;
+        String[] days = getHolidays();
+        for (int j = 0; j < days.length; j++) {
+            d1 = new Date(days[j]);
+            if (d1.after(today))
+                return d1;
+        }
+        return null;
+    }
+
+    public String[] getHolidaysByYear(int year) {
+        int index = year - 2006;
+        if (index >= 0 && index < holidays.length)
+            return holidays[index];
+        return null;
+    }
+
+    public String[] getHolidays() {
+
+        Integer theYear;
+        if (year == null || year.length() == 0)
+            theYear = new Integer("2006");
+        else
+            theYear = new Integer(year);
+
+        return getHolidaysByYear(theYear.intValue());
+    }
+
+    @Init
+    public void start() {
+        //System.out.println("Start service..");
+    }
+
+    @Destroy
+    public void stop() {
+        //System.out.println("Stop service..");
+    }
+
+    public String getComponentName() {
+        return componentName;
+    }
+
+    public String getLocation() {
+        return location;
+    }
+
+    public String getYear() {
+        return year;
+    }
+
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,78 @@
+/*
+ * 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.test.spec.impl;
+
+import java.util.Date;
+
+import org.apache.tuscany.sca.test.spec.MyListService;
+import org.apache.tuscany.sca.test.spec.MyListServiceByYear;
+import org.apache.tuscany.sca.test.spec.MyService;
+import org.apache.tuscany.sca.test.spec.MyServiceByDate;
+import org.apache.tuscany.sca.test.spec.MyTotalService;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+
+@Service(MyTotalService.class)
+public class MyTotalServiceImpl implements MyTotalService {
+
+    // This is multiplicity=1:1
+    @Reference(required = true)
+    public MyListService myListService;
+
+    // default required==true so it is 1:1
+    @Reference
+    public MyListServiceByYear myListServiceByYear = new MyServiceImpl();
+
+    // default required==true so it is 1:1
+    @Reference
+    public MyService myService;
+
+    // This is multiplicity=0:1
+    @Reference(required = false)
+    public MyServiceByDate myServiceByDate = new MyServiceImpl();
+
+    public String[] getHolidays() {
+        return myListService.getHolidays();
+    }
+
+    public String[] getHolidaysByYear(int year) {
+        return myListServiceByYear.getHolidaysByYear(year);
+    }
+
+    public String getComponentName() {
+        return myService.getComponentName();
+    }
+
+    public Date nextHolidayByDate(Date date) {
+        return myServiceByDate.nextHolidayByDate(date);
+    }
+
+    public String getLocation() {
+        return myService.getLocation();
+    }
+
+    public String getYear() {
+        return myService.getYear();
+    }
+
+    public Date nextHoliday() {
+        return myService.nextHoliday();
+    }
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/BasicService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/BasicService.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/BasicService.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/BasicService.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="BasicServiceComposite">
+
+    <component name="BasicServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.BasicServiceImpl"/>
+        <reference name="mathServiceReference" target="MathServiceComponent"/>
+    </component>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/CompositeTest.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/CompositeTest.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/CompositeTest.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/CompositeTest.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,33 @@
+<?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://foo"
+    xmlns:foo="http://foo" 
+    name="CompositeTest">
+   
+    <include name="foo:myTotalService"></include>
+    <include name="foo:myListService"></include>
+    <include name="foo:mySimpleServiceInRecursive">foo:mySimpleServiceInRecursive</include>
+    <include name="foo:myServiceInRecursive">foo:myServiceInRecursive</include>
+    <include name="foo:mySimpleServiceInRecursive2">foo:mySimpleServiceInRecursive2</include>
+    <include name="foo:myTotalServiceInRecursive">foo:myTotalServiceInRecursive</include>
+    <include name="foo:myTotalServiceInRecursiveForReferenceOverride">foo:myTotalServiceInRecursiveForReferenceOverride</include>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/MathService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/MathService.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/MathService.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/MathService.composite Sun Jun 24 04:00:49 2007
@@ -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://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="MathServiceComposite">
+
+    <component name="MathServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MathServiceImpl"/>
+    </component>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myListService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myListService.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myListService.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myListService.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+	   name="myListService">
+   
+    <component name="MyNewListService">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyListServiceImpl"/>
+	<reference name="myListServiceList" target="MyNCService/MyListService"/>
+	<reference name="myListServiceArray" target="MyListServiceFor2006/MyListService"/>
+	<property name="serviceYear">2007</property>
+    </component>
+    
+   
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInComposite.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInComposite.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInComposite.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInComposite.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="myServiceInComposite">
+   
+    <service name="MyService" promote="MyServiceComponent/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+
+ 	<service name="MyListService" promote="MyServiceComponent/MyListService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
+    </service>
+
+
+ 	<service name="MyListServiceByYear" promote="MyServiceComponent/MyListServiceByYear">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
+    </service>
+
+
+ 	<service name="MyServiceByDate" promote="MyServiceComponent/MyServiceByDate">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyServiceByDate"/>
+    </service>
+
+    <component name="MyServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+		<property name="location">CARY</property>
+		<property name="year">2007</property>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInRecursive.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInRecursive.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInRecursive.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myServiceInRecursive.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="myServiceInRecursive">
+
+  <service name="MyServiceInRecursiveMyService" promote="MyServiceInRecursive/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+
+ 	<service name="MyServiceInRecursiveMyListService" promote="MyServiceInRecursive/MyListService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
+    </service>
+
+
+ 	<service name="MyServiceInRecursiveMyListServiceByYear" promote="MyServiceInRecursive/MyListServiceByYear">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
+    </service>
+
+
+ 	<service name="MyServiceInRecursiveMyServiceByDate" promote="MyServiceInRecursive/MyServiceByDate">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyServiceByDate"/>
+    </service>
+
+   
+    <component name="MyServiceInRecursive">
+        <implementation.composite name="foo:myServiceInComposite"/>
+    </component>
+    
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleService.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleService.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleService.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="mySimpleService">
+   
+    <service name="MyService" promote="MyServiceComponent/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+    <component name="MyServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+		<property name="location">CARY</property>
+		<property name="year">2007</property>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="mySimpleServiceInRecursive">
+   
+    <service name="MySimpleService" promote="MySimpleServiceInRecursive/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+   
+    <service name="MySimpleServiceNo" promote="MySimpleServiceInRecursive/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+    <service name="MySimpleServiceMay" promote="MySimpleServiceInRecursive/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+    <service name="MySimpleServiceMust" promote="MySimpleServiceInRecursive/MyService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+   
+    <component name="MySimpleServiceInRecursive">
+        <implementation.composite name="foo:mySimpleService"/>
+    </component>
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="mySimpleServiceInRecursive2">
+   
+    <service name="MySimpleService2Default"  promote="MySimpleServiceInRecursiveComponent/MySimpleService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+    <service name="MySimpleService2No" promote="MySimpleServiceInRecursiveComponent/MySimpleServiceNo">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+    <service name="MySimpleService2May" promote="MySimpleServiceInRecursiveComponent/MySimpleServiceMay">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+
+    <service name="MySimpleService2Must" promote="MySimpleServiceInRecursiveComponent/MySimpleServiceMust">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </service>
+   
+    <component name="MySimpleServiceInRecursiveComponent">
+        <implementation.composite name="foo:mySimpleServiceInRecursive"/>
+    </component>
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalService.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalService.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalService.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalService.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	xmlns:foo="http://foo" 
+	targetNamespace="http://foo"
+    name="myTotalService">
+   
+    <include name="foo:myservice">foo:myservice</include>
+    
+    <component name="MyTotalService">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
+        <reference name="myService" target="MyNCService/MyService"/>
+        <reference name="myListService" target="MyNCService/MyListService"/>
+        <reference name="myListServiceByYear" target="MyNCService/MyListServiceByYear"/>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInComposite.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInComposite.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInComposite.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInComposite.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+		name="myTotalServiceInComposite">
+   
+ 	<service name="MyTotalService" promote="MyTotalServiceComponent">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+   
+    <component name="MyTotalServiceComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
+    </component>
+    
+    <reference name="MyServiceRef" promote="MyTotalServiceComponent/myService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </reference>
+
+    <reference name="MyListServiceRef" promote="MyTotalServiceComponent/myListService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
+    </reference>
+
+    <reference name="MyListServiceByYearRef" promote="MyTotalServiceComponent/myListServiceByYear">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
+    </reference>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="myTotalServiceInCompositeForReferenceOverride">
+   
+ 	<service name="MyTotalServiceNo" promote="MyTotalServiceComponentNo">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+   
+    <component name="MyTotalServiceComponentNo">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
+		<reference name="myService"/>
+		<reference name="myListService"/>
+		<reference name="myListServiceByYear"/>
+    </component>
+    
+    <reference name="MyServiceRefNo" promote="MyTotalServiceComponentNo/myService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </reference>
+
+    <reference name="MyListServiceRefNo" promote="MyTotalServiceComponentNo/myListService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
+    </reference>
+
+    <reference name="MyListServiceByYearRefNo" promote="MyTotalServiceComponentNo/myListServiceByYear">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
+    </reference>
+
+ 	<service name="MyTotalServiceMay" promote="MyTotalServiceComponentMay">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+   
+    <component name="MyTotalServiceComponentMay">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
+    </component>
+    
+    <reference name="MyServiceRefMay" promote="MyTotalServiceComponentMay/myService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </reference>
+
+    <reference name="MyListServiceRefMay" promote="MyTotalServiceComponentMay/myListService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
+    </reference>
+
+    <reference name="MyListServiceByYearRefMay" promote="MyTotalServiceComponentMay/myListServiceByYear">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
+    </reference>
+
+ 	<service name="MyTotalServiceMust" promote="MyTotalServiceComponentMust">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+   
+    <component name="MyTotalServiceComponentMust">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
+    </component>
+    
+    <reference name="MyServiceRefMust" promote="MyTotalServiceComponentMust/myService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/>
+    </reference>
+
+    <reference name="MyListServiceRefMust" promote="MyTotalServiceComponentMust/myListService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/>
+    </reference>
+
+    <reference name="MyListServiceByYearRefMust" promote="MyTotalServiceComponentMust/myListServiceByYear">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/>
+    </reference>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursive.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursive.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursive.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursive.composite Sun Jun 24 04:00:49 2007
@@ -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"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="myTotalServiceInRecursive">
+   
+    <component name="MyServiceInComposite">
+        <implementation.composite name="foo:myServiceInComposite"/>
+    </component>
+    
+    <component name="MyTotalServiceFromRecursive">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/>
+		<reference name="myService" target="MyServiceInComposite/MyService"/>
+		<reference name="myListService" target="MyServiceInComposite/MyListService"/>
+        <reference name="myListServiceByYear" target="MyServiceInComposite/MyListServiceByYear"/>
+    </component>
+    
+ 	<service name="MyTotalServiceInCompositeWithRecursiveUseService" promote="MyTotalServiceInCompositeWithRecursive">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+   
+ 	<service name="MyTotalServiceInCompositeWithComponentServiceUseService" promote="MyTotalServiceInCompositeWithComponentService">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+    
+    <component name="MyTotalServiceInCompositeWithRecursive">
+        <implementation.composite name="foo:myTotalServiceInComposite"/>
+		<reference name="MyServiceRef" target="MyServiceInComposite/MyService"/>
+		<reference name="MyListServiceRef" target="MyServiceInComposite/MyListService"/>
+		<reference name="MyListServiceByYearRef" target="MyServiceInComposite/MyListServiceByYear"/>
+    </component>
+
+    <component name="MyTotalServiceInCompositeWithComponentService">
+        <implementation.composite name="foo:myTotalServiceInComposite"/>
+		<reference name="MyServiceRef" target="MyServiceInComponent/MyService"/>
+		<reference name="MyListServiceRef" target="MyServiceInComponent/MyListService"/>
+		<reference name="MyListServiceByYearRef" target="MyServiceInComponent/MyListServiceByYear"/>
+    </component>
+
+    <component name="myTotalServiceInRecursive_MyServiceInComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+		<property name="location">CARY</property>
+		<property name="year">2007</property>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="myTotalServiceInRecursiveForReferenceOverride">
+   
+	<service name="MyTotalServiceNo" promote="MyTotalServiceForReferenceComponent/MyTotalServiceNo">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+
+	<service name="MyTotalServiceMay" promote="MyTotalServiceForReferenceComponent/MyTotalServiceMay">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+
+	<service name="MyTotalServiceMust" promote="MyTotalServiceForReferenceComponent/MyTotalServiceMust">
+        <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/>
+    </service>
+      
+    <component name="MyTotalServiceForReferenceComponent">
+        <implementation.composite name="foo:myTotalServiceInCompositeForReferenceOverride"/>
+		<reference name="MyServiceRefNo" target="MyServiceInComponent/MyService"/>
+		<reference name="MyListServiceRefNo" target="MyServiceInComponent/MyListService"/>
+		<reference name="MyListServiceByYearRefNo" target="MyServiceInComponent/MyListServiceByYear"/>
+		<reference name="MyServiceRefMay" target="MyServiceInComponent/MyService"/>
+		<reference name="MyListServiceRefMay" target="MyServiceInComponent/MyListService"/>
+		<reference name="MyListServiceByYearRefMay" target="MyServiceInComponent/MyListServiceByYear"/>
+		<reference name="MyServiceRefMust" target="MyServiceInComponent/MyService"/>
+		<reference name="MyListServiceRefMust" target="MyServiceInComponent/MyListService"/>
+		<reference name="MyListServiceByYearRefMust" target="MyServiceInComponent/MyListServiceByYear"/>
+    </component>
+
+    <component name="myTotalServiceInRecursiveForReferenceOverride_MyServiceInComponent">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+		<property name="location">CARY</property>
+		<property name="year">2007</property>
+    </component>
+    
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myservice.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myservice.composite?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myservice.composite (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/main/resources/myservice.composite Sun Jun 24 04:00:49 2007
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+	   targetNamespace="http://foo"
+           name="myservice">
+   
+    <component name="MyService">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+    </component>
+    
+    <component name="MyNCService">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+		<property name="location">NC</property>
+		<property name="year">2007</property>
+    </component>
+
+    <component name="MyServiceByDate">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+    </component>
+
+    <component name="MyListService">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+    </component>
+
+    <component name="MyListServiceFor2006">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+		<property name="year">2006</property>
+    </component>
+
+    <component name="MyListServiceByYear">
+        <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/>
+    </component>
+
+</composite>

Added: incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java Sun Jun 24 04:00:49 2007
@@ -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 org.apache.tuscany.sca.test.spec;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ComponentContextTestCase {
+
+    private SCADomain domain;
+
+    /**
+     * Test description: Locate a service and invoke a method.
+     */
+    @Test
+    public void simpleLocate() {
+        BasicService service = domain.getService(BasicService.class, "BasicServiceComponent");
+        assertEquals(-99, service.negate(99));
+    }
+
+    /**
+     * Test description: Locate a service that will then locate another service
+     * via a defined reference by means of: 
+     * ComponentContext.getService(Class<B>businessInterface, String referenceName);
+     */
+    @Test
+    public void delegateViaDefinedReference() {
+        BasicService service = domain.getService(BasicService.class, "BasicServiceComponent");
+        assertEquals(-99, service.delegateNegate(99));
+    }
+
+    @Before
+    public void init() throws Exception {
+        domain = SCADomain.newInstance("http://localhost", "/", "BasicService.composite", "MathService.composite");
+    }
+
+    @After
+    public void destroy() throws Exception {
+        domain.close();
+    }
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.spec;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+public class ComponentServiceReferenceListTestCaseFIXME extends TestCase {
+    private MyListService myListService;
+    private MyListServiceByYear myListServiceByYear;
+
+    private SCADomain domain;
+
+    public void testDefaultProperty() {
+        assertEquals("2007", myListService.getYear());
+
+    }
+
+    public void testDefaultService() {
+        assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2007)[0]);
+
+    }
+
+    protected void setUp() throws Exception {
+    	domain = SCADomain.newInstance("CompositeTest.composite");
+        myListService = domain.getService(MyListService.class, "MyNewListService");
+        myListServiceByYear = domain.getService(MyListServiceByYear.class, "MyNewListService");
+    }
+
+    protected void tearDown() throws Exception {
+    	domain.close();
+    }
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,64 @@
+/*
+ * 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.test.spec;
+
+import java.util.Date;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+public class ComponentServiceReferenceTestCase extends TestCase {
+    private MyTotalService myService;
+    private SCADomain domain;
+
+    public void testDefaultProperty() {
+        assertEquals("NC", myService.getLocation());
+        assertEquals("2007", myService.getYear());
+
+    }
+
+    public void testDefaultService() {
+        assertNotSame(myService.nextHoliday(), myService.nextHolidayByDate(new Date()));
+        assertEquals(myService.getHolidays()[0], myService.getHolidaysByYear(2007)[0]);
+
+    }
+
+    public void testContext() {
+        //FIXME TUSCANY-1174 - Need support for @ComponentName
+        /*
+        assertNotNull("Service component name is null", myService.getComponentName());
+        assertNotNull("service context is null", myService.getContext());
+
+        System.out.println("Service component name :" + myService.getComponentName());
+        System.out.println("service context :" + myService.getContext());
+
+        test(context);
+        */
+    }
+
+    protected void setUp() throws Exception {
+    	domain = SCADomain.newInstance("CompositeTest.composite");
+        myService = domain.getService(MyTotalService.class, "MyTotalService");
+    }
+
+    protected void tearDown() throws Exception {
+    	domain.close();
+    }
+}

Added: incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java?view=auto&rev=550205
==============================================================================
--- incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java Sun Jun 24 04:00:49 2007
@@ -0,0 +1,98 @@
+/*
+ * 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.test.spec;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+
+import java.util.Date;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ComponentTestCase {
+    private static MyService myService;
+    private static MyServiceByDate myServiceByDate;
+    private static MyListService myListService;
+    private static MyListServiceByYear myListServiceByYear;
+    private static MyService myNCService;
+    private static MyListService myListServiceFor2006;
+
+    private static SCADomain domain;
+
+    @Test
+    public void testDefaultProperty() {
+        assertEquals("RTP", myService.getLocation());
+        assertEquals("2006", myService.getYear());
+
+    }
+
+    @Test
+    public void testDefaultService() {
+        assertEquals(myService.nextHoliday(), myServiceByDate.nextHolidayByDate(new Date()));
+        assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2006)[0]);
+
+    }
+
+    @Test
+    public void testOverrideProperty() {
+        assertEquals("NC", myNCService.getLocation());
+        assertEquals("2007", myNCService.getYear());
+    }
+
+    @Test
+    public void testServiceWithOverrideProperty() {
+        assertFalse(myNCService.nextHoliday() == myService.nextHoliday());
+        assertEquals(myListServiceFor2006.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2006)[0]);
+
+    }
+
+    @Test
+    public void testContext() {
+        //FIXME TUSCANY-1174 - Need support for @ComponentName
+        /*
+        assertNotNull("Service component name is null", myService.getComponentName());
+        assertNotNull("service context is null", myService.getContext());
+
+        System.out.println("Service component name :" + myService.getComponentName());
+        System.out.println("service context :" + myService.getContext());
+
+        test(context);
+        */
+    }
+
+    @BeforeClass
+    public static void init() throws Exception {
+        domain = SCADomain.newInstance("CompositeTest.composite");
+        myService = domain.getService(MyService.class, "MyService");
+        myServiceByDate = domain.getService(MyServiceByDate.class, "MyServiceByDate");
+        myListService = domain.getService(MyListService.class, "MyListService");
+        myListServiceByYear = domain.getService(MyListServiceByYear.class, "MyListServiceByYear");
+        myNCService = domain.getService(MyService.class, "MyNCService");
+        myListServiceFor2006 = domain.getService(MyListService.class, "MyListServiceFor2006");
+    }
+
+    @AfterClass
+    public static void destroy() throws Exception {
+        domain.close();
+    }
+    
+}



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