Author: jonathan Date: Mon Jul 21 01:49:54 2008 New Revision: 19764 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19764
Log: Mentioning ?template. Modified: trunk/mashup/java/xdocs/helloworldclient.html Modified: trunk/mashup/java/xdocs/helloworldclient.html URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/helloworldclient.html?rev=19764&r1=19763&r2=19764&view=diff ============================================================================== --- trunk/mashup/java/xdocs/helloworldclient.html (original) +++ trunk/mashup/java/xdocs/helloworldclient.html Mon Jul 21 01:49:54 2008 @@ -31,41 +31,36 @@ <h1>Writing a Hello World Client</h1> - - <p>The Mashup Server supports the quick and easy creation of Web services clients written in HTML and Javascript. You can use the <a href="generatedresources.html#stub">Javascript stubs (?stub)</a> generated by the Mashup Server to invoke the mashup services from your web page.</p> - - <p>Mashup server also has the concept of bundling a custom UI along with the service. Follow these simple steps to write & expose a simple client for the <a href="helloworldservice.html">helloworld service</a> (Assuming the author of the helloworld service is bob):</p> -<p>Note: The Mashup server should be running the helloworld service for this to work.</p> + <p>Note: The Mashup server should be running the helloworld service for this to work.</p> - <h2>Step 1:</h2> - - <p>In Notepad or your favorite html editor, type the following text:</p> <pre class="Code"><html><br> <head><br> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"><br> <title>Hello World Client</title><br> <script type="text/javascript" src="js/wso2/WSRequest.js"></script><br> <script type="text/javascript" src="/services/bob/helloworld?stub"></script><br> </head><br> <body><br> <p> <br> <script><br> <!-- use the generated stub to call the mashup service --><br> var response = helloworld.hello();<br><br> <!-- write the response to the browser --><br> document.write(response);<br> </script> <br> </p> <br> </body><br></html></pre> - - <h2>Step 2:</h2> - - <p>Save the above as "index.html" in the directory "scripts/bob/helloworld.resources/www" within the Mashup Server directory. Now you'll be able to see the newly created page when browse to the service endpoint (eg: http://localhost:7762/services/bob/helloworld).</p> <p>Thats it, its so simple.</p> -<p></p> + +<p>Or, not simple enough for you? You can also get a template for a service, similar to the one above but +customized to the service, by clicking on the "Source Code template" for HTML link (e.g. http://localhost:7762/services/bob/helloworld?template&flavor=html) +on each Mashup's page and saving it as "index.html". This template +invokes the first operation in the service asynchronously, and illustrates how to invoke all the other services as well. +Start adding parameter values and building a unique and dynamic Mashup interface!</p> + </div> <p>© 2007-2008 WSO2 Inc.</p> _______________________________________________ Mashup-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
