tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r432817 - in /incubator/tuscany/java/samples/sca/helloworldwsclientOM: ./ src/test/java/helloworldOM/ src/test/resources/ src/test/resources/META-INF/ src/test/resources/META-INF/tuscany/
Date Sat, 19 Aug 2006 09:01:41 GMT
Author: antelder
Date: Sat Aug 19 02:01:40 2006
New Revision: 432817

URL: http://svn.apache.org/viewvc?rev=432817&view=rev
Log:
add test client like the non-OM version of the sample has

Added:
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java
  (with props)
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl
  (with props)
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
  (with props)
Modified:
    incubator/tuscany/java/samples/sca/helloworldwsclientOM/pom.xml

Modified: incubator/tuscany/java/samples/sca/helloworldwsclientOM/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclientOM/pom.xml?rev=432817&r1=432816&r2=432817&view=diff
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclientOM/pom.xml (original)
+++ incubator/tuscany/java/samples/sca/helloworldwsclientOM/pom.xml Sat Aug 19 02:01:40 2006
@@ -45,7 +45,19 @@
             <version>${pom.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.databinding</groupId>
+            <artifactId>databinding-sdo</artifactId>
+            <version>${sca.version}</version>
+            <scope>test</scope>
+        </dependency>
 
+        <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>test</artifactId>
+            <version>${sca.version}</version>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>

Added: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java?rev=432817&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java
(added)
+++ incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java
Sat Aug 19 02:01:40 2006
@@ -0,0 +1,57 @@
+/*
+ * 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 helloworldOM;
+
+import junit.framework.Assert;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.tuscany.test.SCATestCase;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * Test case for helloworld web service client 
+ */
+public class HelloWorldWSClient extends SCATestCase {
+
+    private HelloWorldService helloWorldService;
+
+    @Override
+    protected void setUp() throws Exception {
+        // FIXME: Adding extensions programtically
+        addExtension("org.apache.tuscany.binding.axis2.WebServiceBinding", getClass().getClassLoader().getResource("META-INF/tuscany/binding.axis2.scdl"));
+        super.setUp();
+        CompositeContext compositeContext = CurrentCompositeContext.getContext();
+        helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
+    }
+
+    public void testWSClient() {
+        OMFactory fac= OMAbstractFactory.getOMFactory();
+        OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworldOM",
"helloworld");
+        OMElement parmE = fac.createOMElement("name", "http://helloworldOM", "helloworld");
+        requestOM.addChild(parmE);
+        parmE.addChild(fac.createOMText("petra"));
+        OMElement responseOM = helloWorldService.getGreetings(requestOM);
+        Assert.assertEquals("Hello John", "");
+    }
+
+}

Propchange: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/java/helloworldOM/HelloWorldWSClient.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl?rev=432817&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl
(added)
+++ incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl
Sat Aug 19 02:01:40 2006
@@ -0,0 +1,40 @@
+<?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.    
+-->
+<!-- Axis2 based WebService binding extension -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/1.0-SNAPSHOT"
+           name="org.apache.tuscany.binding.axis2.WebServiceBinding">
+
+    <tuscany:dependency>
+        <group>axis2</group>
+        <artifact>axis2-core</artifact>
+        <version>SNAPSHOT</version>
+    </tuscany:dependency>
+    
+    <component name="webservice.bindingLoader">
+        <system:implementation.system class="org.apache.tuscany.binding.axis2.WebServiceBindingLoader"/>
+    </component>
+
+    <component name="webservice.axis2.bindingBuilder">
+        <system:implementation.system class="org.apache.tuscany.binding.axis2.Axis2BindingBuilder"/>
+    </component>
+
+</composite>

Propchange: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/binding.axis2.scdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl?rev=432817&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
(added)
+++ incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
Sat Aug 19 02:01:40 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<!--
+    import.sdo configuration
+    
+    $Rev$ $Date$
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+           xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
+           name="org.apache.tuscany.databinding.sdo">
+
+    <!-- import.sdo element loader implementations -->
+    <component name="elementLoader.import.sdo">
+        <system:implementation.system class="org.apache.tuscany.databinding.sdo.ImportSDOLoader"/>
+    </component>
+    
+</composite>

Propchange: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/samples/sca/helloworldwsclientOM/src/test/resources/META-INF/tuscany/databinding.sdo.scdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date



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


Mime
View raw message