diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:13:31 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:13:31 +0000 |
commit | 3caf8614f25d6b1962e20331fdf423c863bc02f3 (patch) | |
tree | 069fa30b63dd4804846385d8571928bdaa7b73ad /sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main | |
parent | 6d0e93c68d3aeaeb4bb6d96ac0460eec40ef786e (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main')
22 files changed, 1067 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java new file mode 100644 index 0000000000..7fe9fa4909 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java @@ -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();
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java new file mode 100644 index 0000000000..a381fc62dc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java @@ -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);
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java new file mode 100644 index 0000000000..fbb2161df3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java @@ -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();
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java new file mode 100644 index 0000000000..98490c4e3d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java @@ -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);
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java new file mode 100644 index 0000000000..6a4cfc1f79 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java @@ -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 {
+
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java new file mode 100644 index 0000000000..2b54ce2740 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java @@ -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.CompositeContext;
+
+public interface SCAComponentService {
+ String getComponentName();
+
+ CompositeContext getContext();
+
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java new file mode 100644 index 0000000000..5170c32cd2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java @@ -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;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java new file mode 100644 index 0000000000..7e8575a0a7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java @@ -0,0 +1,122 @@ +/*
+ * 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.CompositeContext;
+import org.osoa.sca.annotations.ComponentName;
+import org.osoa.sca.annotations.Context;
+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;
+
+ @Context
+ private CompositeContext context;
+
+ 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 CompositeContext getContext() {
+ return context;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getYear() {
+ return year;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java new file mode 100644 index 0000000000..9d382341e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java @@ -0,0 +1,83 @@ +/*
+ * 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.CompositeContext;
+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 CompositeContext getContext() {
+ return myService.getContext();
+ }
+
+ 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();
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite new file mode 100644 index 0000000000..fdaa23379c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite @@ -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" + name="CompositeTest"> + + <include name="myTotalService" scdlLocation="myTotalService.composite"/> + <include name="myListService" scdlLocation="myListService.composite"/> + <include name="mySimpleServiceInRecursive" scdlLocation="mySimpleServiceInRecursive.composite"/> + <include name="myServiceInRecursive" scdlLocation="myServiceInRecursive.composite"/> + <include name="mySimpleServiceInRecursive2" scdlLocation="mySimpleServiceInRecursive2.composite"/> + <include name="MyTotalServiceInRecursive" scdlLocation="myTotalServiceInRecursive.composite"/> + <include name="MyTotalServiceInRecursiveForReferenceOverride" scdlLocation="myTotalServiceInRecursiveForReferenceOverride.composite"/> + + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite new file mode 100644 index 0000000000..0094d119e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:foo="http://foo" + name="MyListServiceTest"> + + <component name="MyNewListService"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyListServiceImpl"/> + <reference name="myListServiceList" target="MyNCService/MyListService"></reference> + <reference name="myListServiceArray" target="MyListServiceFor2006/MyListService"></reference> + <property name="serviceYear">2007</property> + </component> + + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite new file mode 100644 index 0000000000..0d689e2c9c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:foo="http://foo" + name="MyServiceInCompositeTest"> + + <service name="MyService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MyServiceComponent/MyService</reference> + </service> + + + <service name="MyListService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/> + <reference>MyServiceComponent/MyListService</reference> + </service> + + + <service name="MyListServiceByYear"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/> + <reference>MyServiceComponent/MyListServiceByYear</reference> + </service> + + + <service name="MyServiceByDate"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyServiceByDate"/> + <reference>MyServiceComponent/MyServiceByDate</reference> + </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> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite new file mode 100644 index 0000000000..59341c9f8a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:foo="http://foo" + name="MyServiceInRecursiveTest"> + + <service name="MyServiceInRecursiveMyService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MyServiceInRecursive/MyService</reference> + </service> + + + <service name="MyServiceInRecursiveMyListService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/> + <reference>MyServiceInRecursive/MyListService</reference> + </service> + + + <service name="MyServiceInRecursiveMyListServiceByYear"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListServiceByYear"/> + <reference>MyServiceInRecursive/MyListServiceByYear</reference> + </service> + + + <service name="MyServiceInRecursiveMyServiceByDate"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyServiceByDate"/> + <reference>MyServiceInRecursive/MyServiceByDate</reference> + </service> + + + <component name="MyServiceInRecursive"> + <implementation.composite scdlLocation="myServiceInComposite.composite"/> + </component> + + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite new file mode 100644 index 0000000000..65140fced8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite @@ -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" + name="MySimpleServiceTest"> + + <service name="MyService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MyServiceComponent/MyService</reference> + </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> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite new file mode 100644 index 0000000000..e6925ee7f8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite @@ -0,0 +1,48 @@ +<?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" + name="MySimpleServiceInRecursiveTest"> + + <service name="MySimpleService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursive/MyService</reference> + </service> + + + <service name="MySimpleServiceNo" override="no"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursive/MyService</reference> + </service> + + <service name="MySimpleServiceMay" override="may"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursive/MyService</reference> + </service> + + <service name="MySimpleServiceMust" override="must"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursive/MyService</reference> + </service> + + <component name="MySimpleServiceInRecursive"> + <implementation.composite scdlLocation="mySimpleService.composite"/> + </component> +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite new file mode 100644 index 0000000000..4895691c00 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite @@ -0,0 +1,47 @@ +<?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" + name="MySimpleServiceInRecursiveTest"> + + <service name="MySimpleServiceDefault"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursiveComponent/MySimpleService</reference> + </service> + + <service name="MySimpleServiceNo" override="no"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursiveComponent/MySimpleServiceNo</reference> + </service> + + <service name="MySimpleServiceMay" override="may"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursiveComponent/MySimpleServiceMay</reference> + </service> + + <service name="MySimpleServiceMust" override="must"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + <reference>MySimpleServiceInRecursiveComponent/MySimpleServiceMust</reference> + </service> + + <component name="MySimpleServiceInRecursiveComponent"> + <implementation.composite scdlLocation="mySimpleServiceInRecursive.composite"/> + </component> +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite new file mode 100644 index 0000000000..d01558cdfe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:foo="http://foo" + name="MyTotalServiceTest"> + + <include name="myservice" scdlLocation="myservice.composite"/> + + <component name="MyTotalService"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/> + <reference name="myService" target="MyNCService/MyService"></reference> + <reference name="myListService" target="MyNCService/MyListService"></reference> + </component> + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite new file mode 100644 index 0000000000..2359323058 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite @@ -0,0 +1,43 @@ +<?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" + name="MyTotalServiceReferenceOverrideTest"> + + <service name="MyTotalService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceComponent</reference> + </service> + + <component name="MyTotalServiceComponent"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/> + <reference name="myService"></reference> + <reference name="myListService"></reference> + </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> + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite new file mode 100644 index 0000000000..96a8f00740 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite @@ -0,0 +1,81 @@ +<?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" + name="MyTotalServiceTest"> + + <service name="MyTotalServiceNo"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceComponentNo</reference> + </service> + + <component name="MyTotalServiceComponentNo"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/> + <reference name="myService"></reference> + <reference name="myListService"></reference> + </component> + + <reference name="MyServiceRefNo" override="no" promote="MyTotalServiceComponentNo/myService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + </reference> + + <reference name="MyListServiceRefNo" promote="MyTotalServiceComponentNo/myListService" override="no"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/> + </reference> + + <service name="MyTotalServiceMay"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceComponentMay</reference> + </service> + + <component name="MyTotalServiceComponentMay"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/> + <reference name="myService"></reference> + <reference name="myListService"></reference> + </component> + + <reference name="MyServiceRefMay" override="may" promote="MyTotalServiceComponentMay/myService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + </reference> + + <reference name="MyListServiceRefMay" override="may" promote="MyTotalServiceComponentMay/myListService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/> + </reference> + + <service name="MyTotalServiceMust"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceComponentMust</reference> + </service> + + <component name="MyTotalServiceComponentMust"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/> + <reference name="myService"></reference> + <reference name="myListService"></reference> + </component> + + <reference name="MyServiceRefMust" override="must" promote="MyTotalServiceComponentMust/myService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyService"/> + </reference> + + <reference name="MyListServiceRefMust" override="must" promote="MyTotalServiceComponentMust/myListService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyListService"/> + </reference> + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite new file mode 100644 index 0000000000..36802c75a6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite @@ -0,0 +1,62 @@ +<?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" + name="MyTotalServiceInRecursiveTest"> + + <component name="MyServiceInComposite"> + <implementation.composite scdlLocation="myServiceInComposite.composite"/> + </component> + + <component name="MyTotalServiceFromRecursive"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyTotalServiceImpl"/> + <reference name="myService" target="MyServiceInComposite/MyService"></reference> + <reference name="myListService" target="MyServiceInComposite/MyListService"></reference> + </component> + + <service name="MyTotalServiceInCompositeWithRecursiveUseService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceInCompositeWithRecursive</reference> + </service> + + <service name="MyTotalServiceInCompositeWithComponentServiceUseService"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceInCompositeWithComponentService</reference> + </service> + + <component name="MyTotalServiceInCompositeWithRecursive"> + <implementation.composite scdlLocation="myTotalServiceInComposite.composite"/> + <reference name="MyServiceRef" target="MyServiceInComposite/MyService"></reference> + <reference name="MyListServiceRef" target="MyServiceInComposite/MyListService"></reference> + </component> + + <component name="MyTotalServiceInCompositeWithComponentService"> + <implementation.composite scdlLocation="myTotalServiceInComposite.composite"/> + <reference name="MyServiceRef" target="MyServiceInComponent/MyService"></reference> + <reference name="MyListServiceRef" target="MyServiceInComponent/MyListService"></reference> + </component> + + <component name="MyServiceInComponent"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/> + <property name="location">CARY</property> + <property name="year">2007</property> + </component> + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite new file mode 100644 index 0000000000..4eccde41f4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite @@ -0,0 +1,55 @@ +<?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" + name="MyTotalServiceInRecursiveTest"> + + <service name="MyTotalServiceNo"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceForReferenceComponent/MyTotalServiceNo</reference> + </service> + + <service name="MyTotalServiceMay"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceForReferenceComponent/MyTotalServiceMay</reference> + </service> + + <service name="MyTotalServiceMust"> + <interface.java interface="org.apache.tuscany.sca.test.spec.MyTotalService"/> + <reference>MyTotalServiceForReferenceComponent/MyTotalServiceMust</reference> + </service> + + <component name="MyTotalServiceForReferenceComponent"> + <implementation.composite scdlLocation="myTotalServiceInCompositeForReferenceOverride.composite"/> + <reference name="MyServiceRefNo" target="MyServiceInComposite/MyService"></reference> + <reference name="MyListServiceRefNo" target="MyServiceInComposite/MyListService"></reference> + <reference name="MyServiceRefMay" target="MyServiceInComposite/MyService"></reference> + <reference name="MyListServiceRefMay" target="MyServiceInComposite/MyListService"></reference> + <reference name="MyServiceRefMust" target="MyServiceInComposite/MyService"></reference> + <reference name="MyListServiceRefMust" target="MyServiceInComposite/MyListService"></reference> + </component> + + <component name="MyServiceInComponent"> + <implementation.java class="org.apache.tuscany.sca.test.spec.impl.MyServiceImpl"/> + <property name="location">CARY</property> + <property name="year">2007</property> + </component> + +</composite> diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite new file mode 100644 index 0000000000..1e5f9edbd7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite @@ -0,0 +1,51 @@ +<?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" + name="MyServiceComposite"> + + <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> |