Author: keith Date: Fri Aug 1 05:51:49 2008 New Revision: 20302 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20302
Log: Fixing MASHUP-1043 Modified: branches/mashup/java/1.5/java/xdocs/apphostobject.html branches/mashup/java/1.5/java/xdocs/emailhostobject.html branches/mashup/java/1.5/java/xdocs/requesthostobject.html branches/mashup/java/1.5/java/xdocs/systemhostobject.html branches/mashup/java/1.5/java/xdocs/wsrequesthostobject.html Modified: branches/mashup/java/1.5/java/xdocs/apphostobject.html URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/xdocs/apphostobject.html?rev=20302&r1=20301&r2=20302&view=diff ============================================================================== --- branches/mashup/java/1.5/java/xdocs/apphostobject.html (original) +++ branches/mashup/java/1.5/java/xdocs/apphostobject.html Fri Aug 1 05:51:49 2008 @@ -1,4 +1,5 @@ -<!-- +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><!-- ~ Copyright 2005-2008 WSO2, Inc. (http://wso2.com) ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,18 +14,12 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<html> -<head> <meta http-equiv="content-type" content=""> - <title>WSO2 Mashup Server, Atom Publishing Protocol (APP) Host -Object Guide</title> + - <link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"> - -</head> - + <title>WSO2 Mashup Server, Atom Publishing Protocol (APP) Host Object Guide</title><link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"></head> <body> @@ -65,26 +60,7 @@ <h2>2.0 Examples</h2> <p></p> <div class="code"> -<pre> - // Creating an instance of APPClient - var client = new APPClient(); - - // Creating an instance of AtomFeed - var feed = new AtomFeed(); - - // Setting login credentials for the client - client.credentials={username:"[EMAIL PROTECTED]",password:"xxx",service:"blogger",authtype:"google"}; - - // Retrieving and online feed - feed = client.getFeed("http://www.blogger.com/feeds/000/posts/full/000"); - - // Getting an array of individual entries from the feed - var entries = new Array(); - entries = feed.getEntries(); - - // Writing the retrieved feed to a file - feed.writeTo("my-file-name.xml"); -</pre> +<pre> // Creating an instance of APPClient<br> var client = new APPClient();<br><br> // Creating an instance of AtomFeed<br> var feed = new AtomFeed();<br><br> // Setting login credentials for the client<br> client.credentials={username:"[EMAIL PROTECTED]",password:"xxx",service:"blogger",authtype:"google"};<br><br> // Retrieving and online feed<br> feed = client.getFeed("http://blog.mooshup.com/feeds/posts/default");<br><br> // Getting an array of individual entries from the feed<br> var entries = new Array();<br> entries = feed.getEntries();<br><br> // Writing the retrieved feed to a file<br> feed.writeTo("my-file-name.xml");<br></pre> </div> <p></p> @@ -226,7 +202,7 @@ <tr> <td><b>property Object credentials</b></td> <td>This property can be used to provide a JavaScript object with the username,password and authentication service - credentials needed to communicate with APPServer. Currently this supports blogger authentication only.<br/> + credentials needed to communicate with APPServer. Currently this supports blogger authentication only.<br> <span style="font-style: italic;">client.credentials={username:"[EMAIL PROTECTED]", password:"xxx", service:"blogger", authtype:"google"};</span> </td> </tr> @@ -244,7 +220,7 @@ </tr> <tr> <td><b>void get(String uri)</b></td> - <td>Get an AtomEntry from the APPServer, given a URI to an Atom entry.<br/> + <td>Get an AtomEntry from the APPServer, given a URI to an Atom entry.<br> <span style="font-style: italic;">var entry2 = client.get("http://www.blogger.com/feeds/000/posts/full/000");</span></td> </tr> <tr> @@ -253,7 +229,7 @@ </tr> <tr> <td><b>void getFeed(String uri)</b></td> - <td>Get an AtomFeed from the APPServer, given a URI to an Atom feed.<br/> + <td>Get an AtomFeed from the APPServer, given a URI to an Atom feed.<br> <span style="font-style: italic;">var entry2 = client.get("http://www.blogger.com/feeds/000/posts/full/000");</span></td> </tr> <tr> @@ -262,7 +238,9 @@ </tr> <tr> <td><b>void post(String postURI, Object entryObject)</b></td> - <td>Posts an entry to an APP server using the given post URI as described in the APP specification, as an object with the following properties defined:<br/> + <td>Posts +an entry to an APP server using the given post URI as described in the +APP specification, as an object with the following properties defined:<br> <ul> <li>string author|string authors (comma separated list)</li> <li>string category|string categories(comma separated list)</li> @@ -284,7 +262,9 @@ </tr> <tr> <td><b>void put(String editURI, Object entryObject)</b></td> - <td>Posts an entry to an APP server using the given edit URI as described in the APP specification, as an object with the following properties defined:<br/> + <td>Posts +an entry to an APP server using the given edit URI as described in the +APP specification, as an object with the following properties defined:<br> <ul> <li>string author|string authors (comma separated list)</li> <li>string category|string categories(comma separated list)</li> @@ -320,11 +300,10 @@ </ul> -<br /> +<br> </div> -<p>© 2007-2008 WSO2 Inc.</p> +<p>� 2007-2008 WSO2 Inc.</p> -</body> -</html> +</body></html> \ No newline at end of file Modified: branches/mashup/java/1.5/java/xdocs/emailhostobject.html URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/xdocs/emailhostobject.html?rev=20302&r1=20301&r2=20302&view=diff ============================================================================== --- branches/mashup/java/1.5/java/xdocs/emailhostobject.html (original) +++ branches/mashup/java/1.5/java/xdocs/emailhostobject.html Fri Aug 1 05:51:49 2008 @@ -52,7 +52,13 @@ email.addAttachement(file, "temp.txt"); // Optionally can add attachements, it has a variable number of arguments. each argument can -be a File hostObject or a string representing a file.<br> +be a File hostObject or a string representing a file.<br> + + + +// In this +case we are sending two attachments (This demontrates sending +attachments using either a File Host Object or a path to the file).<br> email.text = "WSO2 Mashup server 1.0 was Released on 28th January 2008";<br> @@ -374,6 +380,6 @@ </div> -<p>© 2007-2008 WSO2 Inc.</p> +<p>� 2007-2008 WSO2 Inc.</p> </body></html> \ No newline at end of file Modified: branches/mashup/java/1.5/java/xdocs/requesthostobject.html URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/xdocs/requesthostobject.html?rev=20302&r1=20301&r2=20302&view=diff ============================================================================== --- branches/mashup/java/1.5/java/xdocs/requesthostobject.html (original) +++ branches/mashup/java/1.5/java/xdocs/requesthostobject.html Fri Aug 1 05:51:49 2008 @@ -1,6 +1,5 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head> -<!-- +<html><head><!-- ~ Copyright 2005-2008 WSO2, Inc. (http://wso2.com) ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,10 +14,10 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> + <meta http-equiv="content-type" content=""><title>Request Host Object</title> -<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"> -</head> +<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"></head> <body> <div id="main-content"> <h1>Request Host Object</h1> @@ -31,7 +30,7 @@ Server.</p> <h3>1.1 Example</h3> <div class="code"> -<pre>function securedUsingUTOverHTTPS() {<br> system.log("This mashup was invoked by the following User : " + request.authenticatedUser );<br> system.log("This mashup was invoked from the following IP : " + request.remoteIP );<br> system.log("This mashup was invoked with the following URL : " + request.address );<br>}</pre> +<pre>function securedUsingUTOverHTTPS() {<br> system.log("This mashup was invoked by the following User : " + request.authenticatedUser ); // In order to use this property the mashup should be secured using <br> // scecurity scenario 1 (UsernameToken with Timestamp over HTTPS)<br> system.log("This mashup was invoked from the following IP : " + request.remoteIP );<br> system.log("This mashup was invoked with the following URL : " + request.address );<br>}</pre> </div> <p></p> <h2>2.0 Request Object</h2> @@ -59,7 +58,10 @@ <td> 1.5</td> </tr><tr><td><b>readonly property string remoteIP;</b></td><td>Returns the remoteIP that the request was made from.<br> <em>var remoteIP = -system.remoteIP;</em></td><td>1.5</td></tr><tr><td><b>readonly property string authenticatedUser;</b></td><td>Appplicable to Mashups that are secured using scecurity scenario 1 (UsernameToken with Timestamp over HTTPS). This method will return the username of the user who called this mashup.<br><span style="font-style: italic;"> +system.remoteIP;</em></td><td>1.5</td></tr><tr><td><b>readonly property string authenticatedUser;</b></td><td>Appplicable +to Mashups that are secured using scecurity scenario 1 (UsernameToken +with Timestamp over HTTPS). This method will return the username of the +user who called this mashup.<br><span style="font-style: italic;"> </span><em style="font-style: italic;">var </em><span style="font-style: italic;">authenticatedUser</span><em style="font-style: italic;"> = system.</em><span style="font-style: italic;">authenticatedUser</span><em style="font-style: italic;">;</em></td><td>1.5</td></tr> @@ -78,5 +80,5 @@ for the request host Object</a></li> </ul> </div> -<p>© 2007-2008 WSO2 Inc.</p> +<p>� 2007-2008 WSO2 Inc.</p> </body></html> \ No newline at end of file Modified: branches/mashup/java/1.5/java/xdocs/systemhostobject.html URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/xdocs/systemhostobject.html?rev=20302&r1=20301&r2=20302&view=diff ============================================================================== --- branches/mashup/java/1.5/java/xdocs/systemhostobject.html (original) +++ branches/mashup/java/1.5/java/xdocs/systemhostobject.html Fri Aug 1 05:51:49 2008 @@ -1,6 +1,5 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head> -<!-- +<html><head><!-- ~ Copyright 2005-2008 WSO2, Inc. (http://wso2.com) ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,10 +14,10 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> + <meta http-equiv="content-type" content=""><title>System Host Object</title> -<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"> -</head> +<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"></head> <body> <div id="main-content"> <h1>System Host Object</h1> @@ -29,7 +28,7 @@ object is global and thus does not need to be instantiated explicitly.</p> <h3>1.1 Example</h3> <div class="code"> -<pre>system.include("concatscript.js");<br>function add(first, last) {<br> system.log(system.localHostName);<br> //waits for 1 second<br> system.wait(1000);<br> // concat is a function in the included concatscript.js javascript<br> var answer = concat(first,last);<br> // Send a notification to the Desk tray specifying the answer<br> system.notifyMonitor("Result of concaternating" + first + " and " + last", answer);<br> return answer;<br>}</pre> +<pre>system.include("concatscript.js");<br>function add(first, last) {<br> system.log(system.localHostName);<br> //waits for 1 second<br> system.wait(1000);<br> // concat is a function in the included concatscript.js javascript<br> var answer = concat(first,last);<br> // Send a notification to the Desk tray specifying the answer<br> system.notifyMonitor("Result of concaternating" + first + " and " + last + ", " + answer);<br> return answer;<br>}<br><br>// Here is the contents of the "concatscript.js" file which was included above. It should have been placed in the ".resources" folder of this mashup.<br><br>concat.visible=false; // Note that I have set the "visible" annotation to false. If it was not set the concat function would appear in the service as well.<br>function concat(first,last){<br>return first + last;<br>}</pre> </div> <p></p> <h2>2.0 System Object</h2> @@ -210,7 +209,8 @@ <td>Utility function to get an XML file over the network.<br> <span style="font-style: italic;"> - system.getXML('http://wso2.org/repos/wso2/trunk/mashup/java/modules/ samples/upgradeChecker/upgradeChecker.resources/history.xml');</span></td> + system.getXML('http://wso2.org/repos/wso2/trunk/mashup/java/modules/ +samples/upgradeChecker/upgradeChecker.resources/history.xml');</span></td> <td>1.5</td> </tr> @@ -247,5 +247,5 @@ for the system host Object</a></li> </ul> </div> -<p>© 2007-2008 WSO2 Inc.</p> +<p>� 2007-2008 WSO2 Inc.</p> </body></html> \ No newline at end of file Modified: branches/mashup/java/1.5/java/xdocs/wsrequesthostobject.html URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/xdocs/wsrequesthostobject.html?rev=20302&r1=20301&r2=20302&view=diff ============================================================================== --- branches/mashup/java/1.5/java/xdocs/wsrequesthostobject.html (original) +++ branches/mashup/java/1.5/java/xdocs/wsrequesthostobject.html Fri Aug 1 05:51:49 2008 @@ -90,8 +90,7 @@ list of supported options</div> <ul> <ul> -<li>useSOAP - Specify the SOAP version to be used or -weather not to use SOAP. Supported values are "1.1" | "1.2" | "false"</li> +<li>useSOAP - Specify the SOAP version to be used or whether not to use SOAP. Supported values are "1.1" | "1.2" | "false"</li> <li>HTTPMethod - The HTTP method to be used. Supported values are "GET" | "POST" | "PUT" | "DELETE"</li> <li>useWSA - Weather WS-Addressing needs to be used.
_______________________________________________ Mashup-dev mailing list [email protected] http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
