Import from 1.9a8 tarball
[mozilla-extra.git] / extensions / webservices / wsdl / tests / hexBinary.html
blob822ae3c4313cc3c4f8eb631e0772baf74db7552a
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 ;
36 echoDecimalCallback : function (aTranslatedValue)
38 //alert(aTranslatedValue);
39 resdiv = document.getElementById("result");
40 resdiv.innerHTML = "Result from server:" + aTranslatedValue ;
43 createProxy(listener);
45 else {
46 requestTranslation(aValue);
50 function createProxy(aCreationListener)
52 try {
53 var factory = new WebServiceProxyFactory();
54 //alert(factory);
55 factory.createProxyAsync(wsdl_uri, "interopTestPort", "", true, aCreationListener);
57 catch (ex) {
58 alert(ex);
62 function requestTranslation (value)
64 if (proxy) {
65 //alert("Wait...");
66 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
67 proxy.echoHexBinary(value);
69 else {
70 alert("Error: Proxy set up not complete!");
73 </script>
75 </head>
76 <body>
77 <div id="banner">
78 <a name="top"></a>
80 WSDL Testcase: hexBinary (xsd:hexBinary)
81 </div>
83 <div id="main">
84 <p>This page tests simple type hexBinary operation. Sends a hexBinary value and the server echos it back</p>
86 <div style="border: 1px dotted black;">
87 <div style="padding: 20px;">
88 <table>
89 <tbody>
90 <tr>
91 <td>
92 <br>
93 <form>
94 <input id="intvalue" value ="0FB7" type="text" size="40">
95 <input id="Send" type="button" value="Send hexBinary Value" onclick="Translate();">
96 <br>
97 <br>
98 <div id="result">Result from server:</div>
99 </form>
100 <br>
101 </td>
103 <td valign="bottom">
104 <div id="myWizard" style="position: relative;"></div>
105 </td>
106 </tr>
107 </tbody>
108 </table>
109 </div>
110 </div>
111 <p></p>
112 </div></div>
114 </body></html>