Commit 782b1095 authored by Philippe Merle's avatar Philippe Merle

Added a profile to run all examples with FraSCAti Explorer.

Updated README.txt files to document this feature.
Updated pom files to remove the dependency which is already contained by the root parent pom file.
Cosmetic updates (typo).
parent 27c1d1c0
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
FraSCAti Calculator example:
......@@ -37,12 +39,15 @@ Execution with Maven:
---------------------
1) Open a console for the server
cd server
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
2) Open another console for the client
cd client
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation and execution with the FraSCAti script:
---------------------------------------------------
1) Open a console and follow instructions in the 'server' directory
2) Open another console and follow instructions in the 'client' directory
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
FraSCAti Calculator Client example:
......@@ -27,8 +29,17 @@ FraSCAti Calculator Client example:
This example shows how to consume the Calculator web service exposed by the
Calculator Server example from FraSCAti.
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati wsdl2java -f src/main/wsdl/Calculator.wsdl -o src/main/java
frascati compile src calculator-client
frascati run calc-client -libpath calculator-client.jar -s calc -m add -p 1 2
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -61,12 +61,4 @@
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
FraSCAti Calculator Server example:
......@@ -26,7 +28,16 @@ FraSCAti Calculator Server example:
This example shows how to expose a web service (Calculator) with FraSCAti.
Compilation and execution with the FraSCAti scripts: (for the server)
----------------------------------------------------
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati compile src calculator-server
frascati run soap-calc -libpath calculator-server.jar
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -50,12 +50,4 @@
<method.params>''</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
============================================================================
OW2 FraSCAti Examples: Counter
OW2 FraSCAti Examples: RESTful Counter
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
......@@ -19,14 +19,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
FraSCAti RESTful Counter example:
---------------------------------
This example shows how to expose and how to consume a RESTful service with
FraSCAti.
This module gathers the server and the client.
FraSCAti. This module gathers the server and the client.
To run the example, open two terminals (for the server and for the client).
......@@ -38,12 +39,15 @@ Execution with Maven:
---------------------
1) Open a console for the server
cd server
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
2) Open another console for the client
cd client
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation and execution with the FraSCAti script:
---------------------------------------------------
1) Open a console and follow instructions in the 'server' directory
2) Open another console and follow instructions in the 'client' directory
============================================================================
OW2 FraSCAti Examples: Counter
OW2 FraSCAti Examples: RESTful Counter Client
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
FraSCAti RESTful Counter example:
......@@ -27,7 +29,16 @@ FraSCAti RESTful Counter example:
This example shows how to consume the RESTful "CounterService" service exposed
by the Counter Server example from FraSCAti.
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati compile src counter-client
frascati run counter-client -libpath counter-client.jar -s r -m run
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Counter
* OW2 FraSCAti Examples: RESTful Counter Client
*
* Copyright (c) 2009 INRIA, USTL
*
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -50,12 +50,4 @@
<method.params>' '</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Counter
* OW2 FraSCAti Examples: RESTful Counter
*
* Copyright (c) 2009 INRIA, USTL
*
......
============================================================================
OW2 FraSCAti Examples: Counter
OW2 FraSCAti Examples: RESTful Counter Server
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
FraSCAti RESTful Counter example:
......@@ -27,7 +29,16 @@ FraSCAti RESTful Counter example:
This example shows how to expose a RESTful service (CounterService) with
FraSCAti.
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati compile src counter-server
frascati run counter-server -libpath counter-server.jar
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Counter
* OW2 FraSCAti Examples: RESTful Counter Server
*
* Copyright (c) 2009 INRIA, USTL
*
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -50,12 +50,4 @@
<method.params>''</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
Dictionary Web Service Client:
......@@ -34,10 +36,11 @@ Compilation with Maven:
Execution with Maven:
---------------------
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati wsdl2java -f src/main/wsdl/DictService.wsdl -o src/main/java
frascati compile src dictionary
frascati run dictionary -libpath dictionary.jar -s Dictionary -m definition -p computer
......@@ -61,12 +61,4 @@
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -19,14 +19,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
Helloworld with SCA Java Annotations / Web Service bindings:
------------------------------------------------------------
HelloWorld with SCA Java Annotations:
-------------------------------------
This example shows how to use annotations on the helloworld-pojo example.
It also includes another composite: helloworld-ws that shows the usage of
the Web Service binding.
Compilation with Maven:
......@@ -35,10 +35,10 @@ Compilation with Maven:
Execution with Maven:
---------------------
mvn -Prun
edit the pom.xml descriptor to change the composite name
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati compile src helloworld-annotations
frascati run helloworld-wired -libpath helloworld-annotations.jar -s r -m run
......@@ -34,7 +34,7 @@
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: Helloworld annotated</name>
<name>OW2 FraSCAti Examples: HelloWorld annotated</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
......@@ -49,12 +49,4 @@
<method.params>' '</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -19,9 +19,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
Helloworld POJO example:
HelloWorld POJO example:
------------------------
This example shows how to build an SCA application with two POJOs: a client POJO
......@@ -35,9 +37,10 @@ Compilation with Maven:
Execution with Maven:
---------------------
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati compile src helloworld-pojo
frascati run helloworld-pojo -libpath helloworld-pojo.jar -s r -m run
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -34,7 +34,7 @@
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: Helloworld POJO</name>
<name>OW2 FraSCAti Examples: HelloWorld POJO</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
......@@ -48,13 +48,5 @@
<method.name>run</method.name>
<method.params>' '</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
</project>
......@@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
HelloWorld RMI:
......@@ -35,12 +38,15 @@ Execution with Maven:
---------------------
1) Open a console for the server
cd server
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
2) Open another console for the client
cd client
mvn -Prun
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation and execution with the FraSCAti script:
---------------------------------------------------
1) Open a console and follow instructions in the 'server' directory
2) Open another console and follow instructions in the 'client' directory
============================================================================
OW2 FraSCAti Examples: Helloworld RMI
OW2 FraSCAti Examples: HelloWorld RMI Client
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
HelloWorld RMI Client:
......@@ -27,7 +29,16 @@ HelloWorld RMI Client:
This example shows how to consume the service exposed in a Java RMI registry by
the helloworld-rmi server example.
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti script:
---------------------------------------------------
frascati compile src hello-rmi
frascati run helloworld-rmi-client -libpath hello-rmi.jar -s r -m run
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Helloworld RMI
* OW2 FraSCAti Examples: HelloWorld RMI
*
* Copyright (c) 2009 INRIA, USTL
*
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -35,7 +35,7 @@
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: Helloworld RMI Client</name>
<name>OW2 FraSCAti Examples: HelloWorld RMI Client</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
......@@ -50,12 +50,4 @@
<method.params>' '</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
......@@ -35,7 +35,7 @@
<version>1.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>OW2 FraSCAti Examples: Helloworld RMI</name>
<name>OW2 FraSCAti Examples: HelloWorld RMI</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
......
============================================================================
OW2 FraSCAti Examples: Helloworld RMI
OW2 FraSCAti Examples: HelloWorld RMI Server
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
......@@ -19,6 +19,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Nicolas Dolet
Contributor: Philippe Merle
============================================================================
HelloWorld RMI Server:
......@@ -26,6 +28,15 @@ HelloWorld RMI Server:
This example shows how to expose an SCA service in a Java RMI registry.
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn -Prun (standalone execution)
mvn -Pexplorer (with FraSCAti Explorer)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
frascati compile src hello-rmi
......
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Helloworld RMI
* OW2 FraSCAti Examples: HelloWorld RMI
*
* Copyright (c) 2009 INRIA, USTL
*
......@@ -22,7 +22,7 @@
*
* Author: Nicolas Dolet
*
* Contributor(s):
* Contributor(s): Philippe Merle
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -35,7 +35,7 @@
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OW2 FraSCAti Examples: Helloworld RMI Server</name>
<name>OW2 FraSCAti Examples: HelloWorld RMI Server</name>
<parent>
<groupId>org.ow2.frascati.examples</groupId>
......@@ -50,12 +50,4 @@
<method.params>''</method.params>
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-factory-tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
============================================================================
OW2 FraSCAti Examples: HelloWorld Script
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Philippe Merle
============================================================================
HelloWorld Script example:
--------------------------
This example shows how to implement SCA components with scripting languages as
BeanShell, Groovy, JavaScript, JRuby, and Jython. Let's note that FraSCAti supports
any scripting engine supporting the Java 6 Script Engine API (JSR-223).
This example provides an SCA composite composed of a main component bound
to a set of scripted client components. Each client component is bound to a
scripted server component. See src/main/resources/helloworld-script.composite
The FraSCAti implementation type <frascati:implementation.script> has two attributes:
* 'script': to provide the location of the script, and
* 'language': to indicate the scripting language of the script.
The following table lists the scripting engine used to execute the script
according to the extension of the value of the 'script' attribute:
+-----------+-----------------------+
| Extension | Scripting Engine |
+-----------+-----------------------+
| .bsh | BeanShell 2.0b5 |
| .groovy | Groovy 1.6.4 |
| .java | BeanShell 2.0b5 |
| .js | Mozilla Rhino 1.7 |
| .jy | Jython 2.2.1 |
| .py | Jython 2.2.1 |
| .rb | JRuby 1.3.1 |
+-----------+-----------------------+
Examples:
<frascati:implementation.script script="MainClient.bsh"/>
will use BeanShell to execute the 'MainClient.bsh' script file.
<frascati:implementation.script script="Server.js"/>
will use Mozilla Rhino to execute the JavaScript 'Server.js' script file.
The following table lists the scripting engine used to execute the script
according to the value of the 'language' attribute:
+---------------+-----------------------+
| Language | Scripting Engine |
+---------------+-----------------------+
| beanshell | BeanShell 2.0b5 |
| bsh | BeanShell 2.0b5 |
| ECMAScript | Mozilla Rhino 1.7 |
| ecmascript | Mozilla Rhino 1.7 |
| Groovy | Groovy 1.6.4 |
| groovy | Groovy 1.6.4 |
| java | BeanShell 2.0b5 |
| JavaScript | Mozilla Rhino 1.7 |
| javascript | Mozilla Rhino 1.7 |
| js | Mozilla Rhino 1.7 |
| jruby | JRuby 1.3.1 |
| jython | Jython 2.2.1 |
| python | Jython 2.2.1 |
| rhino | Mozilla Rhino 1.7 |
| ruby | JRuby 1.3.1 |
+---------------+-----------------------+
Examples:
<implementation.script language="xyz">
Here the source code of the script.
</implementation.script>
Requirements:
-------------
Run the following script
bin/install.sh
to install the required Maven artefacts of the used scripting engines.
Compilation with Maven: