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 2006/06/16 16:59:24 UTC

svn commit: r414844 [3/3] - in /incubator/tuscany/sandbox/ant/tuscany-container-rhino: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/container/ src/main/...

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/java/org/apache/tuscany/container/rhino/rhino/RhinoScriptTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/java/org/apache/tuscany/container/rhino/rhino/RhinoScriptTestCase.java?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/java/org/apache/tuscany/container/rhino/rhino/RhinoScriptTestCase.java (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/java/org/apache/tuscany/container/rhino/rhino/RhinoScriptTestCase.java Fri Jun 16 07:59:20 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tuscany.container.rhino.rhino;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for the RhinoScript
+ */
+public class RhinoScriptTestCase extends TestCase {
+    
+    public RhinoScriptTestCase() {
+        
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    public void testSimpleConstructor() {
+        RhinoScript rhinoScript = new RhinoScript("foo", "function getPetra() {return 'petra';}");
+        RhinoScriptInstance instance = rhinoScript.createRhinoScriptInstance();
+        assertEquals("petra", instance.invokeFunction("getPetra", new Object[0]));
+    }
+
+    public void testFullConstructor() {
+        ClassLoader cl = getClass().getClassLoader();
+        Map<String, Object> contexts = new HashMap<String, Object>();
+        contexts.put("name", "petra");
+        RhinoScript rhinoScript = new RhinoScript("foo", "function getName() {return name;}",contexts , cl);
+        RhinoScriptInstance instance = rhinoScript.createRhinoScriptInstance();
+        assertEquals("petra", instance.invokeFunction("getName", new Object[0]));
+    }
+
+    public void testCreateInstance() {
+        RhinoScript rhinoScript = new RhinoScript("foo", "function getPetra() {return 'petra';}");
+        RhinoScriptInstance instance = rhinoScript.createRhinoScriptInstance();
+        assertNotNull(instance);
+    }
+
+    public void testCreateInstanceWithContext() {
+        RhinoScript rhinoScript = new RhinoScript("foo", "function getName() {return name;}");
+        Map<String, Object> contexts = new HashMap<String, Object>();
+        contexts.put("name", "petra");
+        RhinoScriptInstance instance = rhinoScript.createRhinoScriptInstance(contexts);
+        assertEquals("petra", instance.invokeFunction("getName", new Object[0]));
+    }
+
+    public void testDefaultResponseType() {
+        RhinoScript rhinoScript = new RhinoScript("foo", "function getX() {return 42;}");
+        RhinoScriptInstance instance = rhinoScript.createRhinoScriptInstance();
+        assertEquals("42", instance.invokeFunction("getX", new Object[0]));
+    }
+
+    public void testSetResponseType() {
+        RhinoScript rhinoScript = new RhinoScript("foo", "function getX() {return 42;}");
+        rhinoScript.setResponseClass("getX", Integer.class);
+        RhinoScriptInstance instance = rhinoScript.createRhinoScriptInstance();
+        Object x = instance.invokeFunction("getX", new Object[0]);
+        assertTrue(x instanceof Integer);
+        assertEquals(new Integer(42), x);
+    }
+
+}
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/org/apache/tuscany/container/rhino/e4x/helloworld.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/org/apache/tuscany/container/rhino/e4x/helloworld.wsdl?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/org/apache/tuscany/container/rhino/e4x/helloworld.wsdl (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/org/apache/tuscany/container/rhino/e4x/helloworld.wsdl Fri Jun 16 07:59:20 2006
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+  Licensed 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.
+ -->                              
+<wsdl:definitions targetNamespace="http://integration.rhino.container.tuscany.apache.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://integration.rhino.container.tuscany.apache.org" xmlns:intf="http://helloworld.samples.tuscany.apache.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld">
+    <!--WSDL created by Apache Axis version: 1.2.1
+Built on Jun 14, 2005 (09:15:57 EDT)-->
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://integration.rhino.container.tuscany.apache.org" xmlns="http://www.w3.org/2001/XMLSchema">
+            <element name="getGreetings">
+                <complexType>
+                    <sequence>
+                        <element name="in0" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getGreetingsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="getGreetingsReturn" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="getGreetingsRequest">
+
+        <wsdl:part element="impl:getGreetings" name="parameters"/>
+
+    </wsdl:message>
+
+    <wsdl:message name="getGreetingsResponse">
+
+        <wsdl:part element="impl:getGreetingsResponse" name="parameters"/>
+
+    </wsdl:message>
+
+    <wsdl:portType name="HelloWorld">
+
+        <wsdl:operation name="getGreetings">
+
+            <wsdl:input message="impl:getGreetingsRequest" name="getGreetingsRequest"/>
+
+            <wsdl:output message="impl:getGreetingsResponse" name="getGreetingsResponse"/>
+
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="helloworldSoapBinding" type="impl:HelloWorld">
+
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+        <wsdl:operation name="getGreetings">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="getGreetingsRequest">
+
+                <wsdlsoap:body use="literal"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="getGreetingsResponse">
+
+                <wsdlsoap:body use="literal"/>
+
+            </wsdl:output>
+
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="HelloWorldServiceImplService">
+
+        <wsdl:port binding="impl:helloworldSoapBinding" name="helloworld">
+
+            <wsdlsoap:address location="http://localhost:8080/helloworldws/services/HelloWorldService"/>
+
+        </wsdl:port>
+
+    </wsdl:service>
+
+</wsdl:definitions>

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/sca.module
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/sca.module?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/sca.module (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/sca.module Fri Jun 16 07:59:20 2006
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+  Licensed 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.
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+        xmlns:js="http://org.apache.tuscany/xmlns/js/0.9"
+
+        name="JavaScriptTests">
+
+    <component name="HelloWorldComponent1">
+        <js:implementation.js scriptFile="tests/HelloWorldImpl1.js"/>
+    </component>
+    
+    <component name="HelloWorldComponent2a">
+        <js:implementation.js scriptFile="tests/HelloWorldImpl2.js"/>
+    </component>
+
+    <component name="HelloWorldComponent2b">
+        <js:implementation.js scriptFile="tests/HelloWorldImpl2.js"/>
+        <properties>
+            <v:salutation>Guten Tag</v:salutation>
+        </properties>
+    </component>
+
+    <component name="HelloWorldProxyComponent">
+        <js:implementation.js scriptFile="tests/HelloWorldProxyImpl.js"/>
+        <references>
+            <v:HelloWorldService>HelloWorldComponent2b</v:HelloWorldService>
+        </references>
+    </component>
+
+    <component name="HelloWorldComponent4">
+        <js:implementation.js scriptFile="tests/HelloWorldImpl4.js"/>
+    </component>
+
+    <component name="HelloWorldComponent5">
+        <js:implementation.js scriptFile="tests/HelloWorldImpl5.js"/>
+    </component>
+
+    <import.sdo wsdlLocation="wsdl/helloworld.wsdl"/>
+    <import.wsdl wsdlLocation="wsdl/helloworld.wsdl"/>
+
+    <component name="HelloWorldComponentE4X">
+        <js:implementation.js scriptFile="tests/e4x.js"/>
+    </component>
+
+    <component name="HelloWorldComponentE4XProxy">
+        <js:implementation.js scriptFile="tests/HelloWorldE4XProxyImpl.js"/>
+        <references>
+            <v:HelloWorldService>HelloWorldComponentE4X</v:HelloWorldService>
+        </references>
+    </component>
+
+</module>

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldProxyService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </service>
+
+    <reference name="HelloWorldService">
+        <interface.wsdl interface="http://integration.rhino.container.tuscany.apache.org#HelloWorld"/>
+    </reference>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldE4XProxyImpl.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,28 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+function getGreetings(name) {
+	
+   var requestXML = 
+      <ns:getGreetings xmlns:ns="http://integration.rhino.container.tuscany.apache.org">
+         <ns:in0>{ "proxy:" + name }</ns:in0>
+      </ns:getGreetings>;
+           
+   var responseXML = HelloWorldService.process(requestXML);
+     
+   return responseXML..*::getGreetingsReturn;
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </service>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl1.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,20 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+function getGreetings(name) {
+   return "jsHello " + name;
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </service>
+
+    <property name="salutation" type="xsd:string" default="Hi"/>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl2.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,20 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+function getGreetings(name) {
+   return salutation + " " + name;
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </service>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl4.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,26 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+initSalutation();
+
+function getGreetings(name) {
+   return SALUTATION + name;
+}
+
+function initSalutation() {
+   SALUTATION = "Bonjour ";
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </service>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldImpl5.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,29 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+//importPackage(Packages.sample.utils);
+importClass(Packages.org.apache.tuscany.container.rhino.integration.TestMethods);
+
+initSalutation();
+
+function getGreetings(name) {
+   return SALUTATION.getSalutation() + " " + name;
+}
+
+function initSalutation() {
+   SALUTATION = new TestMethods();
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldProxyService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </service>
+
+    <reference name="HelloWorldService">
+        <interface.java interface="org.apache.tuscany.container.rhino.integration.HelloWorld"/>
+    </reference>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/HelloWorldProxyImpl.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,20 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+function getGreetings(name) {
+   return HelloWorldService.getGreetings("proxy:" + name);
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.componentType?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.componentType (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.componentType Fri Jun 16 07:59:20 2006
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="ASCII"?>
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+    <service name="HelloWorldE4XService">
+        <interface.wsdl interface="http://integration.rhino.container.tuscany.apache.org#HelloWorld"/>
+    </service>
+
+</componentType>
\ No newline at end of file

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.js
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.js?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.js (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/tests/e4x.js Fri Jun 16 07:59:20 2006
@@ -0,0 +1,28 @@
+/**
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed 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.
+ */
+
+function process(xmlIn) {
+
+   var greeting = "e4xHello " + xmlIn..*::in0;
+
+   var xmlOut = 
+      <helloworld:getGreetingsResponse xmlns:helloworld="http://integration.rhino.container.tuscany.apache.org">
+          <helloworld:getGreetingsReturn> { greeting } </helloworld:getGreetingsReturn>
+      </helloworld:getGreetingsResponse>;   
+
+   return xmlOut;
+}

Added: incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/wsdl/helloworld.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/wsdl/helloworld.wsdl?rev=414844&view=auto
==============================================================================
--- incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/wsdl/helloworld.wsdl (added)
+++ incubator/tuscany/sandbox/ant/tuscany-container-rhino/src/test/resources/wsdl/helloworld.wsdl Fri Jun 16 07:59:20 2006
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+  Licensed 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.
+ -->                              
+<wsdl:definitions targetNamespace="http://integration.rhino.container.tuscany.apache.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://integration.rhino.container.tuscany.apache.org" xmlns:intf="http://helloworld.samples.tuscany.apache.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="helloworld">
+    <!--WSDL created by Apache Axis version: 1.2.1
+Built on Jun 14, 2005 (09:15:57 EDT)-->
+    <wsdl:types>
+        <schema elementFormDefault="qualified" targetNamespace="http://integration.rhino.container.tuscany.apache.org" xmlns="http://www.w3.org/2001/XMLSchema">
+            <element name="getGreetings">
+                <complexType>
+                    <sequence>
+                        <element name="in0" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="getGreetingsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="getGreetingsReturn" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="getGreetingsRequest">
+
+        <wsdl:part element="impl:getGreetings" name="parameters"/>
+
+    </wsdl:message>
+
+    <wsdl:message name="getGreetingsResponse">
+
+        <wsdl:part element="impl:getGreetingsResponse" name="parameters"/>
+
+    </wsdl:message>
+
+    <wsdl:portType name="HelloWorld">
+
+        <wsdl:operation name="getGreetings">
+
+            <wsdl:input message="impl:getGreetingsRequest" name="getGreetingsRequest"/>
+
+            <wsdl:output message="impl:getGreetingsResponse" name="getGreetingsResponse"/>
+
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="helloworldSoapBinding" type="impl:HelloWorld">
+
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+        <wsdl:operation name="getGreetings">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="getGreetingsRequest">
+
+                <wsdlsoap:body use="literal"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="getGreetingsResponse">
+
+                <wsdlsoap:body use="literal"/>
+
+            </wsdl:output>
+
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="HelloWorldServiceImplService">
+
+        <wsdl:port binding="impl:helloworldSoapBinding" name="helloworld">
+
+            <wsdlsoap:address location="http://localhost:8080/helloworldws/services/HelloWorldService"/>
+
+        </wsdl:port>
+
+    </wsdl:service>
+
+</wsdl:definitions>



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