Import from 1.9a8 tarball
[mozilla-extra.git] / extensions / webservices / wsdl / tests / void.html
blob249cb3490ff469c96da2f4a7e1ce8e0e86937802
1 <html><head>
2 <link rel="stylesheet" type="text/css" href="stylesheet.css"><title></title>
4 <script>
5 var proxy = null;
6 var wsdl_uri = "http://www.pocketsoap.com/services/ilab.wsdl";
8 function Translate (aValue)
11 if (!proxy)
13 var listener = {
14 onLoad: function (aProxy)
16 proxy = aProxy;
17 proxy.setListener(listener);
18 requestTranslation(aValue);
21 onError: function (aError)
23 //alert("Error-" + aError);
24 resdiv = document.getElementById("result");
25 resdiv.innerHTML = "Result from server:"+"Error-" + aError ;
28 echoVoidCallback : function (aTranslatedValue)
30 //alert(aTranslatedValue);
31 resdiv = document.getElementById("result");
32 resdiv.innerHTML = "Result from server:" + aTranslatedValue ;
35 createProxy(listener);
37 else {
38 requestTranslation(aValue);
42 function createProxy(aCreationListener)
44 try {
45 var factory = new WebServiceProxyFactory();
46 //alert(factory);
47 factory.createProxyAsync(wsdl_uri, "interopTestPort", "", true, aCreationListener);
49 catch (ex) {
50 alert(ex);
54 function requestTranslation (value)
56 if (proxy) {
57 //alert("Wait...");
58 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
59 proxy.echoVoid();
61 else {
62 alert("Error: Proxy set up not complete!");
65 </script>
67 </head>
68 <body>
69 <div id="banner">
70 <a name="top"></a>
72 WSDL Testcase: Void
73 </div>
75 <div id="main">
76 <p>This page tests simple type void operation. Calls a method which does not require any parameter</p>
78 <div style="border: 1px dotted black;">
79 <div style="padding: 20px;">
80 <table>
81 <tbody>
82 <tr>
83 <td>
84 <br>
85 <input id="Send" type="button" value="Call Void Method" onclick="Translate();">
86 <br>
87 <br>
88 <div id="result">Result from server:</div>
89 <br>
90 </td>
92 <td valign="bottom">
93 <div id="myWizard" style="position: relative;"></div>
94 </td>
95 </tr>
96 </tbody>
97 </table>
98 </div>
99 </div>
100 <p></p>
101 </div></div>
103 </body></html>