From 54158d9b017dae6a75d813a96463d05e1153ae31 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Wed, 17 Sep 2008 06:59:35 +0000 Subject: Starting to clean up android branch, creating subsets of samples, demos, tutorials that can be ported to android. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696177 13f79535-47bb-0310-9956-ffa450edef68 --- branches/sca-android/samples/web-resource/README | 76 -------- .../sca-android/samples/web-resource/build.xml | 72 -------- branches/sca-android/samples/web-resource/pom.xml | 79 --------- .../src/main/java/web/resource/SampleServer.java | 44 ----- .../src/main/resources/WebResource.composite | 32 ---- .../src/main/resources/myContent/index.html | 49 ----- .../samples/web-resource/web-resource.png | Bin 8418 -> 0 bytes .../samples/web-resource/web-resource.svg | 197 --------------------- 8 files changed, 549 deletions(-) delete mode 100644 branches/sca-android/samples/web-resource/README delete mode 100644 branches/sca-android/samples/web-resource/build.xml delete mode 100644 branches/sca-android/samples/web-resource/pom.xml delete mode 100644 branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java delete mode 100644 branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite delete mode 100644 branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html delete mode 100644 branches/sca-android/samples/web-resource/web-resource.png delete mode 100644 branches/sca-android/samples/web-resource/web-resource.svg (limited to 'branches/sca-android/samples/web-resource') diff --git a/branches/sca-android/samples/web-resource/README b/branches/sca-android/samples/web-resource/README deleted file mode 100644 index 56bffba6a3..0000000000 --- a/branches/sca-android/samples/web-resource/README +++ /dev/null @@ -1,76 +0,0 @@ -Web Resource Component Sample -====================================== -This sample demonstrates an SCA Web resource component. - -The README in the samples directory (the directory above this) provides -general instructions about building and running samples. Take a look there -first. - -If you just want to run it to see what happens open a command prompt, navigate -to this sample directory and do: - -ant run - -OR if you don't have ant, on Windows do - -java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-web-resource.jar web.resource.SampleServer - -and on *nix do - -java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-web-resource.jar web.resource.SampleServer - -Now the server is started you can point your Web browser to the URL of the Web resource. - -Sample Overview ---------------- -The sample provides a single component exposing a Web resource. - -web-resource/ - src/ - main/ - java/ - web/resource/ - SampleServer.java - starts the SCA Runtime and - deploys the WebResource.composite - resources/ - myContent/ - index.html - a Web HTML resource - WebResource.composite - the SCA assembly for this sample - web-resource.png - a pictorial representation of the - sample .composite file - build.xml - the Ant build file - pom.xml - the Maven build file - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built and run using Ant using the -following commands - -cd web-resource -ant compile -ant run - -You should see the following output from the run target. - -run: - [java] 14-Jan-2008 14:28:07 org.apache.tuscany.sca.http.jetty.JettyServer a -ddServletMapping - [java] INFO: Added Servlet mapping: http://L3AW203:8080/myWeb/* - [java] Sample server started (press enter to shutdown) - [java] - [java] To get the Web resource, point your Web browser to the following add -ress: - [java] http://localhost:8080/myWeb/index.html - [java] - -As this point the Web resource is exposed by a web server started automatically -by the SCA runtime. To stop the server just press enter. - -Building The Sample Using Maven -------------------------------------------- -With either the binary or source distributions the sample can be built using -Maven as follows. - -cd web-resource -mvn - diff --git a/branches/sca-android/samples/web-resource/build.xml b/branches/sca-android/samples/web-resource/build.xml deleted file mode 100644 index 5f6b6091e7..0000000000 --- a/branches/sca-android/samples/web-resource/build.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/branches/sca-android/samples/web-resource/pom.xml b/branches/sca-android/samples/web-resource/pom.xml deleted file mode 100644 index 8c3f8d894c..0000000000 --- a/branches/sca-android/samples/web-resource/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-sca - 1.4-SNAPSHOT - ../../pom.xml - - sample-web-resource - Apache Tuscany SCA Web Resource Sample - - - - apache.incubator - http://people.apache.org/repo/m2-incubating-repository - - - - - - org.apache.tuscany.sca - tuscany-host-embedded - 1.4-SNAPSHOT - - - - org.apache.tuscany.sca - tuscany-implementation-resource-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 1.4-SNAPSHOT - runtime - - - - org.apache.tuscany.sca - tuscany-host-tomcat - 1.4-SNAPSHOT - runtime - - - - junit - junit - 4.2 - test - - - - - - ${artifactId} - - - diff --git a/branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java b/branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java deleted file mode 100644 index 9410de08c4..0000000000 --- a/branches/sca-android/samples/web-resource/src/main/java/web/resource/SampleServer.java +++ /dev/null @@ -1,44 +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 web.resource; - -import java.io.IOException; - -import org.apache.tuscany.sca.host.embedded.SCADomain; - -public class SampleServer { - public static void main(String[] args) throws Exception { - - SCADomain scaDomain = SCADomain.newInstance("WebResource.composite"); - - try { - System.out.println("Sample server started (press enter to shutdown)"); - System.out.println(); - System.out.println("To get the Web resource, point your Web browser to the following address:"); - System.out.println("http://localhost:8080/myWeb/index.html"); - System.out.println(); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - - scaDomain.close(); - System.out.println("Sample server stopped"); - } -} diff --git a/branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite b/branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite deleted file mode 100644 index 4536136a8b..0000000000 --- a/branches/sca-android/samples/web-resource/src/main/resources/WebResource.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html b/branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html deleted file mode 100644 index 55de048373..0000000000 --- a/branches/sca-android/samples/web-resource/src/main/resources/myContent/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - Tuscany Sample Web Resource - - - -

A Sample Web Resource

- -

Tuscany allows you to publish Web resources using SCA components declared with an - <implementation.resource> component implementation type and made available - to HTTP clients using a <binding.http> binding.

- -

Here is the SCA composite that publishes this page:

- -
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-  targetNamespace="http://web"
-  name="WebResource">
-
-  <component name="myWeb">
-    <implementation.resource location="myContent"/>
-    <service name="Resource">
-      <binding.http/>
-    </service>
-  </component>      
-
-</composite>
-  	
- - - diff --git a/branches/sca-android/samples/web-resource/web-resource.png b/branches/sca-android/samples/web-resource/web-resource.png deleted file mode 100644 index 7259447b65..0000000000 Binary files a/branches/sca-android/samples/web-resource/web-resource.png and /dev/null differ diff --git a/branches/sca-android/samples/web-resource/web-resource.svg b/branches/sca-android/samples/web-resource/web-resource.svg deleted file mode 100644 index 0d1257316c..0000000000 --- a/branches/sca-android/samples/web-resource/web-resource.svg +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - WebResource - - - myWeb - implementation.resource - - File System - ./myContent /index.html - - binding.http - - -- cgit v1.2.3