Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
frascati
frascati
Commits
a601185d
Commit
a601185d
authored
Jul 18, 2009
by
Nicolas Dolet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synchronize trunk examples with the FRASCATI_1_0_1 branch.
parent
b85fd6a3
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
1543 additions
and
109 deletions
+1543
-109
examples/calculator/README.txt
examples/calculator/README.txt
+12
-13
examples/calculator/client/.classpath
examples/calculator/client/.classpath
+0
-9
examples/calculator/client/.project
examples/calculator/client/.project
+0
-23
examples/calculator/client/.settings/org.eclipse.jdt.core.prefs
...es/calculator/client/.settings/org.eclipse.jdt.core.prefs
+0
-5
examples/calculator/client/.settings/org.maven.ide.eclipse.prefs
...s/calculator/client/.settings/org.maven.ide.eclipse.prefs
+0
-9
examples/calculator/client/README.txt
examples/calculator/client/README.txt
+34
-0
examples/calculator/client/pom.xml
examples/calculator/client/pom.xml
+1
-1
examples/calculator/client/src/main/wsdl/Calculator.wsdl
examples/calculator/client/src/main/wsdl/Calculator.wsdl
+161
-0
examples/calculator/server/.classpath
examples/calculator/server/.classpath
+0
-8
examples/calculator/server/.project
examples/calculator/server/.project
+0
-23
examples/calculator/server/.settings/org.eclipse.jdt.core.prefs
...es/calculator/server/.settings/org.eclipse.jdt.core.prefs
+0
-5
examples/calculator/server/.settings/org.maven.ide.eclipse.prefs
...s/calculator/server/.settings/org.maven.ide.eclipse.prefs
+0
-9
examples/calculator/server/README.txt
examples/calculator/server/README.txt
+32
-0
examples/helloworld-rmi/README.txt
examples/helloworld-rmi/README.txt
+46
-0
examples/helloworld-rmi/client/README.txt
examples/helloworld-rmi/client/README.txt
+33
-0
examples/helloworld-rmi/client/pom.xml
examples/helloworld-rmi/client/pom.xml
+61
-0
examples/helloworld-rmi/client/src/main/java/example/hw/ClientImpl.java
...world-rmi/client/src/main/java/example/hw/ClientImpl.java
+60
-0
examples/helloworld-rmi/client/src/main/java/example/hw/Console.java
...lloworld-rmi/client/src/main/java/example/hw/Console.java
+34
-0
examples/helloworld-rmi/client/src/main/java/example/hw/Service.java
...lloworld-rmi/client/src/main/java/example/hw/Service.java
+27
-0
examples/helloworld-rmi/client/src/main/resources/helloworld-rmi-client.composite
...client/src/main/resources/helloworld-rmi-client.composite
+50
-0
examples/helloworld-rmi/pom.xml
examples/helloworld-rmi/pom.xml
+50
-0
examples/helloworld-rmi/server/README.txt
examples/helloworld-rmi/server/README.txt
+32
-0
examples/helloworld-rmi/server/pom.xml
examples/helloworld-rmi/server/pom.xml
+61
-0
examples/helloworld-rmi/server/src/main/java/example/hw/Console.java
...lloworld-rmi/server/src/main/java/example/hw/Console.java
+34
-0
examples/helloworld-rmi/server/src/main/java/example/hw/ServerImpl.java
...world-rmi/server/src/main/java/example/hw/ServerImpl.java
+74
-0
examples/helloworld-rmi/server/src/main/java/example/hw/Service.java
...lloworld-rmi/server/src/main/java/example/hw/Service.java
+30
-0
examples/helloworld-rmi/server/src/main/resources/helloworld-rmi-server.composite
...server/src/main/resources/helloworld-rmi-server.composite
+42
-0
examples/helloworld-ws/README.txt
examples/helloworld-ws/README.txt
+46
-0
examples/helloworld-ws/client/README.txt
examples/helloworld-ws/client/README.txt
+34
-0
examples/helloworld-ws/client/pom.xml
examples/helloworld-ws/client/pom.xml
+72
-0
examples/helloworld-ws/client/src/main/java/example/hw/ClientImpl.java
...oworld-ws/client/src/main/java/example/hw/ClientImpl.java
+59
-0
examples/helloworld-ws/client/src/main/java/example/hw/Console.java
...elloworld-ws/client/src/main/java/example/hw/Console.java
+34
-0
examples/helloworld-ws/client/src/main/resources/helloworld-ws-client.composite
.../client/src/main/resources/helloworld-ws-client.composite
+44
-0
examples/helloworld-ws/client/src/main/wsdl/HelloService.wsdl
...ples/helloworld-ws/client/src/main/wsdl/HelloService.wsdl
+50
-0
examples/helloworld-ws/pom.xml
examples/helloworld-ws/pom.xml
+50
-0
examples/helloworld-ws/server/README.txt
examples/helloworld-ws/server/README.txt
+32
-0
examples/helloworld-ws/server/pom.xml
examples/helloworld-ws/server/pom.xml
+61
-0
examples/helloworld-ws/server/src/main/java/example/hw/Console.java
...elloworld-ws/server/src/main/java/example/hw/Console.java
+34
-0
examples/helloworld-ws/server/src/main/java/example/hw/HelloService.java
...orld-ws/server/src/main/java/example/hw/HelloService.java
+32
-0
examples/helloworld-ws/server/src/main/java/example/hw/ServerImpl.java
...oworld-ws/server/src/main/java/example/hw/ServerImpl.java
+75
-0
examples/helloworld-ws/server/src/main/resources/helloworld-ws-server.composite
.../server/src/main/resources/helloworld-ws-server.composite
+40
-0
examples/pom.xml
examples/pom.xml
+5
-3
examples/ws-parent/pom.xml
examples/ws-parent/pom.xml
+1
-1
No files found.
examples/calculator/README.txt
View file @
a601185d
...
...
@@ -29,21 +29,20 @@ This module gathers the server and the client.
For running the example, open two terminals (for the server and for the client).
Compilation with Maven:
(for the server and the client)
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
(for the server and the client)
Execution with Maven:
---------------------
1) Open a console for the server
cd server
mvn -Prun
2) Open another console for the client
cd client
mvn -Prun
Compilation and execution with the FraSCAti scripts: (for the server)
----------------------------------------------------
frascati compile src calculator-server
frascati run soap-calc -libpath calculator-server.jar
Compilation and execution with the FraSCAti scripts: (for the client)
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
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
1) Open a console and follow instructions in the 'server' directory
2) Open another console and follow instructions in the 'client' directory
examples/calculator/client/.classpath
deleted
100644 → 0
View file @
b85fd6a3
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
output=
"target/classes"
path=
"src/main/java"
/>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/classes"
path=
"src/main/resources"
/>
<classpathentry
kind=
"src"
path=
"target/generated/src/main/java"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"
/>
<classpathentry
kind=
"con"
path=
"org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"
/>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
examples/calculator/client/.project
deleted
100644 → 0
View file @
b85fd6a3
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
calc-client
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.maven.ide.eclipse.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.maven.ide.eclipse.maven2Nature
</nature>
</natures>
</projectDescription>
examples/calculator/client/.settings/org.eclipse.jdt.core.prefs
deleted
100644 → 0
View file @
b85fd6a3
#Thu Jun 04 01:10:39 CEST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5
examples/calculator/client/.settings/org.maven.ide.eclipse.prefs
deleted
100644 → 0
View file @
b85fd6a3
#Thu Jun 04 01:10:37 CEST 2009
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1
examples/calculator/client/README.txt
0 → 100644
View file @
a601185d
============================================================================
OW2 FraSCAti Examples: Calculator
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: Nicolas Dolet
============================================================================
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:
----------------------------------------------------
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
examples/calculator/client/pom.xml
View file @
a601185d
...
...
@@ -44,7 +44,7 @@
</parent>
<properties>
<wsdl.file>
http://localhost:8080
/Calculator
?
wsdl
</wsdl.file>
<wsdl.file>
src/main/wsdl
/Calculator
.
wsdl
</wsdl.file>
<composite.file>
calc-client
</composite.file>
<service.name>
calc
</service.name>
<method.name>
add
</method.name>
...
...
examples/calculator/client/src/main/wsdl/Calculator.wsdl
0 → 100644
View file @
a601185d
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name=
"CalcService"
targetNamespace=
"http://api.soapcalc.examples.frascati.ow2.org/"
xmlns:ns1=
"http://schemas.xmlsoap.org/soap/http"
xmlns:soap=
"http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns=
"http://api.soapcalc.examples.frascati.ow2.org/"
xmlns:wsdl=
"http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
>
<wsdl:types>
<xsd:schema
attributeFormDefault=
"unqualified"
elementFormDefault=
"qualified"
targetNamespace=
"http://api.soapcalc.examples.frascati.ow2.org/"
xmlns:tns=
"http://api.soapcalc.examples.frascati.ow2.org/"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
>
<xsd:element
name=
"mult"
type=
"tns:mult"
/>
<xsd:complexType
name=
"mult"
>
<xsd:sequence>
<xsd:element
name=
"arg0"
type=
"xsd:int"
/>
<xsd:element
name=
"arg1"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"multResponse"
type=
"tns:multResponse"
/>
<xsd:complexType
name=
"multResponse"
>
<xsd:sequence>
<xsd:element
name=
"return"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"div"
type=
"tns:div"
/>
<xsd:complexType
name=
"div"
>
<xsd:sequence>
<xsd:element
name=
"arg0"
type=
"xsd:int"
/>
<xsd:element
name=
"arg1"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"divResponse"
type=
"tns:divResponse"
/>
<xsd:complexType
name=
"divResponse"
>
<xsd:sequence>
<xsd:element
name=
"return"
type=
"xsd:double"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"add"
type=
"tns:add"
/>
<xsd:complexType
name=
"add"
>
<xsd:sequence>
<xsd:element
name=
"arg0"
type=
"xsd:int"
/>
<xsd:element
name=
"arg1"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"addResponse"
type=
"tns:addResponse"
/>
<xsd:complexType
name=
"addResponse"
>
<xsd:sequence>
<xsd:element
name=
"return"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"sub"
type=
"tns:sub"
/>
<xsd:complexType
name=
"sub"
>
<xsd:sequence>
<xsd:element
name=
"arg0"
type=
"xsd:int"
/>
<xsd:element
name=
"arg1"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"subResponse"
type=
"tns:subResponse"
/>
<xsd:complexType
name=
"subResponse"
>
<xsd:sequence>
<xsd:element
name=
"return"
type=
"xsd:int"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message
name=
"add"
>
<wsdl:part
element=
"tns:add"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"div"
>
<wsdl:part
element=
"tns:div"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"divResponse"
>
<wsdl:part
element=
"tns:divResponse"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"multResponse"
>
<wsdl:part
element=
"tns:multResponse"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"subResponse"
>
<wsdl:part
element=
"tns:subResponse"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"sub"
>
<wsdl:part
element=
"tns:sub"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"mult"
>
<wsdl:part
element=
"tns:mult"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:message
name=
"addResponse"
>
<wsdl:part
element=
"tns:addResponse"
name=
"parameters"
>
</wsdl:part>
</wsdl:message>
<wsdl:portType
name=
"CalcServicePortType"
>
<wsdl:operation
name=
"mult"
>
<wsdl:input
message=
"tns:mult"
name=
"mult"
>
</wsdl:input>
<wsdl:output
message=
"tns:multResponse"
name=
"multResponse"
>
</wsdl:output>
</wsdl:operation>
<wsdl:operation
name=
"div"
>
<wsdl:input
message=
"tns:div"
name=
"div"
>
</wsdl:input>
<wsdl:output
message=
"tns:divResponse"
name=
"divResponse"
>
</wsdl:output>
</wsdl:operation>
<wsdl:operation
name=
"add"
>
<wsdl:input
message=
"tns:add"
name=
"add"
>
</wsdl:input>
<wsdl:output
message=
"tns:addResponse"
name=
"addResponse"
>
</wsdl:output>
</wsdl:operation>
<wsdl:operation
name=
"sub"
>
<wsdl:input
message=
"tns:sub"
name=
"sub"
>
</wsdl:input>
<wsdl:output
message=
"tns:subResponse"
name=
"subResponse"
>
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding
name=
"CalcServiceSoapBinding"
type=
"tns:CalcServicePortType"
>
<soap:binding
style=
"document"
transport=
"http://schemas.xmlsoap.org/soap/http"
/>
<wsdl:operation
name=
"mult"
>
<soap:operation
soapAction=
""
style=
"document"
/>
<wsdl:input
name=
"mult"
>
<soap:body
use=
"literal"
/>
</wsdl:input>
<wsdl:output
name=
"multResponse"
>
<soap:body
use=
"literal"
/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation
name=
"div"
>
<soap:operation
soapAction=
""
style=
"document"
/>
<wsdl:input
name=
"div"
>
<soap:body
use=
"literal"
/>
</wsdl:input>
<wsdl:output
name=
"divResponse"
>
<soap:body
use=
"literal"
/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation
name=
"add"
>
<soap:operation
soapAction=
""
style=
"document"
/>
<wsdl:input
name=
"add"
>
<soap:body
use=
"literal"
/>
</wsdl:input>
<wsdl:output
name=
"addResponse"
>
<soap:body
use=
"literal"
/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation
name=
"sub"
>
<soap:operation
soapAction=
""
style=
"document"
/>
<wsdl:input
name=
"sub"
>
<soap:body
use=
"literal"
/>
</wsdl:input>
<wsdl:output
name=
"subResponse"
>
<soap:body
use=
"literal"
/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service
name=
"CalcService"
>
<wsdl:port
binding=
"tns:CalcServiceSoapBinding"
name=
"CalcServicePort"
>
<soap:address
location=
"http://localhost:8080/Calculator"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
examples/calculator/server/.classpath
deleted
100644 → 0
View file @
b85fd6a3
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
output=
"target/classes"
path=
"src/main/java"
/>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/classes"
path=
"src/main/resources"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
kind=
"con"
path=
"org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"
/>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
examples/calculator/server/.project
deleted
100644 → 0
View file @
b85fd6a3
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
soap-calculator
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.maven.ide.eclipse.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.maven.ide.eclipse.maven2Nature
</nature>
</natures>
</projectDescription>
examples/calculator/server/.settings/org.eclipse.jdt.core.prefs
deleted
100644 → 0
View file @
b85fd6a3
#Mon May 25 17:52:38 CEST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5
examples/calculator/server/.settings/org.maven.ide.eclipse.prefs
deleted
100644 → 0
View file @
b85fd6a3
#Mon May 25 17:52:35 CEST 2009
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1
examples/calculator/server/README.txt
0 → 100644
View file @
a601185d
============================================================================
OW2 FraSCAti Examples: Calculator
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: Nicolas Dolet
============================================================================
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)
----------------------------------------------------
frascati compile src calculator-server
frascati run soap-calc -libpath calculator-server.jar
examples/helloworld-rmi/README.txt
0 → 100644
View file @
a601185d
============================================================================
OW2 FraSCAti Examples: Helloworld RMI
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: Nicolas Dolet
============================================================================
HelloWorld RMI:
---------------
This example shows how to expose an SCA service in a Java RMI registry and how
to consume it with an SCA client composite.
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
1) Open a console for the server
cd server
mvn -Prun
2) Open another console for the client
cd client
mvn -Prun
Compilation and execution with the FraSCAti scripts:
----------------------------------------------------
1) Open a console and follow instructions in the 'server' directory
2) Open another console and follow instructions in the 'client' directory
examples/helloworld-rmi/client/README.txt
0 → 100644
View file @
a601185d
============================================================================
OW2 FraSCAti Examples: Helloworld RMI
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: Nicolas Dolet
============================================================================
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:
----------------------------------------------------
frascati compile src hello-rmi
frascati run helloworld-rmi-client -libpath hello-rmi.jar -s r -m run
examples/helloworld-rmi/client/pom.xml
0 → 100644
View file @
a601185d
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Helloworld RMI
*
* 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: Nicolas Dolet
*
* Contributor(s):
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.ow2.frascati.examples
</groupId>
<artifactId>
helloworld-rmi-client
</artifactId>
<version>
1.0.1
</version>
<packaging>
jar
</packaging>
<name>
OW2 FraSCAti Examples: Helloworld RMI Client
</name>
<parent>
<groupId>
org.ow2.frascati.examples
</groupId>
<artifactId>
helloworld-rmi-parent
</artifactId>
<version>
1.0.1
</version>
</parent>
<properties>
<composite.file>
helloworld-rmi-client
</composite.file>
<service.name>
r
</service.name>
<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>
examples/helloworld-rmi/client/src/main/java/example/hw/ClientImpl.java
0 → 100644
View file @
a601185d
/***
* OW2 FraSCAti Assembly Factory Examples : HelloWorld
* Copyright (C) 2008 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: Damien Fournier
*/
package
example.hw
;
import
org.osoa.sca.annotations.Init
;
import
org.osoa.sca.annotations.Reference
;
public
class
ClientImpl
implements
Runnable
{
//--------------------------------------------------------------------------
// SCA Reference
// --------------------------------------------------------------------------
private
Service
s
;
@Reference
public
void
setPrintService
(
Service
service
)
{
this
.
s
=
service
;
}
//--------------------------------------------------------------------------
// Default constructor
// --------------------------------------------------------------------------
public
ClientImpl
()
{
Console
.
println
(
"CLIENT created"
);
}
@Init
public
void
init
()
{
Console
.
println
(
"CLIENT initialized"
);
}
//--------------------------------------------------------------------------
// Implementation of the Runnable interface
// --------------------------------------------------------------------------
public
void
run
()
{
Console
.
println
(
"Call the service..."
);
s
.
print
(
"hello world"
);
}
}
examples/helloworld-rmi/client/src/main/java/example/hw/Console.java
0 → 100644
View file @
a601185d
/***
* OW2 FraSCAti Assembly Factory Examples : HelloWorld
* Copyright (C) 2008 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