summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-07-24 08:09:25 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-07-24 08:09:25 +0000
commit8fa9f97673891d8835cc1fa493ae2a9cf5d4f89b (patch)
tree9fe5fca4ea70b7ee8a57f7a0cf2cf9b146f57c9d /sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp
parent2c8258a24d2399c3f1cc90a1aa08d0a1cf0f4bf5 (diff)
Update sample README
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1150292 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp')
-rw-r--r--sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/README28
1 files changed, 12 insertions, 16 deletions
diff --git a/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/README b/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/README
index 7f901fc77f..5a99f91036 100644
--- a/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/README
+++ b/sca-java-2.x/trunk/samples/getting-started/helloworld-jsonp/README
@@ -1,27 +1,23 @@
-Tuscany - Getting Started - Helloworld Sample
----------------------------------------------
+Tuscany - Getting Started - Helloworld JSONP Sample
+---------------------------------------------------
-This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany.
+This sample extends the helloworld sample to make the helloworld service available as an HTTP endpoint using JSONP.
+JSONP is a protocol supported by many Web clients that enables client requests to a server in a different domain.
-See the README in the top-level samples folder for general information on the Tuscany samples.
+The changes to the helloworld sample are:
+- update the pom.xml with the additional dependencies
+- update the composite to use the JSONP binding
-This project creates an SCA contribution with a deployable composite named helloworld.composite.
-The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service,
-the component is implemented by a Java class.
-
-You can use the contribution by starting the composite in the Tuscany Shell. To do that run the
-following command in the helloworld folder:
+As with all the getting-started samples you can run this sample with:
mvn tuscany:run
+Then at a web browser enter the following URL:
+http://localhost:8080/HelloworldComponent/Helloworld/sayHello?name=world&callback=respFunc
- http://localhost:8080/HelloworldComponent/Helloworld?method=sayHello&params=WyJXb3JsZCJd&id=1
-
-
-
- {"id":1,"result":"Hello World"}
-
+which should return a page saying:
+respFunc("Hello world");