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

svn commit: r650505 - in /incubator/tuscany/java/sca: itest/validation/src/main/java/calculator/ itest/validation/src/main/resources/DuplicateImplementationPropertyName/ itest/validation/src/main/resources/DuplicateImplementationReferenceName/ itest/va...

Author: slaws
Date: Tue Apr 22 06:00:06 2008
New Revision: 650505

URL: http://svn.apache.org/viewvc?rev=650505&view=rev
Log:
TUSCANY-2255. Add more validation tests. Thanks Hasan for the patch. 

Added:
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/
    incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java   (with props)
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java   (with props)
Modified:
    incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddService.java
    incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImpl.java
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateComponentNameTestCase.java
    incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/XSDValidationTestCase.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties

Modified: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddService.java?rev=650505&r1=650504&r2=650505&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddService.java (original)
+++ incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddService.java Tue Apr 22 06:00:06 2008
@@ -24,5 +24,6 @@
 public interface AddService {
 
     double add(double n1, double n2);
+    String getServiceName();
 
 }

Modified: incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImpl.java?rev=650505&r1=650504&r2=650505&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImpl.java (original)
+++ incubator/tuscany/java/sca/itest/validation/src/main/java/calculator/AddServiceImpl.java Tue Apr 22 06:00:06 2008
@@ -20,16 +20,24 @@
 
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import org.osoa.sca.annotations.Property;
 
 /**
  * An implementation of the Add service
  */
 public class AddServiceImpl implements AddService {
 
+	@Property(name="serviceName")
+	protected String serviceName = "addService";
+
     public double add(double n1, double n2) {
         Logger logger = Logger.getLogger("calculator");
         logger.log(Level.FINEST, "Adding " + n1 + " and " + n2);
         return n1 + n2;
+    }
+
+    public String getServiceName(){
+	  return serviceName;
     }
 
 }

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>  
+
+    <component name="AddServiceComponent_one">
+        <implementation.composite name="sample:dummyImplementation">
+		<property name="serviceName" type="xsd:anyURI">addService</property>
+        </implementation.composite>
+    </component>   
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite Tue Apr 22 06:00:06 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="dummyImplementation">
+
+    <property name="serviceName" type="xsd:anyURI">addService</property>
+    <property name="serviceName" type="xsd:anyURI">addService</property>
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>  
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationPropertyName/dummyImplementation.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+
+    <component name="CalculatorServiceComponent">
+ 	  <implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="CalculatorServiceComponent_one">
+		<implementation.composite name="sample:dummyImplementation">
+		    <reference name="addService" target="AddServiceComponent" />
+		</implementation.composite>
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>   
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="dummyImplementation">
+
+      <reference name="addService" target="AddServiceComponent" />
+	<reference name="addService" target="AddServiceComponent" />
+
+     <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+     </component> 
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateImplementationReferenceName/dummyImplementation.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="AddServiceComponent">
+        <property name="serviceName" type="xsd:anyURI">addService</property>
+        <property name="serviceName" type="xsd:anyURI">addMyService</property>
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>   
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicatePropertyName/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>   
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/DuplicateReferenceName/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+	  <implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+    
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>
+
+    <component name="AddServiceComponent_one">
+    </component>    
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/NoComponentImplementation/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -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"
+           targetNamespace="http://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="AddServiceComponent">
+        <property name="serviceName_one" type="xsd:anyURI">addService</property>
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>   
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/PropertyNotFound/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -0,0 +1,54 @@
+<?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://sample"
+           xmlns:sample="http://sample"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>   
+
+    <component name="AddServiceComponent_one">
+        <service name="AddService"/>
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component> 
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/ServiceNotFoundForComponentService/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite (added)
+++ incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite Tue Apr 22 06:00:06 2008
@@ -0,0 +1,54 @@
+<?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://sample"
+           xmlns:sample="http://sample"
+	     xmlns:sca="http://sca"
+           name="Calculator">
+
+    <component name="CalculatorServiceComponent">
+		<implementation.java class="calculator.CalculatorServiceImpl"/>
+        <reference name="addService" target="AddServiceComponent" />
+        <reference name="subtractService" target="SubtractServiceComponent" />
+        <reference name="multiplyService" target="MultiplyServiceComponent" />
+        <reference name="divideService" target="DivideServiceComponent" />
+    </component>
+
+    <component name="AddServiceComponent">
+        <implementation.java class="calculator.AddServiceImpl"/>
+    </component>  
+
+    <component name="AddServiceComponent_one">
+        <implementation.composite name="sca:dummyImplementation.composite"/>
+    </component>   
+
+    <component name="SubtractServiceComponent">
+        <implementation.java class="calculator.SubtractServiceImpl"/>
+    </component>
+
+    <component name="MultiplyServiceComponent">
+        <implementation.java class="calculator.MultiplyServiceImpl"/>
+    </component>
+
+    <component name="DivideServiceComponent">
+        <implementation.java class="calculator.DivideServiceImpl"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/itest/validation/src/main/resources/UnresolvedComponentImplementation/Calculator.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateComponentNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateComponentNameTestCase.java?rev=650505&r1=650504&r2=650505&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateComponentNameTestCase.java (original)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateComponentNameTestCase.java Tue Apr 22 06:00:06 2008
@@ -23,7 +23,6 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
@@ -40,13 +39,10 @@
 public class DuplicateComponentNameTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    //private SCADomain scaDomain;
     private SCANode2 node;
 
     @Override
     protected void setUp() throws Exception {
-        //scaDomain = SCADomain.newInstance("XsdValidation/Calculator.composite");
-        //calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
         SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
         node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateComponentName/Calculator.composite").toURL().toString(),
         		                 new SCAContribution("TestContribution", 
@@ -57,7 +53,6 @@
 
     @Override
     protected void tearDown() throws Exception {
-        //scaDomain.close();
         node.stop();
     }
 

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,63 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class DuplicateImplementationPropertyNameTestCase extends TestCase {
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationPropertyName/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/DuplicateImplementationPropertyName").toURL().toString()));
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("DuplicateImplementationPropertyName", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationPropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java Tue Apr 22 06:00:06 2008
@@ -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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class DuplicateImplementationReferenceNameTestCase extends TestCase {
+
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationReferenceName/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/DuplicateImplementationReferenceName").toURL().toString()));
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("DuplicateImplementationReferenceName", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateImplementationReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class DuplicatePropertyNameTestCase extends TestCase {
+
+    private CalculatorService calculatorService;
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/DuplicatePropertyName/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/DuplicatePropertyName").toURL().toString()));
+        node.start();
+        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        node.stop();
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("DuplicateComponentPropertyName", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicatePropertyNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class DuplicateReferenceNameTestCase extends TestCase {
+
+    private CalculatorService calculatorService;
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/DuplicateReferenceName").toURL().toString()));
+        node.start();
+        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        node.stop();
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("DuplicateComponentReferenceName", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/DuplicateReferenceNameTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class NoComponentImplementationTestCase extends TestCase {
+
+    private CalculatorService calculatorService;
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/NoComponentImplementation").toURL().toString()));
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("NoComponentImplementation", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/NoComponentImplementationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class PropertyNotFoundTestCase extends TestCase {
+
+    private CalculatorService calculatorService;
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/PropertyNotFound").toURL().toString()));
+        node.start();
+        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        node.stop();
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("PropertyNotFound", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/PropertyNotFoundTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,69 @@
+/*
+ * 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 calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNotFoundForComponentServiceTestCase extends TestCase {
+
+    private CalculatorService calculatorService;
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/ServiceNotFoundForComponentService").toURL().toString()));
+        node.start();
+        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        node.stop();
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("ServiceNotFoundForComponentService", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/ServiceNotFoundForComponentServiceTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java?rev=650505&view=auto
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java (added)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java Tue Apr 22 06:00:06 2008
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package calculator;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import org.apache.tuscany.sca.node.SCANode2;
+import org.apache.tuscany.sca.node.SCANode2Factory;
+import org.apache.tuscany.sca.node.SCANode2Factory.SCAContribution;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class UnresolvedComponentImplementationTestCase extends TestCase {
+
+    private CalculatorService calculatorService;
+    private SCANode2 node;
+
+    @Override
+    protected void setUp() throws Exception {
+        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
+        node = nodeFactory.createSCANode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
+        		                 new SCAContribution("TestContribution", 
+        		                                     new File("src/main/resources/UnresolvedComponentImplementation").toURL().toString()));
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+    }
+
+    public void testCalculator() throws Exception {
+        ExtensionPointRegistry registry = ((NodeImpl)node).getExtensionPointRegistry();
+        MonitorFactory monitorFactory = registry.getExtensionPoint(MonitorFactory.class);
+        Monitor monitor = monitorFactory.createMonitor();
+        Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+        
+        assertNotNull(problem);
+        assertEquals("UnresolvedComponentImplementation", problem.getMessageId());
+ 
+    }
+}

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/UnresolvedComponentImplementationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/XSDValidationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/XSDValidationTestCase.java?rev=650505&r1=650504&r2=650505&view=diff
==============================================================================
--- incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/XSDValidationTestCase.java (original)
+++ incubator/tuscany/java/sca/itest/validation/src/test/java/calculator/XSDValidationTestCase.java Tue Apr 22 06:00:06 2008
@@ -23,7 +23,6 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
 import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.monitor.MonitorFactory;
 import org.apache.tuscany.sca.monitor.Problem;
@@ -40,13 +39,10 @@
 public class XSDValidationTestCase extends TestCase {
 
     private CalculatorService calculatorService;
-    //private SCADomain scaDomain;
     private SCANode2 node;
 
     @Override
     protected void setUp() throws Exception {
-        //scaDomain = SCADomain.newInstance("XsdValidation/Calculator.composite");
-        //calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");
         SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
         node = nodeFactory.createSCANode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
         		                 new SCAContribution("TestContribution", 
@@ -57,7 +53,6 @@
 
     @Override
     protected void tearDown() throws Exception {
-        //scaDomain.close();
         node.stop();
     }
 

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java?rev=650505&r1=650504&r2=650505&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeConfigurationBuilderImpl.java Tue Apr 22 06:00:06 2008
@@ -323,9 +323,10 @@
             if (property != null) {
                 componentProperty.setProperty(property);
             } else {
-                warning("Property not found for component property: " + component.getName()
+                /*warning("Property not found for component property: " + component.getName()
                     + "/"
-                    + componentProperty.getName(), component);
+                    + componentProperty.getName(), component);*/
+			warning("PropertyNotFound", component, component.getName().toString(), componentProperty.getName());
             }
         }
 
@@ -544,9 +545,10 @@
             if (service != null) {
                 componentService.setService(service);
             } else {
-                warning("Service not found for component service: " + component.getName()
+                /*warning("Service not found for component service: " + component.getName()
                     + "/"
-                    + componentService.getName(), component);
+                    + componentService.getName(), component);*/
+			warning("ServiceNotFoundForComponentService", component, component.getName().toString(), componentService.getName());
             }
         }
 
@@ -612,27 +614,30 @@
                                                                Map<String, ComponentProperty> componentProperties) {
         for (ComponentService componentService : component.getServices()) {
             if (componentServices.containsKey(componentService.getName())) {
-                warning("Duplicate component service name: " + component.getName()
+                /*warning("Duplicate component service name: " + component.getName()
                     + "/"
-                    + componentService.getName(), component);
+                    + componentService.getName(), component);*/
+			warning("DuplicateComponentServiceName", component, component.getName().toString(), componentService.getName());
             } else {
                 componentServices.put(componentService.getName(), componentService);
             }
         }
         for (ComponentReference componentReference : component.getReferences()) {
             if (componentReferences.containsKey(componentReference.getName())) {
-                warning("Duplicate component reference name: " + component.getName()
+                /*warning("Duplicate component reference name: " + component.getName()
                     + "/"
-                    + componentReference.getName(), component);
+                    + componentReference.getName(), component);*/
+			warning("DuplicateComponentReferenceName", component, component.getName().toString(), componentReference.getName());
             } else {
                 componentReferences.put(componentReference.getName(), componentReference);
             }
         }
         for (ComponentProperty componentProperty : component.getProperties()) {
             if (componentProperties.containsKey(componentProperty.getName())) {
-                warning("Duplicate component property name: " + component.getName()
+                /*warning("Duplicate component property name: " + component.getName()
                     + "/"
-                    + componentProperty.getName(), component);
+                    + componentProperty.getName(), component);*/
+			warning("DuplicateComponentPropertyName", component, component.getName().toString(), componentProperty.getName());
             } else {
                 componentProperties.put(componentProperty.getName(), componentProperty);
             }
@@ -649,14 +654,16 @@
         if (implementation == null) {
 
             // A component must have an implementation
-            warning("No implementation for component: " + component.getName(), component);
+            /*warning("No implementation for component: " + component.getName(), component);*/
+		warning("NoComponentImplementation", component, component.getName().toString());
 
         } else if (implementation.isUnresolved()) {
 
             // The implementation must be fully resolved
-            warning("Component implementation not found: " + component.getName()
+            /*warning("Component implementation not found: " + component.getName()
                 + " : "
-                + implementation.getURI(), component);
+                + implementation.getURI(), component);*/
+		warning("UnresolvedComponentImplementation", component, component.getName().toString(), implementation.getURI());
 
         } else {
 
@@ -664,9 +671,10 @@
             // duplicates
             for (Property property : implementation.getProperties()) {
                 if (properties.containsKey(property.getName())) {
-                    warning("Duplicate property name: " + component.getName()
+                    /*warning("Duplicate property name: " + component.getName()
                         + "/"
-                        + property.getName(), component);
+                        + property.getName(), component);*/
+			warning("DuplicateImplementationPropertyName", component, component.getName().toString(), property.getName());
                 } else {
                     properties.put(property.getName(), property);
                 }
@@ -682,9 +690,10 @@
             }
             for (Reference reference : implementation.getReferences()) {
                 if (references.containsKey(reference.getName())) {
-                    warning("Duplicate reference name: " + component.getName()
+                    /*warning("Duplicate reference name: " + component.getName()
                         + "/"
-                        + reference.getName(), component);
+                        + reference.getName(), component);*/
+			warning("DuplicateImplementationReferenceName", component, component.getName().toString(), reference.getName());
                 } else {
                     references.put(reference.getName(), reference);
                 }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties?rev=650505&r1=650504&r2=650505&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/resources/assembly-validation-messages_en.properties Tue Apr 22 06:00:06 2008
@@ -19,3 +19,12 @@
 #
 #
 DuplicateComponentName = Duplicate component name: Composite = {0} Component = {1}
+DuplicateComponentServiceName = Duplicate component service name: Component = {0} Service = {1}
+DuplicateComponentReferenceName = Duplicate component reference name: Component = {0} Reference = {1}
+DuplicateComponentPropertyName = Duplicate component property name: Component = {0} Property = {1}
+NoComponentImplementation = No implementation for component: Component = {0}
+ServiceNotFoundForComponentService = Service not found for component service: Component = {0} Service = {1}
+UnresolvedComponentImplementation = Component implementation not found: Component = {0} Uri = {1}
+DuplicateImplementationPropertyName = Duplicate property name: Component = {0} Property = {1}
+DuplicateImplementationReferenceName = Duplicate reference name: Component = {0} Reference = {1}
+PropertyNotFound = Property not found for component property: Component = {0} Property = {1}