You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/04/14 04:50:06 UTC

svn commit: r528745 - in /incubator/tuscany/sandbox/rfeng/samples/echo.databinding: ./ src/ src/main/java/echo/ src/main/resources/META-INF/sca/ src/test/java/echo/ src/test/resources/META-INF/

Author: rfeng
Date: Fri Apr 13 19:50:05 2007
New Revision: 528745

URL: http://svn.apache.org/viewvc?view=rev&rev=528745
Log:
Update echo databinding

Added:
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/
      - copied from r520740, incubator/tuscany/java/samples/sca/echo.databinding/
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/.ruleset
      - copied unchanged from r521957, incubator/tuscany/java/samples/sca/echo.databinding/.ruleset
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/NOTICE.txt
      - copied unchanged from r521957, incubator/tuscany/java/samples/sca/echo.databinding/NOTICE.txt
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/pom.xml
      - copied, changed from r521957, incubator/tuscany/java/samples/sca/echo.databinding/pom.xml
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/
      - copied from r521957, incubator/tuscany/java/samples/sca/echo.databinding/src/
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/resources/META-INF/sca/binding.echo.scdl
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/DataBindingITest.java
      - copied, changed from r519978, incubator/tuscany/java/samples/sca/echo.databinding/src/test/java/echo/DataBindingIntegrationTestCase.java
Removed:
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/java/echo/
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/resources/META-INF/sca/echo.system.scdl
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/DataBindingIntegrationTestCase.java
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/resources/META-INF/
Modified:
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Echo.java
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface1.java
    incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface2.java

Copied: incubator/tuscany/sandbox/rfeng/samples/echo.databinding/pom.xml (from r521957, incubator/tuscany/java/samples/sca/echo.databinding/pom.xml)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/echo.databinding/pom.xml?view=diff&rev=528745&p1=incubator/tuscany/java/samples/sca/echo.databinding/pom.xml&r1=521957&p2=incubator/tuscany/sandbox/rfeng/samples/echo.databinding/pom.xml&r2=528745
==============================================================================
--- incubator/tuscany/java/samples/sca/echo.databinding/pom.xml (original)
+++ incubator/tuscany/sandbox/rfeng/samples/echo.databinding/pom.xml Fri Apr 13 19:50:05 2007
@@ -1,85 +1,111 @@
 <?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.    
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
 -->
 <project>
     <parent>
-        <groupId>org.apache.tuscany.samples.sca</groupId>
-        <artifactId>parent</artifactId>
-        <version>1.0-incubator-SNAPSHOT</version>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>integration-test</artifactId>
+        <version>1.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
+    
     <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.tuscany.samples.sca</groupId>
     <artifactId>sample-echo-databinding</artifactId>
+    <version>1.0-incubating-SNAPSHOT</version>
     <name>Echo DataBinding</name>
     <description>A Sample for DataBinding</description>
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-spi</artifactId>
-            <version>1.0-incubator-SNAPSHOT</version>
-            <scope>compile</scope>
+            <groupId>org.osoa</groupId>
+            <artifactId>sca-api</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>        
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-assembly</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>test</artifactId>
-            <version>1.0-incubator-SNAPSHOT</version>
-            <scope>test</scope>
+            <artifactId>tuscany-interface-wsdl</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.services.databinding</groupId>
-            <artifactId>databinding-axiom</artifactId>
-            <version>1.0-incubator-SNAPSHOT</version>
-            <scope>test</scope>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-core-databinding</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+        </dependency>
+                
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-core-spi</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.services.idl</groupId>
-            <artifactId>wsdl</artifactId>
-            <version>1.0-incubator-SNAPSHOT</version>
-            <scope>compile</scope>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-api</artifactId>
-            <version>SNAPSHOT</version>
+            <version>1.2.2</version>
             <scope>compile</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-impl</artifactId>
-            <version>SNAPSHOT</version>
-            <scope>test</scope>
+            <version>1.2.2</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
-            <groupId>woodstox</groupId>
+            <groupId>org.codehaus.woodstox</groupId>
             <artifactId>wstx-asl</artifactId>
-            <version>3.0.1</version>
+            <version>3.2.0</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.2</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
             <version>1.1</version>
-            <scope>test</scope>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
 

Added: incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/resources/META-INF/sca/binding.echo.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/resources/META-INF/sca/binding.echo.scdl?view=auto&rev=528745
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/resources/META-INF/sca/binding.echo.scdl (added)
+++ incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/main/resources/META-INF/sca/binding.echo.scdl Fri Apr 13 19:50:05 2007
@@ -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" xmlns:system="http://tuscany.apache.org/xmlns/sca/system/2.0-alpha"
+    name="echo.binding" autowire="true">
+
+    <component name="BindingLoader">
+        <system:implementation.system class="echo.EchoBindingLoader" />
+    </component>
+
+    <component name="BindingBuilder">
+        <system:implementation.system class="echo.EchoBuilder" />
+    </component>
+
+</composite>

