Author: keith Date: Sun Jul 27 22:53:41 2008 New Revision: 20028 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20028
Log: Adding payload as a paremeter to the send function Modified: trunk/mashup/java/xdocs/wsrequesthostobject.html Modified: trunk/mashup/java/xdocs/wsrequesthostobject.html URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/wsrequesthostobject.html?rev=20028&r1=20027&r2=20028&view=diff ============================================================================== --- trunk/mashup/java/xdocs/wsrequesthostobject.html (original) +++ trunk/mashup/java/xdocs/wsrequesthostobject.html Sun Jul 27 22:53:41 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,11 +14,10 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -<meta http-equiv="content-type" content=""><title>WSRequest Host Object</title> -<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"> -</head> +<meta http-equiv="content-type" content=""><title>WSRequest Host Object</title> +<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"></head> <body> <div id="main-content"> <h1>WSRequest Host Object</h1> @@ -152,7 +150,9 @@ options needed to parse in information to invoke secured services.</li></ul><div style="margin-left: 40px;">The following is a list of supported options<br></div><ul><ul><li>username - Used to specify the username if the service needs a username token to carry out any WS-Security related -operations. </li><li>password - Used to specify the password if the service needs a password token to carry out any WS-Security related operations. </li><li>encryptionUser +operations. </li><li>password +- Used to specify the password if the service needs a password +token to carry out any WS-Security related operations. </li><li>encryptionUser - Used to specify the alias of the certificate to use in Encryption if the service needs the request to be encrypted.</li></ul><li><span style="font-style: italic;">serviceName (QName)</span> - The QName of the service to be invoked. Could be usefull if the WSDL @@ -226,7 +226,7 @@ (assynchronously) the thread will return to the caller immidiatly (Even before the result of the web service invocation is received). <div class="code"> -<pre>// Demonstrates calling the getVersion operation of the version service in a asynchronous manner using the open method<br>function invokeGetVersionAsync(){<br> var version = new WSRequest();<br> version.onreadystatechange = function() {<br> handleResponse(version);<br> };<br> var options = new Array();<br> options.useSOAP = 1.2;<br> options.useWSA = 1.0;<br> options.action = "http://services.mashup.wso2.org/version/ServiceInterface/getVersionRequest";<br> var payload = null;<br> try {<br> version.open(options,"http://localhost:7762/services/system/version", true);<br> version.send();<br> } catch (e) {<br> system.log(e.toString(),"error");<br> return e.toString(); <br> }<br> return "Invoked getVersion in a asynchronous manner";<br>}<br><br>handleResponse.visible=false;<br>function handleResponse(version){<br> if (version.readyState == 4) {<br> system.log(version.responseText);<br> }<br>}</pre> +<pre>// Demonstrates calling the getVersion operation of the version service in a asynchronous manner using the open method<br>function invokeGetVersionAsync(){<br> var version = new WSRequest();<br> version.onreadystatechange = function() {<br> handleResponse(version);<br> };<br> var options = new Array();<br> options.useSOAP = 1.2;<br> options.useWSA = 1.0;<br> options.action = "http://services.mashup.wso2.org/version/ServiceInterface/getVersionRequest";<br> var payload = null;<br> try {<br> version.open(options,"http://localhost:7762/services/system/version", true);<br> version.send(payload);<br> } catch (e) {<br> system.log(e.toString(),"error");<br> return e.toString(); <br> }<br> return "Invoked getVersion in a asynchronous manner";<br>}<br><br>handleResponse.visible=false;<br>function handleResponse(version){<br> if (version.readyState == 4) {<br> system.log(version.responseText);<br> }<br>}</pre> </div> <div class="code"> <pre>// Demonstrates calling the getVersion operation of the version service in a asynchronous manner using the openWSDL method<br>function invokeGetVersionAsync(){<br> var request = new WSRequest();<br> request.onreadystatechange = function() {<br> handleResponse(request);<br> };<br> request.openWSDL("http://localhost:7762/services/system/version?wsdl",true);<br> request.send("getVersion",null);<br> return "Invoked getVersion in a asynchronous manner";<br>}<br><br>handleResponse.visible=false;<br>function handleResponse(version){<br> if (version.readyState == 4) {<br> system.log(version.responseText);<br> }<br>}</pre> @@ -253,5 +253,5 @@ for the WebServiceErrorHostObject 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
_______________________________________________ Mashup-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
