gecko-dev/extensions/webservices/soap/tests/soapcall.html
rayw%netscape.com 817b1d3d66 Lots of fixes and new files in the documentation and tests for SOAP.
None of these are part of any build.
2002-03-19 00:08:15 +00:00

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 Javascript console to determine why.
</BODY>
</HTML>