Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frascati
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
114
Issues
114
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frascati
frascati
Commits
2dd7f376
Commit
2dd7f376
authored
Apr 20, 2009
by
Nicolas Dolet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge the annotated and ws examples.
parent
d53c65a7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
264 deletions
+19
-264
examples/helloworld-annotated/README.txt
examples/helloworld-annotated/README.txt
+7
-4
examples/helloworld-annotated/build.xml
examples/helloworld-annotated/build.xml
+4
-2
examples/helloworld-annotated/pom.xml
examples/helloworld-annotated/pom.xml
+1
-1
examples/helloworld-annotated/src/main/resources/helloworld-wired.composite
...d-annotated/src/main/resources/helloworld-wired.composite
+1
-1
examples/helloworld-annotated/src/main/resources/helloworld-ws.composite
...orld-annotated/src/main/resources/helloworld-ws.composite
+6
-6
examples/helloworld-ws/README.txt
examples/helloworld-ws/README.txt
+0
-37
examples/helloworld-ws/pom.xml
examples/helloworld-ws/pom.xml
+0
-92
examples/helloworld-ws/src/main/java/org/ow2/frascati/examples/helloworld/ws/Client.java
.../java/org/ow2/frascati/examples/helloworld/ws/Client.java
+0
-43
examples/helloworld-ws/src/main/java/org/ow2/frascati/examples/helloworld/ws/PrintService.java
...org/ow2/frascati/examples/helloworld/ws/PrintService.java
+0
-31
examples/helloworld-ws/src/main/java/org/ow2/frascati/examples/helloworld/ws/Server.java
.../java/org/ow2/frascati/examples/helloworld/ws/Server.java
+0
-47
No files found.
examples/helloworld-annotated/README.txt
View file @
2dd7f376
============================================================================
OW2 FraSCAti - Helloworld with SCA Java Annotations
OW2 FraSCAti - Helloworld with SCA Java Annotations
+ Web Service bindings
Copyright (C) 2009 INRIA, USTL
This library is free software; you can redistribute it and/or
...
...
@@ -21,10 +21,12 @@ Contact: frascati@ow2.org
Author: Nicolas Dolet
============================================================================
Helloworld with SCA Java Annotations:
-------------------------------------
Helloworld with SCA Java Annotations
/ Web Service bindings
:
-------------------------------------
-----------------------
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 and packaging:
...
...
@@ -36,4 +38,5 @@ To compile and create the library of this example with Ant Ivy:
ant jar
Run the example:
frascati run helloworld-annotated -libpath helloworld-annotations-<version>.jar -s r -m run
frascati run <composite-name> -libpath helloworld-annotations-<version>.jar -s r -m run
with <composite-name> = helloworld-wired or helloworld-ws
examples/helloworld-annotated/build.xml
View file @
2dd7f376
...
...
@@ -21,7 +21,8 @@
<property
name=
"src.dir"
value=
"src"
/>
<property
name=
"build.dir"
value=
"target"
/>
<property
name=
"composite.file"
value=
"${src.dir}/main/resources/helloworld-annotated.composite"
/>
<property
name=
"composite.annotations.file"
value=
"${src.dir}/main/resources/helloworld-annotated.composite"
/>
<property
name=
"composite.ws.file"
value=
"${src.dir}/main/resources/helloworld-ws.composite"
/>
<!-- ================================= -->
<!-- target: clean -->
...
...
@@ -50,7 +51,8 @@
<!-- target: jar -->
<!-- ================================= -->
<target
name=
"jar"
depends=
"compile"
description=
"--> create the jar for the example"
>
<copy
todir=
"${build.dir}"
file=
"${composite.file}"
/>
<copy
todir=
"${build.dir}"
file=
"${composite.annotations.file}"
/>
<copy
todir=
"${build.dir}"
file=
"${composite.ws.file}"
/>
<jar
jarfile=
"${build.dir}/helloworld-annotations-0.6-SNAPSHOT.jar"
>
<fileset
dir=
"${build.dir}"
/>
</jar>
...
...
examples/helloworld-annotated/pom.xml
View file @
2dd7f376
...
...
@@ -65,7 +65,7 @@
<src>
src/main/java
</src>
<src>
src/main/resources
</src>
</srcs>
<composite>
helloworld-
annotat
ed.composite
</composite>
<composite>
helloworld-
wir
ed.composite
</composite>
</configuration>
</plugin>
</plugins>
...
...
examples/helloworld-annotated/src/main/resources/helloworld-
annotat
ed.composite
→
examples/helloworld-annotated/src/main/resources/helloworld-
wir
ed.composite
View file @
2dd7f376
...
...
@@ -21,7 +21,7 @@
<!-- Contributor(s): Christophe Demarey -->
<!-- Nicolas Dolet -->
<composite
xmlns=
"http://www.osoa.org/xmlns/sca/1.0"
name=
"helloworld-
annotat
ed"
>
<composite
xmlns=
"http://www.osoa.org/xmlns/sca/1.0"
name=
"helloworld-
wir
ed"
>
<service
name=
"r"
promote=
"client/Runnable"
/>
<component
name=
"client"
>
...
...
examples/helloworld-
ws
/src/main/resources/helloworld-ws.composite
→
examples/helloworld-
annotated
/src/main/resources/helloworld-ws.composite
View file @
2dd7f376
<?xml version="1.0" encoding="ISO-8859-15"?>
<!-- OW2 FraSCAti Examples: HelloWorld with
Web Service bindings
-->
<!-- OW2 FraSCAti Examples: HelloWorld with
annotations and Web Service bindings
-->
<!-- Copyright (C) 2009 INRIA, USTL -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
...
...
@@ -19,20 +19,20 @@
<!-- Author: Nicolas Dolet -->
<!-- -->
<composite
xmlns=
"http://www.osoa.org/xmlns/sca/1.0"
name=
"helloworld-
annotated
"
>
<composite
xmlns=
"http://www.osoa.org/xmlns/sca/1.0"
name=
"helloworld-
ws
"
>
<service
name=
"r"
promote=
"client/Runnable"
/>
<component
name=
"client"
>
<implementation.java
class=
"org.ow2.frascati.examples.helloworld.
ws
.Client"
/>
<implementation.java
class=
"org.ow2.frascati.examples.helloworld.
annotated
.Client"
/>
<reference
name=
"s"
>
<binding.ws
uri=
"http://localhost:8080/Service"
/>
<binding.ws
uri=
"http://localhost:8080/
Print
Service"
/>
</reference>
</component>
<component
name=
"server"
>
<implementation.java
class=
"org.ow2.frascati.examples.helloworld.
ws
.Server"
/>
<implementation.java
class=
"org.ow2.frascati.examples.helloworld.
annotated
.Server"
/>
<service
name=
"PrintService"
>
<binding.ws
uri=
"http://localhost:8080/Service"
/>
<binding.ws
uri=
"http://localhost:8080/
Print
Service"
/>
</service>
</component>
...
...
examples/helloworld-ws/README.txt
deleted
100644 → 0
View file @
d53c65a7
============================================================================
OW2 FraSCAti - Helloworld with Web Service bindings
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 with Web Service bindings:
-------------------------------------
This example shows how to use web service bindings with the helloworld example.
SCA Java annotations are also used in this example (cf. helloworld-annotated).
Compilation and packaging:
--------------------------
To compile and create the library of this example with Maven:
mvn
Run the example:
frascati run helloworld-ws -libpath helloworld-ws-<version>.jar -s r -m run
examples/helloworld-ws/pom.xml
deleted
100644 → 0
View file @
d53c65a7
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: HelloWorld with Web Service bindings
*
* 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
-->
<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-ws
</artifactId>
<version>
0.6-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<name>
Helloworld Web Service
</name>
<build>
<defaultGoal>
package
</defaultGoal>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
1.5
</source>
<target>
${java.specification.version}
</target>
</configuration>
</plugin>
<plugin>
<groupId>
org.ow2.frascati.factory
</groupId>
<artifactId>
frascati-factory-plugin
</artifactId>
<version>
0.6-SNAPSHOT
</version>
<executions>
<execution>
<id>
generate-factory
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
compile
</goal>
</goals>
</execution>
</executions>
<configuration>
<factory>
GenerateFactory
</factory>
<srcs>
<src>
src/main/java
</src>
<src>
src/main/resources
</src>
</srcs>
<composite>
helloworld-ws.composite
</composite>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
apache-incubating
</id>
<url>
http://people.apache.org/repo/m2-incubating-repository
</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>
org.apache.tuscany.sca
</groupId>
<artifactId>
tuscany-sca-api
</artifactId>
<version>
1.2.1-incubating
</version>
</dependency>
</dependencies>
</project>
examples/helloworld-ws/src/main/java/org/ow2/frascati/examples/helloworld/ws/Client.java
deleted
100644 → 0
View file @
d53c65a7
/***
* OW2 FraSCAti Examples: HelloWorld with Web Service bindings
* 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
*
* Author: Nicolas Dolet
*/
package
org.ow2.frascati.examples.helloworld.ws
;
import
org.osoa.sca.annotations.Reference
;
import
org.osoa.sca.annotations.Service
;
/** A print service client. */
@Service
(
Runnable
.
class
)
public
class
Client
implements
Runnable
{
@Reference
(
required
=
true
)
protected
PrintService
s
;
/** Default constructor. */
public
Client
()
{
System
.
out
.
println
(
"CLIENT created."
);
}
/** Run the client. */
public
void
run
()
{
s
.
print
(
"Hello World!"
);
}
}
examples/helloworld-ws/src/main/java/org/ow2/frascati/examples/helloworld/ws/PrintService.java
deleted
100644 → 0
View file @
d53c65a7
/***
* OW2 FraSCAti Examples: HelloWorld with Web Service bindings
* 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
*
* Author: Nicolas Dolet
*/
package
org.ow2.frascati.examples.helloworld.ws
;
import
org.osoa.sca.annotations.Service
;
/**
* A basic service used to print messages.
*/
@Service
public
interface
PrintService
{
void
print
(
String
msg
);
}
examples/helloworld-ws/src/main/java/org/ow2/frascati/examples/helloworld/ws/Server.java
deleted
100644 → 0
View file @
d53c65a7
/***
* OW2 FraSCAti Examples: HelloWorld with Web Service bindings
* 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
*
* Author: Nicolas Dolet
*/
package
org.ow2.frascati.examples.helloworld.ws
;
import
org.osoa.sca.annotations.Property
;
/** The print service implementation. */
public
class
Server
implements
PrintService
{
@Property
protected
String
header
=
"->"
;
private
int
count
=
1
;
/** Default constructor. */
public
Server
()
{
System
.
out
.
println
(
"SERVER created."
);
}
/** PrintService implementation. */
public
void
print
(
final
String
msg
)
{
System
.
out
.
println
(
"SERVER: begin printing..."
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
System
.
out
.
println
(
header
+
msg
);
}
System
.
out
.
println
(
"SERVER: print done."
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment