mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-14 11:40:13 +01:00
41 lines
1.2 KiB
HTML
41 lines
1.2 KiB
HTML
|
<HTML>
|
||
|
<HEAD>
|
||
|
</HEAD>
|
||
|
<BODY onload=showCall()>
|
||
|
<H1>SOAP Call Encoding Test</H1>
|
||
|
This encodes a call using the low-level Mozilla SOAP API and shows the resulting message.
|
||
|
View the source of the page to see what was encoded. This is useful to quickly test the
|
||
|
encoding of various arguments. This call is never invoked. Look at other soap samples for
|
||
|
calls that actually work.
|
||
|
<SCRIPT>
|
||
|
|
||
|
function showCall(syncCall, faultCall) {
|
||
|
|
||
|
var soapversion = 0; // Version 1.1
|
||
|
|
||
|
var method = "GetLastTradePrice";
|
||
|
|
||
|
var object = "uri:some-namespace";
|
||
|
|
||
|
var headers = new Array(
|
||
|
);
|
||
|
|
||
|
var params = new Array(
|
||
|
new SOAPParameter("a string", "foo"),
|
||
|
new SOAPParameter(4, "bar"),
|
||
|
new SOAPParameter(true, "baz"),
|
||
|
new SOAPParameter(new Array(3, "another string", false, 5.235)),
|
||
|
new SOAPParameter({name: "Fido", breed: "Lab", color: "Black"})
|
||
|
);
|
||
|
|
||
|
var s = new SOAPCall();
|
||
|
s.encode(soapversion, method, object, headers.length, headers, params.length, params);
|
||
|
var r = (new XMLSerializer()).serializeToString(s.message);
|
||
|
document.getElementById("P").firstChild.nodeValue = r;
|
||
|
}
|
||
|
</SCRIPT>
|
||
|
<P>
|
||
|
<P><CODE id=P>The SOAP call was not encoded. Look at the Error console to determine why.
|
||
|
</BODY>
|
||
|
</HTML>
|