Author: antelder
Date: Mon Apr 11 10:17:50 2011
New Revision: 1091007

URL: http://svn.apache.org/viewvc?rev=1091007&view=rev
Log:
Add a sample using jsonrpc

Added:
    tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/
      - copied from r1088558, 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld/
    
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml
      - copied, changed from r1088921, 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld/pom.xml
Modified:
    tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/README
    
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/src/main/resources/helloworld.composite

Modified: 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/README
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/README?rev=1091007&r1=1088558&r2=1091007&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/README 
(original)
+++ 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/README 
Mon Apr 11 10:17:50 2011
@@ -14,30 +14,14 @@ following command in the helloworld fold
 
    mvn tuscany:run 
 
-Alternatively, the Tuscany Shell can be started with the scripts in the 
Tuscany binary distribution 
-bin folder. To do that run the following command at the root of a Tuscany 
binary distribution:
 
-   bin\tuscany.bat samples\getting-started\helloworld
 
-Once the Shell has been started with one of those methods you can use Shell 
commands to explore
-the SCA domain, for example, use the "installed" command to get the status of 
installed contributions, 
-"services" to see the available component services, and you may test calling 
the helloworld service by 
-using the "invoke" command:
+   
http://localhost:8080/HelloworldComponent/Helloworld?method=sayHello&params=WyJXb3JsZCJd&id=1
 
-   invoke HelloworldComponent sayHello yourName
 
----
- 
-This sample was created by the Tuscany contribution-jar Maven archetype. You 
can use that archetype to 
-create your own SCA contribution projects by running the following Maven 
command:
 
-   mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org
+   {"id":1,"result":"Hello World"}
+
 
-then at the prompt select 1 to choose the contribution-jar archetype and then 
answer the questions. 
-This project used the following answers:
 
-   Define value for property 'groupId': : org.apache.tuscany.sca.samples
-   Define value for property 'artifactId': : helloworld-contribution
-   Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT
-   Define value for property 'package': org.apache.tuscany.sca.samples: sample 
 
 

Copied: 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml 
(from r1088921, 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld/pom.xml)
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml?p2=tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml&p1=tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld/pom.xml&r1=1088921&r2=1091007&rev=1091007&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld/pom.xml 
(original)
+++ 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/pom.xml 
Mon Apr 11 10:17:50 2011
@@ -28,10 +28,10 @@
       <relativePath/> 
    </parent>
 
-   <artifactId>helloworld</artifactId>
+   <artifactId>helloworld-jsonrpc</artifactId>
    <version>2.0-SNAPSHOT</version>
 
-   <name>Apache Tuscany SCA Samples Helloworld</name>
+   <name>Apache Tuscany SCA Samples Helloworld JSON-RPC</name>
 
    <properties>
       <tuscany.version>${project.version}</tuscany.version>
@@ -60,6 +60,19 @@
          <scope>test</scope>
       </dependency>
 
+      <dependency>
+         <groupId>org.apache.tuscany.sca</groupId>
+         <artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
+         <version>${tuscany.version}</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.mortbay.jetty</groupId>
+         <artifactId>jetty</artifactId>
+         <version>6.1.26</version>
+         <scope>test</scope>
+      </dependency>
+
    </dependencies>
 
    <build>

Modified: 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/src/main/resources/helloworld.composite
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/src/main/resources/helloworld.composite?rev=1091007&r1=1088558&r2=1091007&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/src/main/resources/helloworld.composite
 (original)
+++ 
tuscany/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonrpc/src/main/resources/helloworld.composite
 Mon Apr 11 10:17:50 2011
@@ -24,6 +24,9 @@
 
     <component name="HelloworldComponent">
         <implementation.java class="sample.HelloworldImpl"/>
+        <service name="Helloworld">
+           <tuscany:binding.jsonrpc/>
+        </service>
     </component>
 
 </composite>


Reply via email to