You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2007/02/24 12:52:39 UTC
svn commit: r511256 - in
/incubator/tuscany/branches/sca-java-integration/sca/extensions:
axis2/samples/helloworldwsclient/src/main/resources/META-INF/sca/application.composite
script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
Author: antelder
Date: Sat Feb 24 03:52:39 2007
New Revision: 511256
URL: http://svn.apache.org/viewvc?view=rev&rev=511256
Log:
Add JavaScript helloworld itest
Added:
incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java (with props)
Modified:
incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient/src/main/resources/META-INF/sca/application.composite
Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient/src/main/resources/META-INF/sca/application.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient/src/main/resources/META-INF/sca/application.composite?view=diff&rev=511256&r1=511255&r2=511256
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient/src/main/resources/META-INF/sca/application.composite (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworldwsclient/src/main/resources/META-INF/sca/application.composite Sat Feb 24 03:52:39 2007
@@ -18,21 +18,11 @@
* under the License.
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
- name="helloworldwsclient">
+
+ name="ScriptItests">
- <component name="HelloWorldServiceComponent">
- <implementation.java class="helloworld.HelloWorldServiceComponent"/>
- <reference name="helloWorldService">HelloWorldService</reference>
+ <component name="HelloWorldJSComponent">
+ <implementation.script script="helloworld/helloworld.js"/>
</component>
-
- <reference name="HelloWorldService">
- <interface.java class="helloworld.HelloWorldService" />
- <!-- interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- interface="http://helloworld#wsdl.interface(HelloWorld)"
- wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" / -->
- <binding.ws endpoint="http://helloworld#wsdl.endpoint(HelloWorldService/HelloWorldSoapPort)"
- location="wsdl/helloworld.wsdl" />
- </reference>
</composite>
Added: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java?view=auto&rev=511256
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java Sat Feb 24 03:52:39 2007
@@ -0,0 +1,52 @@
+/*
+ * 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 helloworld;
+
+import junit.framework.Assert;
+
+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 HelloWorldClientTestCase extends SCATestCase {
+
+ private CompositeContext compositeContext;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.compositeContext = CurrentCompositeContext.getContext();
+ }
+
+ public void testWSClient() throws Exception {
+ HelloWorldService helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldJSComponent");
+ String msg = helloWorldService.getGreetings("Petra");
+ Assert.assertEquals("jsHello Petra", msg);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/extensions/script/itests/src/test/java/helloworld/HelloWorldClientTestCase.java
------------------------------------------------------------------------------
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