From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../javascript/function/HelloWorld.componentType | 26 ++++++++ .../container/javascript/function/HelloWorld.js | 21 ++++++ .../function/IntrospectableHelloWorld.js | 25 +++++++ .../javascript/function/compositeScope.js | 29 ++++++++ .../javascript/function/e4x.componentType | 33 +++++++++ .../tuscany/container/javascript/function/e4x.js | 45 +++++++++++++ .../container/javascript/function/helloworld.scdl | 50 ++++++++++++++ .../javascript/function/propertyTest.componentType | 28 ++++++++ .../container/javascript/function/propertyTest.js | 21 ++++++ .../container/javascript/function/requestScope.js | 30 +++++++++ .../container/javascript/function/scopeTest.scdl | 37 ++++++++++ .../javascript/function/statelessScope.js | 29 ++++++++ .../tuscany/container/javascript/mock/test.js | 1 + .../container/javascript/rhino/helloworld.wsdl | 78 ++++++++++++++++++++++ 14 files changed, 453 insertions(+) create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.componentType create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/IntrospectableHelloWorld.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/compositeScope.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.componentType create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/helloworld.scdl create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.componentType create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/requestScope.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/scopeTest.scdl create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/statelessScope.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/mock/test.js create mode 100644 branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/rhino/helloworld.wsdl (limited to 'branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript') diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.componentType b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.componentType new file mode 100644 index 0000000000..bd1e9445c1 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.componentType @@ -0,0 +1,26 @@ + + + + + + + + + diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.js new file mode 100644 index 0000000000..520153329e --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/HelloWorld.js @@ -0,0 +1,21 @@ +/* + * 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. + */ +function sayHello(s) { + return "Hello " + s; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/IntrospectableHelloWorld.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/IntrospectableHelloWorld.js new file mode 100644 index 0000000000..2f6b7e0675 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/IntrospectableHelloWorld.js @@ -0,0 +1,25 @@ +/* + * 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. + */ +SCA = { + 'javaInterface' : 'helloworld.HelloWorldService' +} + +function sayHello(s) { + return "Hello " + s; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/compositeScope.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/compositeScope.js new file mode 100644 index 0000000000..4684b89e66 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/compositeScope.js @@ -0,0 +1,29 @@ +/* + * 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. + */ +SCA = { + scope : 'composite', + javaInterface : 'helloworld.HelloWorldService' +} + +x = 0; + +function sayHello(s) { + x = x + 1; + return x; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.componentType b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.componentType new file mode 100644 index 0000000000..8f2d906f58 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.componentType @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.js new file mode 100644 index 0000000000..3e9c00fcb9 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.js @@ -0,0 +1,45 @@ +/* + * 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. + */ + +function sayE4XHello(xmlIn) { + + var greeting = "e4xHello " + xmlIn..*::name; + var xmlOut = getXmlObject("http://helloworld","getGreetingsResponse"); + + var ns = new Namespace("http://helloworld"); + xmlOut.ns::getGreetingsReturn = greeting; + + return xmlOut; +} + + + + function sayHello(name) { + //create XML Request Object + var xmlIn = getXmlObject("http://helloworld","getGreetings"); + var ns = new Namespace("http://helloworld"); + xmlIn.ns::name = name + " thro e4x reference"; + + //invoke service thro service reference and obtain XML Response + var xmlOut = extHelloWorldService.sayE4XHello(xmlIn); + + //extract the content of response XML and return as string + var greeting = "" + xmlOut..*::getGreetingsReturn; + return greeting; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/helloworld.scdl b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/helloworld.scdl new file mode 100644 index 0000000000..c3c4f5c669 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/helloworld.scdl @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + HelloWorldJavaReference + + + + + + + + + Kia ora + + + + + + diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.componentType b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.componentType new file mode 100644 index 0000000000..8e46971ea3 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.componentType @@ -0,0 +1,28 @@ + + + + + + + + + Hi + + diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.js new file mode 100644 index 0000000000..96e21d0c75 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/propertyTest.js @@ -0,0 +1,21 @@ +/* + * 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. + */ +function sayHello(s) { + return GREETING + ' ' + s; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/requestScope.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/requestScope.js new file mode 100644 index 0000000000..bf8f840b91 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/requestScope.js @@ -0,0 +1,30 @@ +/* + * 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. + */ + +SCA = { + scope : 'request', + javaInterface : 'helloworld.HelloWorldService' +} + +x = 0; + +function sayHello(s) { + x = x + 1; + return x; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/scopeTest.scdl b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/scopeTest.scdl new file mode 100644 index 0000000000..3754d69da1 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/scopeTest.scdl @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/statelessScope.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/statelessScope.js new file mode 100644 index 0000000000..21f5104859 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/statelessScope.js @@ -0,0 +1,29 @@ +/* + * 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. + */ +SCA = { + scope : 'stateless', + javaInterface : 'helloworld.HelloWorldService' +} + +x = 0; + +function sayHello(s) { + x = x + 1; + return x; +} diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/mock/test.js b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/mock/test.js new file mode 100644 index 0000000000..ef2694b475 --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/mock/test.js @@ -0,0 +1 @@ +//Test Script \ No newline at end of file diff --git a/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/rhino/helloworld.wsdl b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/rhino/helloworld.wsdl new file mode 100644 index 0000000000..67067f044a --- /dev/null +++ b/branches/sca-java-M2/sca/services/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/rhino/helloworld.wsdl @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3