4
<BODY onload=showCall()>
5
<H1>SOAP Call Encoding Test</H1>
6
This encodes a call using the low-level Mozilla SOAP API and shows the resulting message.
7
View the source of the page to see what was encoded. This is useful to quickly test the
8
encoding of various arguments. This call is never invoked. Look at other soap samples for
9
calls that actually work.
12
function showCall(syncCall, faultCall) {
14
var soapversion = 0; // Version 1.1
16
var method = "GetLastTradePrice";
18
var object = "uri:some-namespace";
20
var headers = new Array(
23
var params = new Array(
24
new SOAPParameter("a string", "foo"),
25
new SOAPParameter(4, "bar"),
26
new SOAPParameter(true, "baz"),
27
new SOAPParameter(new Array(3, "another string", false, 5.235)),
28
new SOAPParameter({name: "Fido", breed: "Lab", color: "Black"})
31
var s = new SOAPCall();
32
s.encode(soapversion, method, object, headers.length, headers, params.length, params);
33
var r = (new XMLSerializer()).serializeToString(s.message);
34
document.getElementById("P").firstChild.nodeValue = r;
38
<P><CODE id=P>The SOAP call was not encoded. Look at the Error console to determine why.