Copied: incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/DataBindingITest.java (from r519978, incubator/tuscany/java/samples/sca/echo.databinding/src/test/java/echo/DataBindingIntegrationTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/DataBindingITest.java?view=diff&rev=528745&p1=incubator/tuscany/java/samples/sca/echo.databinding/src/test/java/echo/DataBindingIntegrationTestCase.java&r1=519978&p2=incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/DataBindingITest.java&r2=528745
==============================================================================
--- incubator/tuscany/java/samples/sca/echo.databinding/src/test/java/echo/DataBindingIntegrationTestCase.java (original)
+++ incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/DataBindingITest.java Fri Apr 13 19:50:05 2007
@@ -18,29 +18,34 @@
  */
 package echo;
 
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
+import junit.framework.TestCase;
 
-import org.apache.tuscany.test.SCATestCase;
+import org.apache.tuscany.api.SCARuntime;
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.ServiceReference;
 
 /**
  * @version $Rev$ $Date$
  */
-public class DataBindingIntegrationTestCase extends SCATestCase {
+public class DataBindingITest extends TestCase {
 
-    private Interface1 componentA;
+    @Override
+    protected void setUp() throws Exception {
+        SCARuntime.start();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        SCARuntime.stop();
+    }
+
+    protected Interface1 componentA;
 
     public void testTransform() {
+        ComponentContext context = SCARuntime.getComponentContext("ComponentA");
+        ServiceReference<Interface1> ref = context.createSelfReference(Interface1.class);
+        componentA = ref.getService();
         componentA.call("<message><foo>123</foo></message>");
         componentA.call1("<message><foo>123</foo></message>");
-    }
-
-    protected void setUp() throws Exception {
-        setApplicationSCDL(getClass(), "META-INF/sca/default.scdl");
-        addExtension("echo.binding", getClass().getClassLoader().getResource("META-INF/sca/echo.system.scdl"));
-        addExtension("test.extensions", getClass().getClassLoader().getResource("META-INF/tuscany/test-extensions.scdl"));
-        super.setUp();
-        CompositeContext context = CurrentCompositeContext.getContext();
-        componentA = context.locateService(Interface1.class, "ComponentA");
     }
 }

Modified: incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Echo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Echo.java?view=diff&rev=528745&r1=521957&r2=528745
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Echo.java (original)
+++ incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Echo.java Fri Apr 13 19:50:05 2007
@@ -18,14 +18,14 @@
  */
 package echo;
 
-import org.apache.tuscany.api.annotation.DataType;
+import org.apache.tuscany.databinding.annotation.DataBinding;
 import org.osoa.sca.annotations.Remotable;
 
 /**
  * @version $Rev$ $Date$
  */
 // @DataType(name="org.apache.axiom.om.OMElement")
-@DataType(name="org.w3c.dom.Node")
+@DataBinding("org.w3c.dom.Node")
 @Remotable
 public interface Echo {
     Object echo(Object msg);

Modified: incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface1.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface1.java?view=diff&rev=528745&r1=521957&r2=528745
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface1.java (original)
+++ incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface1.java Fri Apr 13 19:50:05 2007
@@ -18,13 +18,13 @@
  */
 package echo;
 
-import org.apache.tuscany.api.annotation.DataType;
+import org.apache.tuscany.databinding.annotation.DataBinding;
 import org.osoa.sca.annotations.Remotable;
 
 /**
  * @version $Rev$ $Date$
  */
-@DataType(name="java.lang.String")
+@DataBinding("java.lang.String")
 @Remotable
 public interface Interface1 {
     Object call(Object msg);

Modified: incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface2.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface2.java?view=diff&rev=528745&r1=521957&r2=528745
==============================================================================
--- incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface2.java (original)
+++ incubator/tuscany/sandbox/rfeng/samples/echo.databinding/src/test/java/echo/Interface2.java Fri Apr 13 19:50:05 2007
@@ -20,17 +20,17 @@
 
 import javax.xml.stream.XMLStreamReader;
 
-import org.apache.tuscany.api.annotation.DataType;
+import org.apache.tuscany.databinding.annotation.DataBinding;
 import org.osoa.sca.annotations.Remotable;
 import org.w3c.dom.Node;
 
 /**
  * @version $Rev$ $Date$
  */
-@DataType(name="org.w3c.dom.Node")
+@DataBinding("org.w3c.dom.Node")
 @Remotable
 public interface Interface2 {
     Node call(Node msg);
-    @DataType(name="javax.xml.stream.XMLStreamReader")
+    @DataBinding("javax.xml.stream.XMLStreamReader")
     XMLStreamReader call1(XMLStreamReader msg);
 }



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