Import from 1.9a8 tarball
[mozilla-extra.git] / extensions / webservices / wsdl / tests / boolean.html
blob796416925222baf1417e185fc9e6ff6f319b3b64
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 aValue = document.getElementById("intvalue").value ;
12 if(!aValue)
14 alert("Please enter a value");
15 return ;
18 if (!proxy)
20 var listener = {
21 onLoad: function (aProxy)
23 proxy = aProxy;
24 proxy.setListener(listener);
25 requestTranslation(aValue);
28 onError: function (aError)
30 //alert("Error-" + aError);
31 resdiv = document.getElementById("result");
32 resdiv.innerHTML = "Result from server:"+"Error-" + aError ;
35 echoBooleanCallback : function (aTranslatedValue)
37 //alert(aTranslatedValue);
38 resdiv = document.getElementById("result");
39 resdiv.innerHTML = "Result from server:" + aTranslatedValue ;
42 createProxy(listener);
44 else {
45 requestTranslation(aValue);
49 function createProxy(aCreationListener)
51 try {
52 var factory = new WebServiceProxyFactory();
53 //alert(factory);
54 factory.createProxyAsync(wsdl_uri, "interopTestPort", "", true, aCreationListener);
56 catch (ex) {
57 alert(ex);
61 function requestTranslation (value)
63 if (proxy) {
64 //alert("Wait...");
65 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
66 proxy.echoBoolean(value);
68 else {
69 alert("Error: Proxy set up not complete!");
72 </script>
74 </head>
75 <body>
76 <div id="banner">
77 <a name="top"></a>
79 WSDL Testcase: Boolean (xsd:boolean)
80 </div>
82 <div id="main">
83 <p>This page tests simple type boolean operation. Sends a boolean value and the server echos it back</p>
85 <div style="border: 1px dotted black;">
86 <div style="padding: 20px;">
87 <table>
88 <tbody>
89 <tr>
90 <td>
91 <br>
92 <form>
93 <input id="intvalue" type="text" size="40">
94 <input id="Send" type="button" value="Send Boolean Value" onclick="Translate();">
95 <br>
96 <br>
97 <div id="result">Result from server:</div>
98 </form>
99 <br>
100 </td>
102 <td valign="bottom">
103 <div id="myWizard" style="position: relative;"></div>
104 </td>
105 </tr>
106 </tbody>
107 </table>
108 </div>
109 </div>
110 <p></p>
111 </div></div>
113 </body></html>