Author: keith
Date: Sat Jan 26 23:41:19 2008
New Revision: 12988
Log:
Updating the details
Modified:
trunk/mashup/java/xdocs/helloworldclient.html
Modified: trunk/mashup/java/xdocs/helloworldclient.html
==============================================================================
--- trunk/mashup/java/xdocs/helloworldclient.html (original)
+++ trunk/mashup/java/xdocs/helloworldclient.html Sat Jan 26 23:41:19 2008
@@ -1,61 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <title></title>
- <link href="styles.css" rel="stylesheet" type="text/css" media="all">
+
+
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+
+
+ <title></title>
+ <link href="styles.css" rel="stylesheet" type="text/css" media="all">
</head>
<body>
+
<div id="main-content">
- <h1>Writing a Hello World Client</h1>
+
+<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
+
+
+<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
+
+
+<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>:</p>
+ the <a href="helloworldservice.html">helloworld service</a> (Assuming
the author of the helloworld service is bob):</p>
- <h2>Step 1:</h2>
- <p>In Notepad or your favorite html editor, type the following text:</p>
-<pre class="Code"><html>
- <head>
- <META http-equiv="Content-Type" content="text/html;
charset=UTF-8">
- <title>Hello World Client</title>
- <script type="text/javascript"
src="/js/wso2/WSRequest.js"></script>
- <script type="text/javascript"
src="../helloworld?stub"></script>
- </head>
- <body>
- <p>
- <script>
- <!-- set the address to match the scheme of the page
address -->
- helloworld.setAddress(helloworld.endpoint,
"/services/helloworld");
- <!-- use the generated stub to call the mashup service
-->
- var response = helloworld.hello("<test/>");
- <!-- write the response by converting to a string
(browser-independent) -->
- document.write(WSRequest.util._serializeToString(response));
- </script>
- </p>
- </body>
-</html></pre>
+
+<h2>Step 1:</h2>
- <h2>Step 2:</h2>
- <p>Save the above as "index.html" in the directory
- "scripts/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/helloworld).</p>
+
+<p>In Notepad or your favorite html editor, type the following text:</p>
- <p>You can also host this page independently of the mashup server by using
- the absolute path to the imported scripts as follows.</p>
-<pre class="Code"> <script type="text/javascript"
src="http://<i>yourip</i>:7762/js/wso2/WSRequest.js"></script>
- <script type="text/javascript"
src="http://<i>yourip</i>:7762/services/helloworld?stub"></script></pre>
+<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> <!--
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>
</div>
-<p>© WSO2 Inc.</p>
+<p>© WSO2 Inc.</p>
+
</body>
</html>
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev