~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/extensions/webservices/wsdl/tests/string.html

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head>
 
2
<link rel="stylesheet" type="text/css" href="stylesheet.css"><title></title>
 
3
 
 
4
<script>
 
5
    var proxy    = null;
 
6
    var wsdl_uri = "http://www.pocketsoap.com/services/ilab.wsdl";
 
7
 
 
8
    function Translate (aValue)
 
9
    {
 
10
 
 
11
        aValue = document.getElementById("intvalue").value ;
 
12
                 if(!aValue)
 
13
                 {
 
14
                   alert("Please enter a value");
 
15
                   return ;
 
16
              }
 
17
 
 
18
        if (!proxy)
 
19
      {
 
20
         var listener = {
 
21
          onLoad: function (aProxy)
 
22
          {
 
23
            proxy = aProxy;
 
24
            proxy.setListener(listener);
 
25
            requestTranslation(aValue);
 
26
          },
 
27
 
 
28
          onError: function (aError)
 
29
          {
 
30
            //alert("Error-" + aError);
 
31
            resdiv = document.getElementById("result");
 
32
            resdiv.innerHTML  = "Result from server:"+"Error-" + aError ;
 
33
          },
 
34
 
 
35
          echoStringCallback : function (aTranslatedValue)
 
36
          {
 
37
            //alert(aTranslatedValue);
 
38
            resdiv = document.getElementById("result");
 
39
            resdiv.innerHTML  = "Result from server:" + aTranslatedValue ;
 
40
          }
 
41
        };
 
42
        createProxy(listener);
 
43
      }
 
44
      else {
 
45
        requestTranslation(aValue);
 
46
      }
 
47
    }
 
48
 
 
49
    function createProxy(aCreationListener)
 
50
    {
 
51
      try {
 
52
        var factory = new WebServiceProxyFactory();
 
53
        //alert(factory);
 
54
        factory.createProxyAsync(wsdl_uri, "interopTestPort", "", true, aCreationListener);
 
55
      }
 
56
      catch (ex) {
 
57
        alert(ex);
 
58
      }
 
59
    }
 
60
 
 
61
    function requestTranslation (value)
 
62
    {
 
63
      if (proxy) {
 
64
        //alert("Wait...");
 
65
        netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
 
66
        proxy.echoString(value);
 
67
      }
 
68
      else {
 
69
        alert("Error: Proxy set up not complete!");
 
70
      }
 
71
    }
 
72
</script>
 
73
 
 
74
</head>
 
75
<body>
 
76
<div id="banner">
 
77
    <a name="top"></a>
 
78
 
 
79
  WSDL Testcase: String (xsd:string)
 
80
  </div>
 
81
 
 
82
  <div id="main">
 
83
    <p>This page tests simple type string operation. Sends a string value and the server echos it back</p>
 
84
 
 
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 String Value" onclick="Translate();">
 
95
<br>
 
96
<br>
 
97
<div id="result">Result from server:</div>
 
98
</form>
 
99
<br>
 
100
</td>
 
101
 
 
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>
 
112
 
 
113
</body></html>
 
 
b'\\ No newline at end of file'