From e0ff67c0b32813ea48734c770a5ffc1952644e29 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:02 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835128 13f79535-47bb-0310-9956-ffa450edef68 --- .../samples/helloworld-dojo-webapp/README | 104 ------------ .../samples/helloworld-dojo-webapp/build-dojo.xml | 92 ----------- .../samples/helloworld-dojo-webapp/build.xml | 70 -------- .../helloworld-dojo-webapp/helloworld-jsonrpc.png | Bin 9947 -> 0 bytes .../helloworld-dojo-webapp/helloworld-jsonrpc.svg | 177 --------------------- .../samples/helloworld-dojo-webapp/pom.xml | 163 ------------------- .../java/helloworldjsonrpc/HelloWorldService.java | 28 ---- .../helloworldjsonrpc/HelloWorldServiceImpl.java | 38 ----- .../src/main/resources/jsonrpc.composite | 37 ----- .../src/main/webapp/HelloWorldJSONRPC.html | 98 ------------ .../src/main/webapp/META-INF/sca-contribution.xml | 26 --- .../src/main/webapp/WEB-INF/web.xml | 41 ----- .../src/main/webapp/style.css | 22 --- 13 files changed, 896 deletions(-) delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/README delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build-dojo.xml delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build.xml delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/pom.xml delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/style.css (limited to 'branches/sca-java-1.3.1/samples/helloworld-dojo-webapp') diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/README b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/README deleted file mode 100644 index 38392a13b6..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/README +++ /dev/null @@ -1,104 +0,0 @@ -Hello World Dojo RPC Sample -=========================== - -Note. This sample is currently not working correctly on WebSphere - see TUSCANY-1990 - -This sample demostrates the SCA JSONRPC binding using a simple web app that -uses the RPC support of the Dojo Toolkit to an SCA service. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -As this sample provides a web app there is a manual step where the WAR file -that contains the sample is copied to your web app container. If you just want -to give this sample a go deploy the WAR file (target/sample-helloworld-dojo-webapp.war) -to you web application server. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -See also the similar helloworld-jsonrpc-webapp sample which also uses the SCA JSONRPC binding -but uses SCA scaDomain.js script on the client instead of the Dojo Toolkit. - -Sample Overview ---------------- -The sample provides a single service with an operation that reflects -a greeting back to the caller. The service is exposed using the JSONRPC -binding. The web app provided shows how the Dojo Toolkit JSON-RPC support can be -used to invoke the SCA service. - -The web app provided shows how the service can be called by using the DOJO toolkit. - -helloworld-dojo-webapp/ - build-dojo.xml - This file is an Ant script used by the - sample build process to download the Dojo Toolkit - and get it included in the WAR file - for use by the sample. - src/ - main/ - java/ - helloworldjsonrpc/ - HelloWorldService.java - service interface - HelloWorldServiceImpl.java - service implementation - resources/ - jsonrpc.composite - the SCA assembly for this sample - webapp - dojo/ - the Dojo toolkit (this directory is created only - when you build the samples from the source distribution) - META-INF/ - sca-contribution.xml - specifies the composite to be deployed - WEB-INF/ - web.xml - defines the listener that starts up the - Tuscany SCA runtime - HelloWorldJSONRPC.html - the web application that calls the - SCA service via JSONRPC - style.css - style sheet - - helloworld-jsonrpc-webapp.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file that unpacks the - dojo installation - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as -follows - -cd helloworld-dojo-webapp -ant package - -This should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Copy this war file to your web app deployment directory in your -web app container. - -The process for getting the web app running will depend on which web app container -you are using. For example, if you are using Tomcat then it is simply a matter -of copying the WAR file to the webapps directory. - -Once the web app is deployed use your browser to visit the following URL; - -http://localhost:8080/sample-helloworld-dojo-webapp - -The port and hostname will of course vary depending on your local installation. - -You should see a web page that allows you to send messages, via JSONRPC, to the -application running in the Tuscany SCA Runtime - -Building And Running The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built and run -using Maven as follows. - -cd helloworld-dojo-webapp -mvn - -Again this should result in a war file (sample-helloworld-dojo-webapp.war) in the target -directory. Follow the steps described in the previous section for running the web -app and for the expected results. - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build-dojo.xml b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build-dojo.xml deleted file mode 100644 index 534a1dacd9..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build-dojo.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build.xml b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build.xml deleted file mode 100644 index 95813af65a..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/build.xml +++ /dev/null @@ -1,70 +0,0 @@ - - -]> - - - - &buildDependency; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png deleted file mode 100644 index 57f90aed01..0000000000 Binary files a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.png and /dev/null differ diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg deleted file mode 100644 index d5c3bc5d3e..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/helloworld-jsonrpc.svg +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - helloworldjsonrpc - - HelloWorldJSONServiceComponent - HelloWorldService - WebApp - DOJO - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/pom.xml b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/pom.xml deleted file mode 100644 index a236d8537a..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/pom.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.3.1-SNAPSHOT - ../../pom.xml - - sample-helloworld-dojo-webapp - war - Apache Tuscany SCA HelloWorld DOJO Sample WebApp - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-webapp - 1.3.1-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-java-runtime - 1.3.1-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 1.3.1-SNAPSHOT - runtime - - - - - stax - stax-api - 1.0.1 - provided - - - - - javax.servlet - servlet-api - 2.3 - provided - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - org.apache.maven.plugins - maven-antrun-plugin - - - - ant - ant-trax - 1.6.5 - - - - - install-dojo - validate - - run - - - - - - - - - - - copy-dojo-files - generate-resources - - run - - - - - - - - - - - - clean-dojo-files - clean - - run - - - - - - - - - - - - - - org.apache.tuscany.sca - tuscany-maven-ant-generator - 1.3.1-SNAPSHOT - - - - true - - - generate - - - - - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java deleted file mode 100644 index 3d8ea24f04..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldService.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 helloworldjsonrpc; - -/** - * This is the business interface of the HelloWorld service component. - */ -public interface HelloWorldService { - - String getGreetings(String name); - -} diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java deleted file mode 100644 index e205f4da9b..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/java/helloworldjsonrpc/HelloWorldServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 helloworldjsonrpc; - -import java.util.Date; - -import org.osoa.sca.annotations.Service; - -/** - * This class implements the HelloWorld service component. - */ -@Service(HelloWorldService.class) -public class HelloWorldServiceImpl implements HelloWorldService { - - /* - * @see org.apache.tuscany.samples.helloworld.HelloWorldServiceComponent#getGreetings() - */ - public String getGreetings(String name) { - return new Date() + ": [JSONRPC] Hello " + name; - } - -} diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite deleted file mode 100644 index e895ab455d..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/resources/jsonrpc.composite +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html deleted file mode 100644 index 4195f3288c..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/HelloWorldJSONRPC.html +++ /dev/null @@ -1,98 +0,0 @@ - - - -Tuscany JSON-RPC HelloWorld Example - - - - - - - - - - - - - -

Tuscany Dojo JSON-RPC HelloWorld Sample

- - - - - - - - - - - - - - - - - - -
Dojo Example
-

This example uses the Dojo - Toolkit to create a JavaScript object helloWorldService - for the SCA service 'HelloWorldService' using Dojo's - RPC classes and providing them with HelloWorldService?smd - for Simple Method Description - (SMD) input.

-

It then creates a Dojo button that will envoke the getGreetings - method of the HelloWorldService object.

-
RequestResponse

- -
-
None Yet.
-
-
Dojo Debug:
-
- - - - - - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml deleted file mode 100644 index 2c178c1ddc..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 70cd67890a..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - Apache Tuscany DOJO HelloWorld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - HelloWorldJSONRPC.html - - - diff --git a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/style.css b/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/style.css deleted file mode 100644 index 1071583264..0000000000 --- a/branches/sca-java-1.3.1/samples/helloworld-dojo-webapp/src/main/webapp/style.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ -* { font-family: arial; } - -table, th, td { border: 2px solid blue; border-collapse: collapse; } -th { color: white; background-color: blue; } -- cgit v1.2.3